Bitcoin protocol toolkit for Swift

Overview

BitcoinKit: Let’s Play with Bitcoin in Swift! TravisCI Swift 5.0+ Carthage Swift Package Manager CococaPods

Welcome to BitcoinKit

The BitcoinKit library is a Swift implementation of the Bitcoin protocol which support both BCH and BTC. Improving the mobile ecosystem for Bitcoin developers is our mission.

BitcoinKit allows maintaining a wallet, sending or receiving transactions without a full blockchain node. Following is a wallet app that demonstrates the way to use it.

Release notes are here.

 

Features

  • Encoding/decoding addresses: base58, Cashaddr, P2PKH, P2SH, WIF format.
  • Transaction building blocks: inputs, outputs, scripts.
  • EC keys and signatures.
  • BIP32, BIP44 hierarchical deterministic wallets.
  • BIP39 implementation.
  • SPV features are under construction. The following functions cannot work well sometimes.
    • Send/receive transactions.
    • See current balance in a wallet.

Requirements

  • iOS 9.0+ / Mac OS X 10.11+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 10.0+
  • Swift 5.0+

Installation

CocoaPods

$ gem install cocoapods

CocoaPods 1.5.0+ is required to build BitcoinKit.

To integrate BitcoinKit into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'BitcoinKit', '~> 1.1.0'
end

Then, run the following command:

$ pod install

Carthage

Add this to Cartfile

github "yenom/BitcoinKit" ~> 1.1.0

Run carthage update to build the framework and drag the built BitcoinKit.framework into your Xcode project.

Swift Package Manager

Simply add the following lines to dependencies of your Package.swift:

.package(url: "https://github.com/yenom/BitcoinKit.git", .upToNextMinor(from: "1.1.0"))

Note that following data types and features are currently not supported on Linux platform.

  • Peer and PeerGroup
  • SQLite based BlockStore

Contribute

Contributions to BitcoinKit are welcome and encouraged! Feel free to open issues, drop us pull requests.

Authors & Maintainers

About

BitcoinKit is maintained and funded by Yenom. Visit our website or say hi on twitter (@Yenom_wallet_en)

License

BitcoinKit is available under the MIT license. See the LICENSE file for more info.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Comments
  • Missing arguments for parameters 'bip', 'logger' in call

    Missing arguments for parameters 'bip', 'logger' in call

    Hello, i want to do a Bitcoin swift transaction using BitcoinKit.swift but have a error. I setuped and installed everything using pod install.

    The error: "Missing arguments for parameters 'bip', 'logger' in call" (line: let bitcoinKit = BitcoinKit(with...)

    The transaction:

        func BTCTransaction(){
            
            
            let words = [...]
            
            let bitcoinKit = BitcoinKit(withWords: words, walletId: "bitcoin-wallet-id", syncMode: .api, networkType: .mainNet)
    
            
            bitcoinKit.start()
            
            bitcoinKit.balance
            
            bitcoinKit.stop()
            
        }
    

    Environment

    • Xcode Version: 13.2.1
    • macOS M1

    Thank for help and solutions!

    opened by SurpriseMF3000 19
  • Building Wallet example (from workspace) - throws <unknown>:0: error: could not build Objective-C module 'crypto' - 'openssl/e_os2.h' file not found

    Building Wallet example (from workspace) - throws :0: error: could not build Objective-C module 'crypto' - 'openssl/e_os2.h' file not found

    screen shot 2018-02-05 at 11 40 47 am

    I'm targeting ios 11 - (not ios 11.2) seems like there's a specific openssl version required. https://github.com/ZBK1nger/bither-iOS/blob/fd9646362483216b580f6f41151845ef4abb7608/Podfile

    opened by johndpope 12
  • Mnemonic: Exposing word lists and adding checksum validation.

    Mnemonic: Exposing word lists and adding checksum validation.

    Description of the Change

    Major cleanup of Mnemonic, especially generation of it.

    I've exposed the Mnemonic word lists so that wallets can present them. Imagine a Restore Account with Mneemonic-flow inside a wallet, where the user needs to manually input the mnemonic, if we know the language, we can now present suggestions based on input and the word list. i.e. with user types "ca" we can display all words starting with "cat" (["cat", "catalog", "catch", "category", "cattle"]) to the user.

    In accordance with BIP39 guidelines, I've added support for mnemonic checksum:

    Although using a mnemonic not generated by the algorithm described in "Generating the mnemonic" section is possible, this is not advised and software must compute a checksum for the mnemonic sentence using a wordlist and issue a warning if it is invalid.

    Checksum validation is by default turned on, so this initializer:

    // "try" needed since we are passing a throwing closure (default argument), performing validation
    try Mnemonic.seed(mnemonic: words)
    

    is performing checksum validation, and throws an error if the mnemonic is not checksummed. I made this initializer rethrowing, which is neat because then we can get a non-throwing version of the same init by using this

    // no "try" needed, since non-throwing closure passed, thus initializer is not (re-)throwing.
    Mnemonic.seed(mnemonic: words) { _ in }
    

    The checksum validation implementation is inspired by this python code, which I refer to in the function.

    Alternate Designs

    We could altogether remove the validation closure for the function Mnemonic.seed....

    Benefits

    We can now present the user with the warning about non checksummed mnemonics! Which the BIP39 suggests.

    Possible Drawbacks

    In order to make the code for the checksum validation as clean as possible I introduced two types, UInt11 and BitArray, resulting in more code, but shorter and more clear implementation of the validation method.

    Applicable Issues

    Mainly good for wallets, using mnemonic. Validation might also be good for (backend)services.

    opened by Sajjon 9
  • Cocoapods install failed

    Cocoapods install failed

    OSX Version: 10.13.3 (17D102) Xcode Version: 9.2 (9C40b) Cocoapods Version : 1.3.1

    Step:

    1. $brew install autoconf automake
    Updating Homebrew...
    ==> Auto-updated Homebrew!
    Updated 1 tap (homebrew/core).
    ==> Updated Formulae
    node ✔              node@4              pandoc-crossref     sysdig
    artifactory         node@6              pipenv              unyaffs
    coffeescript        node@8              pre-commit          vim
    libusb              open-mpi            python              [email protected]
    metabase            osquery             sip
    
    Warning: autoconf 2.69 is already installed
    Warning: automake 1.16.1 is already installed
    
    1. Create empty project.
    2. make Profile.
        platform :ios, '10.0'
    
        target 'BitcoinKitDemo' do
        use_frameworks!
        pod 'BitcoinKit'
        end
    
    1. $pod install.
    Installing BitcoinKit (0.1.2)
    [!] /bin/bash -c 
    set -e
    sh setup/build_libraries.sh
    
    glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
    glibtoolize: copying file 'build-aux/ltmain.sh'
    glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'.
    glibtoolize: copying file 'build-aux/m4/libtool.m4'
    glibtoolize: copying file 'build-aux/m4/ltoptions.m4'
    glibtoolize: copying file 'build-aux/m4/ltsugar.m4'
    glibtoolize: copying file 'build-aux/m4/ltversion.m4'
    glibtoolize: copying file 'build-aux/m4/lt~obsolete.m4'
    checking build system type... x86_64-apple-darwin17.4.0
    checking host system type... x86_64-apple-darwin
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for x86_64-apple-darwin-strip... no
    checking for strip... strip
    checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking how to print strings... printf
    checking whether make supports the include directive... yes (GNU style)
    checking for x86_64-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... yes
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang accepts -g... yes
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to accept ISO C89... none needed
    checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang understands -c and -o together... yes
    checking dependency style of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... gcc3
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking for BSD- or MS-compatible name lister (nm)... no
    checking for x86_64-apple-darwin-dumpbin... no
    checking for x86_64-apple-darwin-link... no
    checking for dumpbin... no
    checking for link... link -dump
    checking the name lister (nm) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 196608
    checking how to convert x86_64-apple-darwin17.4.0 file names to x86_64-apple-darwin format... func_convert_file_noop
    checking how to convert x86_64-apple-darwin17.4.0 file names to toolchain format... func_convert_file_noop
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
    checking for x86_64-apple-darwin-objdump... no
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for x86_64-apple-darwin-dlltool... no
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for x86_64-apple-darwin-ar... no
    checking for ar... ar
    checking for archiver @FILE support... no
    checking for x86_64-apple-darwin-strip... strip
    checking for x86_64-apple-darwin-ranlib... no
    checking for ranlib... ranlib
    checking command to parse nm output from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang object... ok
    checking for sysroot... no
    checking for a working dd... /bin/dd
    checking how to truncate binary pipes... /bin/dd bs=4096 count=1
    checking for x86_64-apple-darwin-mt... no
    checking for mt... no
    checking if : is a manifest tool... no
    checking for x86_64-apple-darwin-dsymutil... no
    checking for dsymutil... dsymutil
    checking for x86_64-apple-darwin-nmedit... no
    checking for nmedit... nmedit
    checking for x86_64-apple-darwin-lipo... no
    checking for lipo... lipo
    checking for x86_64-apple-darwin-otool... no
    checking for otool... otool
    checking for x86_64-apple-darwin-otool64... no
    checking for otool64... no
    checking for -single_module linker flag... yes
    checking for -exported_symbols_list linker flag... yes
    checking for -force_load linker flag... yes
    checking how to run the C preprocessor... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -fno-rtti -fno-exceptions... yes
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to produce PIC... -fno-common -DPIC
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang PIC flag -fno-common -DPIC works... yes
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang static flag -static works... no
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -c -o file.o... yes
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -c -o file.o... (cached) yes
    checking whether the /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin dyld
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking whether make supports nested variables... (cached) yes
    checking for x86_64-apple-darwin-pkg-config... no
    checking for pkg-config... /usr/local/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for x86_64-apple-darwin-ar... no
    checking for ar... /usr/bin/ar
    checking for x86_64-apple-darwin-ranlib... no
    checking for ranlib... /usr/bin/ranlib
    checking for x86_64-apple-darwin-strip... no
    checking for strip... /usr/bin/strip
    checking for gcc... gcc
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... (cached) none needed
    checking whether gcc understands -c and -o together... (cached) yes
    checking dependency style of gcc... (cached) gcc3
    checking how to run the C preprocessor... gcc -E
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to accept ISO C89... (cached) none needed
    checking dependency style of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... gcc3
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings... yes
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -fvisibility=hidden... yes
    checking for __int128... no
    checking for __builtin_expect... yes
    checking native compiler: gcc... gcc does not produce working binaries. Please set CC_FOR_BUILD
    checking for x86_64 assembly availability... no
    checking gmp.h usability... no
    checking gmp.h presence... no
    checking for gmp.h... no
    checking for libcrypto... no
    checking openssl/crypto.h usability... no
    checking openssl/crypto.h presence... no
    checking for openssl/crypto.h... no
    checking whether byte ordering is bigendian... universal
    configure: Using static precomputation: no
    configure: Using assembly optimizations: no
    configure: Using field implementation: 32bit
    configure: Using bignum implementation: no
    configure: Using scalar implementation: 32bit
    configure: Using endomorphism optimizations: no
    configure: Building benchmarks: yes
    configure: Building for coverage analysis: no
    configure: Building ECDH module: no
    configure: Building ECDSA pubkey recovery module: no
    configure: Using jni: no
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating libsecp256k1.pc
    config.status: creating src/libsecp256k1-config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
      CC       src/bench_verify.o
      CC       src/libsecp256k1_la-secp256k1.lo
      CCLD     libsecp256k1.la
      CCLD     bench_verify
      CC       src/bench_sign.o
      CCLD     bench_sign
      CC       src/bench_internal-bench_internal.o
      CCLD     bench_internal
      CC       src/bench_ecmult-bench_ecmult.o
      CCLD     bench_ecmult
      CC       src/tests-tests.o
      CCLD     tests
      CC       src/exhaustive_tests-tests_exhaustive.o
      CCLD     exhaustive_tests
     build-aux/install-sh -c -d '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib'
     /bin/sh ./libtool   --mode=install /usr/bin/install -c   libsecp256k1.la '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib'
    libtool: install: /usr/bin/install -c .libs/libsecp256k1.0.dylib /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib/libsecp256k1.0.dylib
    libtool: install: (cd /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib && { ln -s -f libsecp256k1.0.dylib libsecp256k1.dylib || { rm -f libsecp256k1.dylib && ln -s libsecp256k1.0.dylib libsecp256k1.dylib; }; })
    libtool: install: /usr/bin/install -c .libs/libsecp256k1.lai /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib/libsecp256k1.la
    libtool: install: /usr/bin/install -c .libs/libsecp256k1.a /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib/libsecp256k1.a
    libtool: install: chmod 644 /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib/libsecp256k1.a
    libtool: install: /usr/bin/ranlib /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib/libsecp256k1.a
     build-aux/install-sh -c -d '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/include'
     /usr/bin/install -c -m 644 include/secp256k1.h '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/include'
     build-aux/install-sh -c -d '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib/pkgconfig'
     /usr/bin/install -c -m 644 libsecp256k1.pc '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib/pkgconfig'
    checking build system type... x86_64-apple-darwin17.4.0
    checking host system type... arm-apple-darwin
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-apple-darwin-strip... no
    checking for strip... strip
    checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking how to print strings... printf
    checking whether make supports the include directive... yes (GNU style)
    checking for arm-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... yes
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang accepts -g... yes
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to accept ISO C89... none needed
    checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang understands -c and -o together... yes
    checking dependency style of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... gcc3
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking for BSD- or MS-compatible name lister (nm)... no
    checking for arm-apple-darwin-dumpbin... no
    checking for arm-apple-darwin-link... no
    checking for dumpbin... no
    checking for link... link -dump
    checking the name lister (nm) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 196608
    checking how to convert x86_64-apple-darwin17.4.0 file names to arm-apple-darwin format... func_convert_file_noop
    checking how to convert x86_64-apple-darwin17.4.0 file names to toolchain format... func_convert_file_noop
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
    checking for arm-apple-darwin-objdump... no
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for arm-apple-darwin-dlltool... no
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for arm-apple-darwin-ar... no
    checking for ar... ar
    checking for archiver @FILE support... no
    checking for arm-apple-darwin-strip... strip
    checking for arm-apple-darwin-ranlib... no
    checking for ranlib... ranlib
    checking command to parse nm output from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang object... ok
    checking for sysroot... no
    checking for a working dd... /bin/dd
    checking how to truncate binary pipes... /bin/dd bs=4096 count=1
    checking for arm-apple-darwin-mt... no
    checking for mt... no
    checking if : is a manifest tool... no
    checking for arm-apple-darwin-dsymutil... no
    checking for dsymutil... dsymutil
    checking for arm-apple-darwin-nmedit... no
    checking for nmedit... nmedit
    checking for arm-apple-darwin-lipo... no
    checking for lipo... lipo
    checking for arm-apple-darwin-otool... no
    checking for otool... otool
    checking for arm-apple-darwin-otool64... no
    checking for otool64... no
    checking for -single_module linker flag... yes
    checking for -exported_symbols_list linker flag... yes
    checking for -force_load linker flag... yes
    checking how to run the C preprocessor... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -fno-rtti -fno-exceptions... yes
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to produce PIC... -fno-common -DPIC
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang PIC flag -fno-common -DPIC works... yes
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang static flag -static works... no
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -c -o file.o... yes
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -c -o file.o... (cached) yes
    checking whether the /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin dyld
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking whether make supports nested variables... (cached) yes
    checking for arm-apple-darwin-pkg-config... no
    checking for pkg-config... /usr/local/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for arm-apple-darwin-ar... no
    checking for ar... /usr/bin/ar
    checking for arm-apple-darwin-ranlib... no
    checking for ranlib... /usr/bin/ranlib
    checking for arm-apple-darwin-strip... no
    checking for strip... /usr/bin/strip
    checking for gcc... gcc
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... (cached) none needed
    checking whether gcc understands -c and -o together... (cached) yes
    checking dependency style of gcc... (cached) gcc3
    checking how to run the C preprocessor... gcc -E
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to accept ISO C89... (cached) none needed
    checking dependency style of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... gcc3
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings... yes
    checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -fvisibility=hidden... yes
    checking for __int128... no
    checking for __builtin_expect... yes
    checking native compiler: gcc... gcc does not produce working binaries. Please set CC_FOR_BUILD
    checking for x86_64 assembly availability... no
    checking gmp.h usability... no
    checking gmp.h presence... no
    checking for gmp.h... no
    checking for libcrypto... no
    checking openssl/crypto.h usability... no
    checking openssl/crypto.h presence... no
    checking for openssl/crypto.h... no
    checking whether byte ordering is bigendian... no
    configure: Using static precomputation: no
    configure: Using assembly optimizations: no
    configure: Using field implementation: 32bit
    configure: Using bignum implementation: no
    configure: Using scalar implementation: 32bit
    configure: Using endomorphism optimizations: no
    configure: Building benchmarks: yes
    configure: Building for coverage analysis: no
    configure: Building ECDH module: no
    configure: Building ECDSA pubkey recovery module: no
    configure: Using jni: no
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating libsecp256k1.pc
    config.status: creating src/libsecp256k1-config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
      CC       src/bench_verify.o
      CC       src/libsecp256k1_la-secp256k1.lo
      CCLD     libsecp256k1.la
      CCLD     bench_verify
      CC       src/bench_sign.o
      CCLD     bench_sign
      CC       src/bench_internal-bench_internal.o
      CCLD     bench_internal
      CC       src/bench_ecmult-bench_ecmult.o
      CCLD     bench_ecmult
      CC       src/tests-tests.o
      CCLD     tests
      CC       src/exhaustive_tests-tests_exhaustive.o
      CCLD     exhaustive_tests
     build-aux/install-sh -c -d '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib'
     /bin/sh ./libtool   --mode=install /usr/bin/install -c   libsecp256k1.la '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib'
    libtool: install: /usr/bin/install -c .libs/libsecp256k1.0.dylib /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib/libsecp256k1.0.dylib
    libtool: install: (cd /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib && { ln -s -f libsecp256k1.0.dylib libsecp256k1.dylib || { rm -f libsecp256k1.dylib && ln -s libsecp256k1.0.dylib libsecp256k1.dylib; }; })
    libtool: install: /usr/bin/install -c .libs/libsecp256k1.lai /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib/libsecp256k1.la
    libtool: install: /usr/bin/install -c .libs/libsecp256k1.a /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib/libsecp256k1.a
    libtool: install: chmod 644 /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib/libsecp256k1.a
    libtool: install: /usr/bin/ranlib /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib/libsecp256k1.a
     build-aux/install-sh -c -d '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/include'
     /usr/bin/install -c -m 644 include/secp256k1.h '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/include'
     build-aux/install-sh -c -d '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib/pkgconfig'
     /usr/bin/install -c -m 644 libsecp256k1.pc '/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib/pkgconfig'
    /Users/xx11dragon/Library/Caches/CocoaPods/Pods/Release/BitcoinKit/0.1.2-c2478/setup
    ++ dirname setup/build_libraries.sh
    + SCRIPT_DIR=setup
    + cd setup
    + sh build_secp256k1.sh
    ++ dirname build_secp256k1.sh
    + SCRIPT_DIR=.
    ++ mktemp -d
    + TDIR=/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr
    + trap '{ cd - ; rm -rf /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr; exit 255; }' SIGINT
    + cd /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr
    + git clone https://github.com/bitcoin-core/secp256k1.git src
    Cloning into 'src'...
    ++ pwd
    + CURRENTPATH=/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr
    + TARGETDIR_IPHONEOS=/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos
    + mkdir -p /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos
    + TARGETDIR_SIMULATOR=/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator
    + mkdir -p /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator
    + cd src
    + ./autogen.sh
    configure.ac:10: installing 'build-aux/compile'
    configure.ac:5: installing 'build-aux/config.guess'
    configure.ac:5: installing 'build-aux/config.sub'
    configure.ac:9: installing 'build-aux/install-sh'
    configure.ac:9: installing 'build-aux/missing'
    Makefile.am: installing 'build-aux/depcomp'
    parallel-tests: installing 'build-aux/test-driver'
    + cd src
    ++ xcrun -find clang
    ++ xcrun -sdk iphonesimulator --show-sdk-path
    ++ xcrun -find clang++
    ++ xcrun -sdk iphonesimulator --show-sdk-path
    + ./configure --host=x86_64-apple-darwin CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 'CFLAGS=-O3 -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk -fembed-bitcode-marker -mios-simulator-version-min=8.0' CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ 'CXXFLAGS=-O3 -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk -fembed-bitcode-marker -mios-simulator-version-min=8.0' --prefix=/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos
    configure: WARNING: using cross tools not prefixed with host triplet
    + make install
    ld: warning: -flat_namespace is deprecated on iOS
    ld: warning: -flat_namespace is deprecated on iOS
    + cd src
    ++ xcrun -find clang
    ++ xcrun -sdk iphoneos --show-sdk-path
    ++ xcrun -find clang++
    ++ xcrun -sdk iphoneos --show-sdk-path
    + ./configure --host=arm-apple-darwin CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 'CFLAGS=-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -fembed-bitcode -mios-version-min=8.0' CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ 'CXXFLAGS=-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -fembed-bitcode -mios-version-min=8.0' --prefix=/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator
    configure: WARNING: using cross tools not prefixed with host triplet
    + make install
    ld: warning: -flat_namespace is deprecated on iOS
    ld: warning: -flat_namespace is deprecated on iOS
    ld: warning: -flat_namespace is deprecated on iOS
    ld: warning: ./.libs/libsecp256k1.dylib has install name beginning with "/" but it is not from the specified SDK
    ld: warning: ./.libs/libsecp256k1.dylib has install name beginning with "/" but it is not from the specified SDK
    ld: warning: ./.libs/libsecp256k1.dylib has install name beginning with "/" but it is not from the specified SDK
    ld: warning: ./.libs/libsecp256k1.dylib has install name beginning with "/" but it is not from the specified SDK
    ld: warning: ./.libs/libsecp256k1.dylib has install name beginning with "/" but it is not from the specified SDK
    ld: warning: ./.libs/libsecp256k1.dylib has install name beginning with "/" but it is not from the specified SDK
    + cd -
    + mkdir -p ./../Libraries/secp256k1/lib
    + xcrun lipo -create /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphoneos/lib/libsecp256k1.a /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/.build/iphonesimulator/lib/libsecp256k1.a -o ./../Libraries/secp256k1/lib/libsecp256k1.a
    + cp -rf /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr/src/include ./../Libraries/secp256k1
    + rm -rf /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.kokP8Bfr
    + exit 0
    + cd setup
    + sh build_crypto.sh
    ++ pwd
    ++ dirname build_crypto.sh
    + SCRIPT_DIR=/Users/xx11dragon/Library/Caches/CocoaPods/Pods/Release/BitcoinKit/0.1.2-c2478/setup/.
    + OPENSSL_VERSION=1.0.2n
    ++ mktemp -d
    + TDIR=/var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.3bvmgIjk
    + trap '{ cd - ; rm -rf /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.3bvmgIjk; exit 255; }' SIGINT
    + cd /var/folders/y3/n5fmrpgd0915mjx4mqfj4lvh0000gn/T/tmp.3bvmgIjk
    + curl -O https://www.openssl.org/source/openssl-1.0.2n.tar.gz
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   352  100   352    0     0   1675      0 --:--:-- --:--:-- --:--:--  1676
    + tar zxf openssl-1.0.2n.tar.gz
    tar: Unrecognized archive format
    tar: Error exit delayed from previous errors.
    
    

    I not found reason...

    opened by xx11dragon 9
  • fyi - ld: library not found for -lsecp256k1 for architecture arm64

    fyi - ld: library not found for -lsecp256k1 for architecture arm64

    ld: warning: directory not found for option '-L/Users/johndpope/Documents/cryptoWorkspace/BitcoinKit/Libraries/crypto/lib' ld: warning: directory not found for option '-L/Users/johndpope/Documents/cryptoWorkspace/BitcoinKit/Libraries/secp256k1/lib' ld: library not found for -lsecp256k1 for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    seems like a mismatch on /lib subfolder.

    screen shot 2018-02-05 at 11 24 34 am screen shot 2018-02-05 at 11 28 35 am

    ripping out the /lib allows compiles library

    opened by johndpope 9
  • Swift Package Manager and Linux support

    Swift Package Manager and Linux support

    Added Package.swift and Linux support. It passes all tests on macOS and Linux.

    And I have made changes to Xcode based project(for Cocoapods, Carthage):

    • add BitcoinKitXcode compiler flag to change import declaration

    BitcoinKit.xcodeproj will conflict with Swift Package Manager generated xcodeproj. But it not affects for usage but for development.

    opened by novi 8
  • Problem installing via Carthage

    Problem installing via Carthage

    After installing with Carthage i receive an error Missing required module secp256k1

    There are no problems installing the framework with CocoaPods, though.

    reproduction needed 
    opened by Yaro812 8
  • HDPrivateKey derived bug, privateKey mast be 32 bytes

    HDPrivateKey derived bug, privateKey mast be 32 bytes

    This bug comes up occasionally. I solved the bug by:

    //in HDPrivateKey.swift
    extension HDPrivateKey {
    func bug_fix_ensure_32_bytes(data: Data) -> Data {
        let length = data.count
        if length >= 32 {
            return data
        }
        var dataFixed = Data()
        var int0 = UInt8(0)
        let data_0: Data = Data(buffer: UnsafeBufferPointer(start: &int0, count: 1))
        for i in 0..<32-length {
            dataFixed.append(data_0)
        }
        dataFixed.append(data)
        return dataFixed
    }
    }
    
    var privateKeyFixed = bug_fix_ensure_32_bytes(data: keys[0])
    var chainCodeFixed = bug_fix_ensure_32_bytes(data: keys[1])
    
    bug reproduction needed 
    opened by Jax1993 6
  • enhancement - wallet - surface visibility of  mainnet / testnet

    enhancement - wallet - surface visibility of mainnet / testnet

    public static let mainnet: Network = Mainnet()
    public static let testnet: Network = Testnet()
    

    or show maybe just some way to control this flow from app developer without modifying Bitcoinkit.

    opened by johndpope 6
  • How to create a transaction which contains two or more inputs

    How to create a transaction which contains two or more inputs

    Thanks a lot for this repo and your hard work.

    I have learned a lot from it.

    I have passed the unit test in file unitTest .

    The testSignTransaction1 shows the step how to create a transaction contains a input and two outputs.

    But I don't know how to create a transaction which contains two or more inputs.

    • Details:

    Transaction toAddress is mgU6dEQBFpwdSD46Qq2MoMw1tCBi3hEmvy, toValue is 95000000 . And I have two inputs which hash-value-script is below:

    input 1 :
    hash: 2eb9d00e2448aea9601df8f4326ee6d753e80c3d261e78795da7b20bb5d451f3
    value: 68000000
    script: 76a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac
    
    input 2:
    hash: 02e7c0a97dee2f31d4fe181c735fb32f8166664f7630c713d003f584cfafb490
    value: 32500000
    script: 76a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac
    
    

    Detail Link is input 1 or input 2

    The privateKey(wif) in (btc testnet) is cVX5NApUtWqrJneZK2PYsjqcbJvSZVU4Wh7CEF9CQP9Qwa2pCANV and from address is mrr3KvFX3Ekzw5Zjys7VJ1PVf3v9WDcuFq

    I have tried two method.

    • Methods One:
        func testSignTransaction3() {
            // Transaction in testnet3
            // https://api.blockcypher.com/v1/btc/test3/txs/0189910c263c4d416d5c5c2cf70744f9f6bcd5feaf0b149b02e5d88afbe78992
    
            // build input1
            let prevTxID = "2eb9d00e2448aea9601df8f4326ee6d753e80c3d261e78795da7b20bb5d451f3"
            let hash = Data(Data(hex: prevTxID).reversed())
            let index: UInt32 = 1
            let outpoint = BTCTransaction.OutPoint(transactionHash: hash, index: index)
            let subScript = Data(hex: "76a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac")
            let inputForSign = BTCTransaction.Input(outPoint: outpoint, signatureScript: subScript, sequence: UInt32.max)
    
            // build input2
            let prevTxID2 = "02e7c0a97dee2f31d4fe181c735fb32f8166664f7630c713d003f584cfafb490"
            let hash2 = Data(Data(hex: prevTxID2).reversed())
            let index2: UInt32 = 0
            let outpoint2 = BTCTransaction.OutPoint(transactionHash: hash2, index: index2)
            let subScript2 = Data(hex: "76a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac")
            let inputForSign2 = BTCTransaction.Input(outPoint: outpoint2, signatureScript: subScript2, sequence: UInt32.max)
    
            // build output
            let balance: Int64 =  68000000
            let balance2: Int64 = 32500000
            let amount: Int64  =  95000000
            let fee: Int64     =   2000000
    
            let toAddress = "mgU6dEQBFpwdSD46Qq2MoMw1tCBi3hEmvy" // https://testnet.coinfaucet.eu/en/
            let toPubKeyHash = Base58.decode(toAddress).dropFirst().dropLast(4)
    
            let privateKey = try! PrivateKey(wif: "cVX5NApUtWqrJneZK2PYsjqcbJvSZVU4Wh7CEF9CQP9Qwa2pCANV")
            let fromPublicKey = privateKey.publicKey()
    
            XCTAssertEqual(fromPublicKey.raw.hex, "03ecb24876e81293acca623d39dbc74ad23d2483e14ba2cbb86ac6d75eb5689d29")
    
            let fromPubKeyHash = Crypto.sha256ripemd160(fromPublicKey.raw)
    
            let lockingScript1 = Script.buildPublicKeyHashOut(pubKeyHash: toPubKeyHash)
            let lockingScript2 = Script.buildPublicKeyHashOut(pubKeyHash: fromPubKeyHash)
    
            XCTAssertEqual(lockingScript1.hex, "76a9140a6dd4fc6b19713621871f01fd9cfc37feb5026788ac")
            XCTAssertEqual(lockingScript2.hex, "76a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac")
    
            let sending = BTCTransaction.Output(value: amount, lockingScript: lockingScript1)
            let payback = BTCTransaction.Output(value: balance + balance2 - amount - fee, lockingScript: lockingScript2)
    
            // build signed BTCTransaction input1
            let _tx = BTCTransaction(version: 1, inputs: [inputForSign, inputForSign2], outputs: [sending, payback], lockTime: 0)
            let hashType: SighashType = SighashType.BTC.SINGLE
            let _txHash = Crypto.doubleSHA256(_tx.bitcoinData + UInt32(hashType).littleEndian)
    
            XCTAssertEqual(_txHash.hex, "28ab5307bb98d78a10514faa6fbbba7bc7881d5eb3f885e110c713ed40f9024a")
    
            guard let signature: Data = try? Crypto.sign(_txHash, privateKey: privateKey) else {
                XCTFail("failed to sign")
                return
            }
    
            XCTAssertEqual(signature.hex, "3045022100ef6aa7c8548a62b20a0edda83c90bc7841ede71d6e745eb8fb969f8b5047f00a022024288fa32844be4fe8cdfafb487e95158202b736aa81402cb20c9b172667a3d3")
            // scriptSig: <sig> <pubKey>
            var unlockingScript: Data = Data([UInt8(signature.count + 1)]) + signature + UInt8(hashType)
            unlockingScript += UInt8(fromPublicKey.raw.count)
            unlockingScript += fromPublicKey.raw
    
            let input = BTCTransaction.Input(outPoint: outpoint, signatureScript: unlockingScript, sequence: UInt32.max)
            let input2 = BTCTransaction.Input(outPoint: outpoint2, signatureScript: unlockingScript, sequence: UInt32.max)
    
            // build BTCTransaction
            let transaction = BTCTransaction(version: 1, inputs: [input, input2], outputs: [sending, payback], lockTime: 0)
    
            let expect = Data(hex: "0100000002f351d4b50bb2a75d79781e263d0ce853d7e66e32f4f81d60a9ae48240ed0b92e010000006b483045022100ef6aa7c8548a62b20a0edda83c90bc7841ede71d6e745eb8fb969f8b5047f00a022024288fa32844be4fe8cdfafb487e95158202b736aa81402cb20c9b172667a3d3032103ecb24876e81293acca623d39dbc74ad23d2483e14ba2cbb86ac6d75eb5689d29ffffffff90b4afcf84f503d013c730764f6666812fb35f731c18fed4312fee7da9c0e702000000006b483045022100ef6aa7c8548a62b20a0edda83c90bc7841ede71d6e745eb8fb969f8b5047f00a022024288fa32844be4fe8cdfafb487e95158202b736aa81402cb20c9b172667a3d3032103ecb24876e81293acca623d39dbc74ad23d2483e14ba2cbb86ac6d75eb5689d29ffffffff02c095a905000000001976a9140a6dd4fc6b19713621871f01fd9cfc37feb5026788ace0673500000000001976a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac00000000")
            XCTAssertEqual(transaction.bitcoinData.hex, expect.hex)
            XCTAssertEqual(transaction.txID, "430bafc24b6724028af4455ebfc320b12bec24ca850376910a8302e00246af96")
        }
    
    
    • Methods Two:
        func testSignTransaction4() {
            // Transaction in testnet3
            // https://api.blockcypher.com/v1/btc/test3/txs/0189910c263c4d416d5c5c2cf70744f9f6bcd5feaf0b149b02e5d88afbe78992
    
            // build input1
            let prevTxID = "2eb9d00e2448aea9601df8f4326ee6d753e80c3d261e78795da7b20bb5d451f3"
            let hash = Data(Data(hex: prevTxID).reversed())
            let index: UInt32 = 1
            let outpoint = BTCTransaction.OutPoint(transactionHash: hash, index: index)
            let subScript = Data(hex: "76a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac")
            let inputForSign = BTCTransaction.Input(outPoint: outpoint, signatureScript: subScript, sequence: UInt32.max)
    
            // build input2
            let prevTxID2 = "02e7c0a97dee2f31d4fe181c735fb32f8166664f7630c713d003f584cfafb490"
            let hash2 = Data(Data(hex: prevTxID2).reversed())
            let outpoint2 = BTCTransaction.OutPoint(transactionHash: hash2, index: 0)
            let subScript2 = Data(hex: "76a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac")
            let inputForSign2 = BTCTransaction.Input(outPoint: outpoint2, signatureScript: subScript2, sequence: UInt32.max)
    
            // build output
            let balance: Int64 =  68000000
            let balance2: Int64 = 32500000
            let amount: Int64  =  95000000
            let fee: Int64     =   2000000
    
            let toAddress = "mgU6dEQBFpwdSD46Qq2MoMw1tCBi3hEmvy" // https://testnet.coinfaucet.eu/en/
            let toPubKeyHash = Base58.decode(toAddress).dropFirst().dropLast(4)
    
            let privateKey = try! PrivateKey(wif: "cVX5NApUtWqrJneZK2PYsjqcbJvSZVU4Wh7CEF9CQP9Qwa2pCANV")
            let fromPublicKey = privateKey.publicKey()
    
            XCTAssertEqual(fromPublicKey.raw.hex, "03ecb24876e81293acca623d39dbc74ad23d2483e14ba2cbb86ac6d75eb5689d29")
    
            let fromPubKeyHash = Crypto.sha256ripemd160(fromPublicKey.raw)
    
            let lockingScript1 = Script.buildPublicKeyHashOut(pubKeyHash: toPubKeyHash)
            let lockingScript2 = Script.buildPublicKeyHashOut(pubKeyHash: fromPubKeyHash)
    
            XCTAssertEqual(lockingScript1.hex, "76a9140a6dd4fc6b19713621871f01fd9cfc37feb5026788ac")
            XCTAssertEqual(lockingScript2.hex, "76a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac")
    
    
            let sending = BTCTransaction.Output(value: amount, lockingScript: lockingScript1)
            let payback = BTCTransaction.Output(value: balance + balance2 - amount - fee, lockingScript: lockingScript2)
    
    
            // build signed BTCTransaction input1
            let _tx = BTCTransaction(version: 1, inputs: [inputForSign], outputs: [sending, payback], lockTime: 0)
            let hashType: SighashType = SighashType.BTC.SINGLE
            let _txHash = Crypto.doubleSHA256(_tx.bitcoinData + UInt32(hashType).littleEndian)
    
            XCTAssertEqual(_txHash.hex, "23bce5a777f3c90d73c5f0af2b03c9faccd08b37c3c6a982165814a714ff9265")
    
            guard let signature: Data = try? Crypto.sign(_txHash, privateKey: privateKey) else {
                XCTFail("failed to sign")
                return
            }
            XCTAssertEqual(signature.hex, "3044022037533c68e544db72b0ad27e0514626408e9c4e447a61566a0ad2343ee02c3d4102206574f4bef4c27b64b3ba570bc9d95b9bd8b827f28d2151f314cc5310196f06d2")
            // scriptSig: <sig> <pubKey>
            var unlockingScript: Data = Data([UInt8(signature.count + 1)]) + signature + UInt8(hashType)
            unlockingScript += UInt8(fromPublicKey.raw.count)
            unlockingScript += fromPublicKey.raw
            let input = BTCTransaction.Input(outPoint: outpoint, signatureScript: unlockingScript, sequence: UInt32.max)
    
            // build signed BTCTransaction input2
            let _tx2 = BTCTransaction(version: 1, inputs: [inputForSign2], outputs: [sending, payback], lockTime: 0)
            let _txHash2 = Crypto.doubleSHA256(_tx2.bitcoinData + UInt32(hashType).littleEndian)
    
            XCTAssertEqual(_txHash2.hex, "444c452e767c626f6fc1c1b940b27cf246f71a2f37ed4e39b5339e8c8f1ca5fc")
    
            guard let signature2: Data = try? Crypto.sign(_txHash2, privateKey: privateKey) else {
                XCTFail("failed to sign")
                return
            }
            XCTAssertEqual(signature.hex, "3044022037533c68e544db72b0ad27e0514626408e9c4e447a61566a0ad2343ee02c3d4102206574f4bef4c27b64b3ba570bc9d95b9bd8b827f28d2151f314cc5310196f06d2")
            // scriptSig: <sig> <pubKey>
            var unlockingScript2: Data = Data([UInt8(signature2.count + 1)]) + signature2 + UInt8(hashType)
            unlockingScript2 += UInt8(fromPublicKey.raw.count)
            unlockingScript2 += fromPublicKey.raw
            let input2 = BTCTransaction.Input(outPoint: outpoint2, signatureScript: unlockingScript2, sequence: UInt32.max)
    
    
            // build BTCTransaction
            let transaction = BTCTransaction(version: 1, inputs: [input, input2], outputs: [sending, payback], lockTime: 0)
    
            let expect = Data(hex: "0100000002f351d4b50bb2a75d79781e263d0ce853d7e66e32f4f81d60a9ae48240ed0b92e010000006a473044022037533c68e544db72b0ad27e0514626408e9c4e447a61566a0ad2343ee02c3d4102206574f4bef4c27b64b3ba570bc9d95b9bd8b827f28d2151f314cc5310196f06d2032103ecb24876e81293acca623d39dbc74ad23d2483e14ba2cbb86ac6d75eb5689d29ffffffff90b4afcf84f503d013c730764f6666812fb35f731c18fed4312fee7da9c0e702000000006b483045022100a5a602528de5f741ab58fa62ae0d51a1813f36642172d986ef3342ad36cf6fc1022050beb570a28e5708844b98880c9d984919fa7de3efdef10d0c7fd97c787025a8032103ecb24876e81293acca623d39dbc74ad23d2483e14ba2cbb86ac6d75eb5689d29ffffffff02c095a905000000001976a9140a6dd4fc6b19713621871f01fd9cfc37feb5026788ace0673500000000001976a9147c457cce7d24a467ff39d157d3e3c1371bf2b6c888ac00000000")
            XCTAssertEqual(transaction.bitcoinData.hex, expect.hex)
            XCTAssertEqual(transaction.txID, "ca56271ffb2ada14f3624125cd3ba5bc14ab00b7d7cd334ba6f70edac3ff904b")
        }
    
    

    testSignTransaction3 and testSignTransaction4 both passed unit test.

    I paste transaction.bitcoinData.hex value to this page https://live.blockcypher.com/btc/pushtx/ Transaction Hex* and select Bitcoin Testnet, then click Broadcast Transaction.

    And both verified failed. Both show Error validating transaction: Error running script for input 0 referencing 2eb9d00e2448aea9601df8f4326ee6d753e80c3d261e78795da7b20bb5d451f3 at 1: Script was NOT verified successfully..

    I don't know why. It cost me a lot time to try. Can you help me? After solved this problem, I will make a PR if you pleasure. Thanks a lot.

    question 
    opened by SunLn 5
  • Issue with Cocoapods

    Issue with Cocoapods

    Hello, @kishikawakatsumi I would like to install your library, but have problem with installing by cocoapods.

    Here is error which I have get after pod install

    [!] /bin/bash -c set -e sh setup/build_libraries.sh

    ++ dirname setup/build_libraries.sh

    • SCRIPT_DIR=setup
    • cd setup
    • sh build_secp256k1.sh ++ dirname build_secp256k1.sh
    • SCRIPT_DIR=. ++ mktemp -d
    • TDIR=/var/folders/fn/vxjk2qq566n44mcp2sg0qgph0000gn/T/tmp.UZNMtVVk
    • trap '{ cd - ; rm -rf /var/folders/fn/vxjk2qq566n44mcp2sg0qgph0000gn/T/tmp.UZNMtVVk; exit 255; }' SIGINT
    • cd /var/folders/fn/vxjk2qq566n44mcp2sg0qgph0000gn/T/tmp.UZNMtVVk
    • git clone https://github.com/bitcoin-core/secp256k1.git src Cloning into 'src'... ++ pwd
    • CURRENTPATH=/var/folders/fn/vxjk2qq566n44mcp2sg0qgph0000gn/T/tmp.UZNMtVVk
    • TARGETDIR_IPHONEOS=/var/folders/fn/vxjk2qq566n44mcp2sg0qgph0000gn/T/tmp.UZNMtVVk/.build/iphoneos
    • mkdir -p /var/folders/fn/vxjk2qq566n44mcp2sg0qgph0000gn/T/tmp.UZNMtVVk/.build/iphoneos
    • TARGETDIR_SIMULATOR=/var/folders/fn/vxjk2qq566n44mcp2sg0qgph0000gn/T/tmp.UZNMtVVk/.build/iphonesimulator
    • mkdir -p /var/folders/fn/vxjk2qq566n44mcp2sg0qgph0000gn/T/tmp.UZNMtVVk/.build/iphonesimulator
    • cd src
    • ./autogen.sh ./autogen.sh: line 3: autoreconf: command not found

    If you met this error, could you please explain me solution of that problem

    Thanks

    Regards

    opened by Dubickiy 5
  • Why does pod install fail all the time?

    Why does pod install fail all the time?

    Current behavior

    ` glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. glibtoolize: copying file 'build-aux/ltmain.sh' glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'. glibtoolize: copying file 'build-aux/m4/libtool.m4' glibtoolize: copying file 'build-aux/m4/ltoptions.m4' glibtoolize: copying file 'build-aux/m4/ltsugar.m4' glibtoolize: copying file 'build-aux/m4/ltversion.m4' glibtoolize: copying file 'build-aux/m4/lt~obsolete.m4' checking build system type... x86_64-apple-darwin21.4.0 checking host system type... x86_64-apple-darwin checking for a BSD-compatible install... /usr/local/bin/ginstall -c checking whether build environment is sane... yes checking for x86_64-apple-darwin-strip... no checking for strip... strip checking for a race-free mkdir -p... /usr/local/bin/gmkdir -p checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for x86_64-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang accepts -g... yes checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to enable C11 features... none needed checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... gcc3 checking dependency style of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... gcc3 checking for x86_64-apple-darwin-ar... no checking for x86_64-apple-darwin-lib... no checking for x86_64-apple-darwin-link... no checking for ar... ar checking the archiver (ar) interface... ar checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... no checking for x86_64-apple-darwin-dumpbin... no checking for x86_64-apple-darwin-link... no checking for dumpbin... no checking for link... link -dump checking the name lister (nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 786432 checking how to convert x86_64-apple-darwin21.4.0 file names to x86_64-apple-darwin format... func_convert_file_noop checking how to convert x86_64-apple-darwin21.4.0 file names to toolchain format... func_convert_file_noop checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r checking for x86_64-apple-darwin-file... no checking for file... file checking for x86_64-apple-darwin-objdump... no checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for x86_64-apple-darwin-dlltool... no checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for x86_64-apple-darwin-ar... ar checking for archiver @FILE support... no checking for x86_64-apple-darwin-strip... strip checking for x86_64-apple-darwin-ranlib... no checking for ranlib... ranlib checking command to parse nm output from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for x86_64-apple-darwin-mt... no checking for mt... no checking if : is a manifest tool... no checking for x86_64-apple-darwin-dsymutil... no checking for dsymutil... dsymutil checking for x86_64-apple-darwin-nmedit... no checking for nmedit... nmedit checking for x86_64-apple-darwin-lipo... no checking for lipo... lipo checking for x86_64-apple-darwin-otool... no checking for otool... otool checking for x86_64-apple-darwin-otool64... no checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -fno-rtti -fno-exceptions... yes checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to produce PIC... -fno-common -DPIC checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang PIC flag -fno-common -DPIC works... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang static flag -static works... no checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -c -o file.o... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -c -o file.o... (cached) yes checking whether the /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Werror=unknown-warning-option... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wno-overlength-strings... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wall... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wno-unused-function... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wextra... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wcast-align... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wcast-align=strict... no checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wconditional-uninitialized... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -fvisibility=hidden... yes checking for valgrind support... checking for x86_64 assembly availability... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libsecp256k1.pc config.status: creating src/libsecp256k1-config.h config.status: executing depfiles commands config.status: executing libtool commands

    Build Options: with external callbacks = no with benchmarks = yes with tests = yes with coverage = no with examples = no module ecdh = no module recovery = no module extrakeys = no module schnorrsig = no

    asm = no ecmult window size = 15 ecmult gen prec. bits = 4

    valgrind = no CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang CPPFLAGS =
    SECP_CFLAGS = -O2 -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-overlength-strings -Wall -Wno-unused-function -Wextra -Wcast-align -Wconditional-uninitialized -fvisibility=hidden CFLAGS = -O3 -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk -fembed-bitcode-marker -mios-simulator-version-min=8.0 LDFLAGS = /Applications/Xcode.app/Contents/Developer/usr/bin/make install-am CC src/bench.o CC src/libsecp256k1_la-secp256k1.lo CC src/libsecp256k1_precomputed_la-precomputed_ecmult.lo CC src/libsecp256k1_precomputed_la-precomputed_ecmult_gen.lo CCLD libsecp256k1_precomputed.la CCLD libsecp256k1.la CCLD bench CC src/bench_internal-bench_internal.o CCLD bench_internal CC src/bench_ecmult-bench_ecmult.o CCLD bench_ecmult CC src/tests-tests.o CCLD tests CC src/exhaustive_tests-tests_exhaustive.o CCLD exhaustive_tests /usr/local/bin/gmkdir -p '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib' /bin/sh ./libtool --mode=install /usr/local/bin/ginstall -c libsecp256k1.la '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib' libtool: install: /usr/local/bin/ginstall -c .libs/libsecp256k1.0.dylib /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib/libsecp256k1.0.dylib libtool: install: (cd /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib && { ln -s -f libsecp256k1.0.dylib libsecp256k1.dylib || { rm -f libsecp256k1.dylib && ln -s libsecp256k1.0.dylib libsecp256k1.dylib; }; }) libtool: install: /usr/local/bin/ginstall -c .libs/libsecp256k1.lai /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib/libsecp256k1.la libtool: install: /usr/local/bin/ginstall -c .libs/libsecp256k1.a /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib/libsecp256k1.a libtool: install: chmod 644 /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib/libsecp256k1.a libtool: install: ranlib /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib/libsecp256k1.a /usr/local/bin/gmkdir -p '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/include' /usr/local/bin/ginstall -c -m 644 include/secp256k1.h include/secp256k1_preallocated.h '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/include' /usr/local/bin/gmkdir -p '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib/pkgconfig' /usr/local/bin/ginstall -c -m 644 libsecp256k1.pc '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib/pkgconfig' checking build system type... x86_64-apple-darwin21.4.0 checking host system type... arm-apple-darwin checking for a BSD-compatible install... /usr/local/bin/ginstall -c checking whether build environment is sane... yes checking for arm-apple-darwin-strip... no checking for strip... strip checking for a race-free mkdir -p... /usr/local/bin/gmkdir -p checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for arm-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang accepts -g... yes checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to enable C11 features... none needed checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... gcc3 checking dependency style of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... gcc3 checking for arm-apple-darwin-ar... no checking for arm-apple-darwin-lib... no checking for arm-apple-darwin-link... no checking for ar... ar checking the archiver (ar) interface... ar checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... no checking for arm-apple-darwin-dumpbin... no checking for arm-apple-darwin-link... no checking for dumpbin... no checking for link... link -dump checking the name lister (nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 786432 checking how to convert x86_64-apple-darwin21.4.0 file names to arm-apple-darwin format... func_convert_file_noop checking how to convert x86_64-apple-darwin21.4.0 file names to toolchain format... func_convert_file_noop checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r checking for arm-apple-darwin-file... no checking for file... file checking for arm-apple-darwin-objdump... no checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for arm-apple-darwin-dlltool... no checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for arm-apple-darwin-ar... ar checking for archiver @FILE support... no checking for arm-apple-darwin-strip... strip checking for arm-apple-darwin-ranlib... no checking for ranlib... ranlib checking command to parse nm output from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for arm-apple-darwin-mt... no checking for mt... no checking if : is a manifest tool... no checking for arm-apple-darwin-dsymutil... no checking for dsymutil... dsymutil checking for arm-apple-darwin-nmedit... no checking for nmedit... nmedit checking for arm-apple-darwin-lipo... no checking for lipo... lipo checking for arm-apple-darwin-otool... no checking for otool... otool checking for arm-apple-darwin-otool64... no checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -fno-rtti -fno-exceptions... yes checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang option to produce PIC... -fno-common -DPIC checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang PIC flag -fno-common -DPIC works... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang static flag -static works... no checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -c -o file.o... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -c -o file.o... (cached) yes checking whether the /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Werror=unknown-warning-option... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wno-overlength-strings... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wall... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wno-unused-function... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wextra... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wcast-align... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wcast-align=strict... no checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -Wconditional-uninitialized... yes checking if /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang supports -fvisibility=hidden... yes checking for valgrind support... checking for x86_64 assembly availability... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libsecp256k1.pc config.status: creating src/libsecp256k1-config.h config.status: src/libsecp256k1-config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands

    Build Options: with external callbacks = no with benchmarks = yes with tests = yes with coverage = no with examples = no module ecdh = no module recovery = no module extrakeys = no module schnorrsig = no

    asm = no ecmult window size = 15 ecmult gen prec. bits = 4

    valgrind = no CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang CPPFLAGS =
    SECP_CFLAGS = -O2 -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-overlength-strings -Wall -Wno-unused-function -Wextra -Wcast-align -Wconditional-uninitialized -fvisibility=hidden CFLAGS = -O3 -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk -fembed-bitcode -mios-version-min=8.0 LDFLAGS = /Applications/Xcode.app/Contents/Developer/usr/bin/make install-am /usr/local/bin/gmkdir -p '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib' /bin/sh ./libtool --mode=install /usr/local/bin/ginstall -c libsecp256k1.la '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib' libtool: install: /usr/local/bin/ginstall -c .libs/libsecp256k1.0.dylib /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib/libsecp256k1.0.dylib libtool: install: (cd /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib && { ln -s -f libsecp256k1.0.dylib libsecp256k1.dylib || { rm -f libsecp256k1.dylib && ln -s libsecp256k1.0.dylib libsecp256k1.dylib; }; }) libtool: install: /usr/local/bin/ginstall -c .libs/libsecp256k1.lai /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib/libsecp256k1.la libtool: install: /usr/local/bin/ginstall -c .libs/libsecp256k1.a /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib/libsecp256k1.a libtool: install: chmod 644 /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib/libsecp256k1.a libtool: install: ranlib /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib/libsecp256k1.a /usr/local/bin/gmkdir -p '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/include' /usr/local/bin/ginstall -c -m 644 include/secp256k1.h include/secp256k1_preallocated.h '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/include' /usr/local/bin/gmkdir -p '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib/pkgconfig' /usr/local/bin/ginstall -c -m 644 libsecp256k1.pc '/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib/pkgconfig' /Users/xingdaomacmini/Library/Caches/CocoaPods/Pods/Release/BitcoinKit/1.1.0-a8c19/setup ++ dirname setup/build_libraries.sh

    • SCRIPT_DIR=setup
    • cd setup
    • sh build_secp256k1.sh ++ dirname build_secp256k1.sh
    • SCRIPT_DIR=. ++ mktemp -d
    • TDIR=/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB
    • trap '{ cd - ; rm -rf /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB; exit 255; }' SIGINT
    • cd /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB
    • git clone https://github.com/bitcoin-core/secp256k1.git src Cloning into 'src'... ++ pwd
    • CURRENTPATH=/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB
    • TARGETDIR_IPHONEOS=/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos
    • mkdir -p /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos
    • TARGETDIR_SIMULATOR=/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator
    • mkdir -p /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator
    • cd src
    • ./autogen.sh configure.ac:37: installing 'build-aux/ar-lib' configure.ac:35: installing 'build-aux/compile' configure.ac:24: installing 'build-aux/config.guess' configure.ac:24: installing 'build-aux/config.sub' configure.ac:30: installing 'build-aux/install-sh' configure.ac:30: installing 'build-aux/missing' Makefile.am: installing 'build-aux/depcomp' parallel-tests: installing 'build-aux/test-driver'
    • cd src ++ xcrun -find clang ++ xcrun -sdk iphonesimulator --show-sdk-path ++ xcrun -find clang++ ++ xcrun -sdk iphonesimulator --show-sdk-path
    • ./configure --host=x86_64-apple-darwin CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 'CFLAGS=-O3 -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk -fembed-bitcode-marker -mios-simulator-version-min=8.0' CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ 'CXXFLAGS=-O3 -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk -fembed-bitcode-marker -mios-simulator-version-min=8.0' --prefix=/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos configure: WARNING: using cross tools not prefixed with host triplet
    • make install
    • cd src ++ xcrun -find clang ++ xcrun -sdk iphoneos --show-sdk-path ++ xcrun -find clang++ ++ xcrun -sdk iphoneos --show-sdk-path
    • ./configure --host=arm-apple-darwin CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 'CFLAGS=-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk -fembed-bitcode -mios-version-min=8.0' CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ 'CXXFLAGS=-O3 -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk -fembed-bitcode -mios-version-min=8.0' --prefix=/var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator configure: WARNING: using cross tools not prefixed with host triplet
    • make install libtool: warning: remember to run 'libtool --finish /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib'
    • cd -
    • mkdir -p ./../Libraries/secp256k1/lib
    • xcrun lipo -create /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib/libsecp256k1.a /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib/libsecp256k1.a -o ./../Libraries/secp256k1/lib/libsecp256k1.a fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphoneos/lib/libsecp256k1.a and /var/folders/6p/3wv50zjs69x0gv7lb4l_qdgc0000gn/T/tmp.yovfGnsB/.build/iphonesimulator/lib/libsecp256k1.a have the same architectures (i386) and can't be in the same fat output file `

    Expected behavior

    Why does pod install fail all the time? Please handle it. Thank you.

    Steps to reproduce

    Environment

    • BitcoinKit: pod 'BitcoinKit', '~> 1.1.0'
    • Xcode Version: 13.4.1
    • Swift Version: 5.1
    opened by developerjet 0
  • Cannot send BTC to any wallet

    Cannot send BTC to any wallet

    When I send BTC to any wallet (testNet or mainNet) I receive "emptyOutputs" error. I tried it in my application using BitcoinKit 0.15.4. I tried to do in your example the result is the same BitcoinKit 0.18

    BitcoinKit: 0.15.4 Xcode Version: 13.2 Swift Version: 13.0

    opened by alexj70 1
  • Cannot receive fee

    Cannot receive fee

    Hi.

    Cannot receive the fee

    address of test wallet is "mtz74qT7WgtynjXEDpRUBMvpAPYGAhmJnq", balance: 0.0004 BTC

    var pluginData = UInt8: IPluginData if timeLockEnabled { pluginData[HodlerPlugin.id] = HodlerData(lockTimeInterval: self.selectedTimeInterval) }

            let fee = try bitcoinKit.fee(for: 10000, toAddress: toWallet, feeRate: 10000, pluginData: pluginData)
    

    I receive error: notEnough

    Environment

    • BitcoinKit: 0.15.4
    • Xcode Version: 13.2
    • Swift Version: 13.0
    opened by alexj70 0
  • 'OP_CHECKSEQUENCEVERIFY' mainProcess error

    'OP_CHECKSEQUENCEVERIFY' mainProcess error

    In OP_CHECKSEQUENCEVERIFY.swift guard nSequence <= txToSequenceMasked else

    correct way: guard nSequenceMasked <= txToSequenceMasked else

    check in bip-0112

    opened by QiuDaniel 0
  • Is BitcoinAddress legacy wrong when HashType is .scriptHash ?

    Is BitcoinAddress legacy wrong when HashType is .scriptHash ?

    In BitcoinAddress+Legacy.swift public var legacy: String { switch hashType { case .pubkeyHash: return Base58Check.encode([network.pubkeyhash] + data) case .scriptHash: return Base58Check.encode([network.pubkeyhash] + data) } }

    correct way: case .scriptHash: return Base58Check.encode([network.scripthash] + data)

    opened by QiuDaniel 0
Releases(v1.1.0)
Owner
Yenom - The simplest Bitcoin wallet -
Yenom is the simplest Bitcoin(BCH) wallet.
Yenom - The simplest Bitcoin wallet -
Bitcoin-price - Application to consult the current price of a Bitcoin in different currencies

bitcoin-price Aplicativo para consultar o preço atual de um Bitcoin em diversas

Bruno Lopes 0 Jan 9, 2022
BitcoinCore for Bitcoin, BitcoinCash(ABC), Litecoin and Dash wallet toolkit for Swift.

BitcoinCore for Bitcoin, BitcoinCash(ABC), Litecoin and Dash wallet toolkit for Swift. This is a full implementation of SPV node including wallet creation/restore, synchronization with network, send/receive transactions, and more.

Horizontal Systems 4 Nov 23, 2022
Multi-wallet for Bitcoin, Ethereum, Binance Smart Chain and other emerging blockchains

Multi-wallet for Bitcoin, Ethereum, Binance Smart Chain and other emerging blockchains. Non-custodial storage, decentralized exchange, and extensive analytics for thousands of tokens and NFTs. Implemented on Swift.

Horizontal Systems 446 Jan 3, 2023
Ethereum Wallet Toolkit for iOS - You can implement an Ethereum wallet without a server and blockchain knowledge.

Introduction EtherWalletKit is an Ethereum Wallet Toolkit for iOS. I hope cryptocurrency and decentralized token economy become more widely adapted. H

Sung Woo Chang 136 Dec 25, 2022
CryptoSwift - Crypto related functions and helpers for Swift implemented in Swift

CryptoSwift Crypto related functions and helpers for Swift implemented in Swift.

Kushal Shingote 2 Feb 6, 2022
Kukai Crypto Swift is a native Swift library for creating regular or HD wallets for the Tezos blockchain

Kukai Crypto Swift Kukai Crypto Swift is a native Swift library for creating regular and HD key pairs for the Tezos blockchain. Supporting both TZ1 (E

Kukai Wallet 2 Aug 18, 2022
A pure swift Ethereum Web3 library

⚗️ Web3 Web3.swift is a Swift library for signing transactions and interacting with Smart Contracts in the Ethereum Network. It allows you to connect

null 484 Dec 16, 2022
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions on Ethereum network.

You can ask for help in our Discord Channel web3swift Swift implementation of web3.js functionality ⚡ Interaction with remote node via JSON RPC ?? Sma

BANKEX - Proof-of-Asset Protocol 487 Mar 25, 2022
EthereumKit is a free, open-source Swift framework for easily interacting with the Ethereum.

EthereumKit is a Swift framework that enables you to create Ethereum wallet and use it in your app. // BIP39: Generate seed and mnemonic sentence. le

Ryo Fukuda 458 Dec 31, 2022
This library provides convenient way to use Coinpaprika.com API in Swift.

Coinpaprika API Swift Client Documentation | Repository | Installation Usage This library provides convenient way to use Coinpaprika.com API in Swift.

Coinpaprika 30 Dec 21, 2021
A simple Proof-of-Work Blockchain built in Swift

Blockchain in Swift A simple Proof-of-Work Blockchain built in Swift. Requirements Xcode 13.0 Swift 5.2 Vapor 4.49 Swift NIO 2.33.0 Getting started Cl

Felipe Ricieri 5 Sep 25, 2022
IOTA wallet.rs Swift binding

IOTA wallet.rs Swift Binding Swift binding for the official wallet.rs Rust library for IOTA Ledger. The Swift binding links and communicates with the

Pasquale Ambrosini 5 Jun 13, 2022
Web3keystore - Ethereum keystore logic, in Swift

web3keystore A module for creating and interacting with Ethereum keystores. Hand

Brian Wagner 0 Feb 12, 2022
A swift utility to resolve Ethereum Domain Names.

ENSKit A swift utility to resolve Ethereum Domain Names per EIP-137. Examples Initializing: // Use default options with Cloudflare Ethereum Gateway le

null 16 Nov 25, 2022
Modern Swift implementations of BIP39, BIP32, and BIP44

PLEASE NOTE! This is fork from KevinVitale/WalletKit Due to SPM (Swift package manager) and github restrictions it's impossible to add original KevinV

Alexey Strokin 3 Aug 18, 2022
Swift UI component - Stories instagram, slideshow, crypto wallet intro

SwiftUI and Combine - Stories intro multi-platform widget Features Long tap - pause stories showcase Tap - next story Leeway - pause before start stor

Igor 9 Dec 26, 2022
Bitcoin protocol toolkit for Swift

Welcome to BitcoinKit The BitcoinKit library is a Swift implementation of the Bitcoin protocol which support both BCH and BTC. Improving the mobile ec

Yenom - The simplest Bitcoin wallet - 786 Dec 25, 2022
Bitcoin-price - Application to consult the current price of a Bitcoin in different currencies

bitcoin-price Aplicativo para consultar o preço atual de um Bitcoin em diversas

Bruno Lopes 0 Jan 9, 2022
BitcoinCore for Bitcoin, BitcoinCash(ABC), Litecoin and Dash wallet toolkit for Swift.

BitcoinCore for Bitcoin, BitcoinCash(ABC), Litecoin and Dash wallet toolkit for Swift. This is a full implementation of SPV node including wallet creation/restore, synchronization with network, send/receive transactions, and more.

Horizontal Systems 4 Nov 23, 2022
TabBar do aplicativo do Mercado Bitcoin para iOS usando SwiftUI

TabBar do aplicativo do Mercado Bitcoin para iOS usando SwiftUI Screenshots Vídeos Vídeo on YouTube Requisitos iOS 14 SwiftUI Xcode 12 Meta Github: ht

Raphael Cerqueira 2 May 22, 2022