Code Monkey home page Code Monkey logo

bitcoinkit's Introduction

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

$ 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

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.

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]

bitcoinkit's People

Contributors

akifumi avatar d-date avatar federicobond avatar hewigovens avatar jonasman avatar kelvin2468 avatar kishikawakatsumi avatar mizorin avatar monkeywithacupcake avatar pebble8888 avatar s2mr avatar sajjon avatar tttakaoka avatar usatie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcoinkit's Issues

autogen.sh: line 3: autoreconf: command not found

Installing BitcoinKit (0.1.2)
[!] /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/kc/g4hgtv816bq6w5n211rcvkgr0000gn/T/tmp.uevG4VYz
  • trap '{ cd - ; rm -rf /var/folders/kc/g4hgtv816bq6w5n211rcvkgr0000gn/T/tmp.uevG4VYz; exit 255; }' SIGINT
  • cd /var/folders/kc/g4hgtv816bq6w5n211rcvkgr0000gn/T/tmp.uevG4VYz
  • git clone https://github.com/bitcoin-core/secp256k1.git src
    Cloning into 'src'...
    ++ pwd
  • CURRENTPATH=/var/folders/kc/g4hgtv816bq6w5n211rcvkgr0000gn/T/tmp.uevG4VYz
  • TARGETDIR_IPHONEOS=/var/folders/kc/g4hgtv816bq6w5n211rcvkgr0000gn/T/tmp.uevG4VYz/.build/iphoneos
  • mkdir -p /var/folders/kc/g4hgtv816bq6w5n211rcvkgr0000gn/T/tmp.uevG4VYz/.build/iphoneos
  • TARGETDIR_SIMULATOR=/var/folders/kc/g4hgtv816bq6w5n211rcvkgr0000gn/T/tmp.uevG4VYz/.build/iphonesimulator
  • mkdir -p /var/folders/kc/g4hgtv816bq6w5n211rcvkgr0000gn/T/tmp.uevG4VYz/.build/iphonesimulator
  • cd src
  • ./autogen.sh
    ./autogen.sh: line 3: autoreconf: command not found

Code compile failed

public static func buildPublicKeyHashOut(pubKeyHash: Data) -> Data {
return Data() + OP_DUP + OP_HASH160 + OP_0 + pubKeyHash + OP_EQUALVERIFY + OP_CHECKSIG
}

Compile failed (Swift 4.1,Xcode 9.3)

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

Installing via Carthage fails

Fail when install via Carthage

Execution log

DaikinoMacBook-Pro:SimpleWallet daiki.sekiguchi$ carthage update --platform iOS
*** Fetching KeychainAccess
*** Fetching BitcoinKit
*** Checking out KeychainAccess at "v3.1.1"
*** Checking out BitcoinKit at "v1.0.1"
*** xcodebuild output can be found in /var/folders/2n/zlwdch552dl5x5zl745mmwpr0000gn/T/carthage-xcodebuild.CNjLYc.log
*** Downloading KeychainAccess.framework binary at "v3.1.1"
*** Skipped installing KeychainAccess.framework binary due to the error:
"Incompatible Swift version - framework was built with 4.1 (swiftlang-902.0.48 clang-902.0.37.1) and the local version is 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)."

Falling back to building from the source

*** Building scheme "BitcoinKit" in BitcoinKit.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/daiki.sekiguchi/work/iOS/hoge/SimpleWallet/Carthage/Checkouts/BitcoinKit/BitcoinKit.xcworkspace -scheme BitcoinKit -configuration Release -derivedDataPath /Users/daiki.sekiguchi/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/BitcoinKit/v1.0.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/2n/zlwdch552dl5x5zl745mmwpr0000gn/T/BitcoinKit SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/daiki.sekiguchi/work/iOS/hoge/SimpleWallet/Carthage/Checkouts/BitcoinKit)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/2n/zlwdch552dl5x5zl745mmwpr0000gn/T/carthage-xcodebuild.CNjLYc.log

Error log

...
export VERSION_INFO_BUILDER=daiki.sekiguchi
export VERSION_INFO_FILE=BitcoinKit_vers.c
export VERSION_INFO_STRING=""@(#)PROGRAM:BitcoinKit PROJECT:BitcoinKit-1""
export WATCHKIT_2_SUPPORT_FOLDER_PATH=/Users/daiki.sekiguchi/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/BitcoinKit/v1.0.1/Build/Intermediates.noindex/ArchiveIntermediates/BitcoinKit/BuildProductsPath/WatchKitSupport2
export WATCHKIT_SUPPORT_FOLDER_PATH=/Users/daiki.sekiguchi/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/BitcoinKit/v1.0.1/Build/Intermediates.noindex/ArchiveIntermediates/BitcoinKit/BuildProductsPath/WatchKitSupport
export WRAPPER_EXTENSION=framework
export WRAPPER_NAME=BitcoinKit.framework
export WRAPPER_SUFFIX=.framework
export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO
export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION=9F2000
export XCODE_VERSION_ACTUAL=0941
export XCODE_VERSION_MAJOR=0900
export XCODE_VERSION_MINOR=0940
export XPCSERVICES_FOLDER_PATH=BitcoinKit.framework/XPCServices
export YACC=yacc
export arch=arm64
export variant=normal
/bin/sh -c /Users/daiki.sekiguchi/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/BitcoinKit/v1.0.1/Build/Intermediates.noindex/ArchiveIntermediates/BitcoinKit/IntermediateBuildFilesPath/BitcoinKit.build/Release-iphoneos/BitcoinKit.build/Script-292B636820E7BF7000F5040A.sh
warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint

PhaseScriptExecution Build\ Libraries /Users/daiki.sekiguchi/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/BitcoinKit/v1.0.1/Build/Intermediates.noindex/ArchiveIntermediates/BitcoinKit/IntermediateBuildFilesPath/BitcoinKit.build/Release-iphoneos/BitcoinKit.build/Script-1482B628202954CC0098B612.sh
cd /Users/daiki.sekiguchi/work/iOS/hoge/SimpleWallet/Carthage/Checkouts/BitcoinKit
/bin/sh -c /Users/daiki.sekiguchi/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/BitcoinKit/v1.0.1/Build/Intermediates.noindex/ArchiveIntermediates/BitcoinKit/IntermediateBuildFilesPath/BitcoinKit.build/Release-iphoneos/BitcoinKit.build/Script-1482B628202954CC0098B612.sh
env: Workbooks.app/Contents/SharedSupport/path-bin: No such file or directory

** ARCHIVE FAILED **

The following build commands failed:
PhaseScriptExecution Build\ Libraries /Users/daiki.sekiguchi/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/BitcoinKit/v1.0.1/Build/Intermediates.noindex/ArchiveIntermediates/BitcoinKit/IntermediateBuildFilesPath/BitcoinKit.build/Release-iphoneos/BitcoinKit.build/Script-1482B628202954CC0098B612.sh
(1 failure)

Environment

  • MacOS 10.13.6
  • BitcoinKit: v1.0.1
  • Xcode Version: 9.4.1 (9F2000)
  • Swift Version: v4.1.2

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])

🚩Roadmap🚩

Let us share the roadmap for this projects!
Please give us feedback. Any feedback is welcome!
We need your help!
Please feel free to contribute to this project!

This week (~8/12)

  • Review all of the issues and PRs
  • Fix the organization/repo name
  • Merge the PR from yenom/BitcoinCashKit

8/13~8/19

  • Implement all of the OP_CODEs
  • Implement higher level of abstraction such as sendTo(address:), balance()
  • #BitcoinHackathon 8/18-19 in Tokyo

8/20~8/26

  • Increase test coverage to 80%
  • Increase documentation coverage 20%

8/27~9/2

  • Fix SPV features [Verify Block]
  • Fix SPV features [Verify Transaction]
  • Increase documentation coverage 40%

9/3~9/9

  • Fix SPV features [Header First]
  • Fix SPV features [Filter Blocks]
  • Fix SPV features [Filter Transactions]
  • Increase documentation coverage 60%

9/10~9/16

  • Fix SPV features [Parallel broadcasting]
  • Fix SPV features [Parallel downloading]
  • Increase documentation coverage 80%

9/17~9/23

And more to come...!

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

HDWallet supports other Coins

How to suppert other coins ?
// m / purpose' / coin_type' / account' / change / address_index
Such as LTC: m/44'/2'..., DOGE: m/44'/3'...

SendViewController

Could we see an example of the SendViewController to see how to create / send transactions

Support scheme less initialization of Address by AddressFactory

What problem does this feture solve?

Enable to initialization of scheme less address

Describe what you've considered?

Currently Acceptable :
bitcoincash:qpjdpjrm5zvp2al5u4uzmp36t9m0ll7gd525rss978

Currently Unacceptable :
qpjdpjrm5zvp2al5u4uzmp36t9m0ll7gd525rss978

Code sample / Spec

let cashAddr: Cashaddr = AddressFactory.create("qpjdpjrm5zvp2al5u4uzmp36t9m0ll7gd525rss978")

Add slack group to README

What problem does this feture solve?

Build a community for BitcoinKit

Describe what you've considered?

  • Create slack group
  • modify README

Code sample / Spec

Add ScriptFactory

What problem does this feture solve?

Current design implements complex Script in Script.init().
Rich initializer should be moved to Factory class.

Describe what you've considered?

Create ScriptFactory.

Code sample / Spec

let p2pk = ScriptFactory.Standard.buildP2PK(publickey: pubA)
let p2pkh = ScriptFactory.Standard.buildP2PKH(address: pubA.toCashaddr)
let oneDayLockedScript = ScriptFactory.LockTime.build(script: p2pkh, lockDate: Date(timeIntervalSinceNow: 60*60*24))
...

HDWallet.swift file not copied to the project

After installing BitcointKit via cocoapods the file HDWallet is copied along with the pod's files for some reason. If copied from the repository directly into the project everything works fine.

image

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.

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...

The Examples/Wallet run faild!

zhangyutaodeMacBook-Pro:Wallet zhangyutao$ carthage update --platform iOS
*** Fetching BitcoinKit
*** Fetching KeychainAccess
*** Checking out KeychainAccess at "v3.1.1"
*** Checking out BitcoinKit at "v0.1.2"
*** xcodebuild output can be found in /var/folders/z0/89zqhrn56hn16zv5y_h4vhlr0000gn/T/carthage-xcodebuild.wHSsAW.log
*** Downloading KeychainAccess.framework binary at "v3.1.1"
*** Skipped installing KeychainAccess.framework binary due to the error:
"Incompatible Swift version - framework was built with 4.1 (swiftlang-902.0.48 clang-902.0.37.1) and the local version is 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)."
*** Downloading BitcoinKit.framework binary at "v0.1.2"
*** Skipped installing BitcoinKit.framework binary due to the error:
"Incompatible Swift version - framework was built with 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2) and the local version is 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)."
*** Building scheme "BitcoinKit" in BitcoinKit.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/zhangyutao/Downloads/BitcoinKit-0.1.2/Examples/Wallet/Carthage/Checkouts/BitcoinKit/BitcoinKit.xcworkspace -scheme BitcoinKit -configuration Release -derivedDataPath /Users/zhangyutao/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4_9F1027a/BitcoinKit/v0.1.2 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/z0/89zqhrn56hn16zv5y_h4vhlr0000gn/T/BitcoinKit SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/zhangyutao/Downloads/BitcoinKit-0.1.2/Examples/Wallet/Carthage/Checkouts/BitcoinKit)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/z0/89zqhrn56hn16zv5y_h4vhlr0000gn/T/carthage-xcodebuild.wHSsAW.log

🚀Announcement🚀 BitcoinCashKit organization became the new maintainer of this repository.

Hi everyone!
Let us announce that @BitcoinCashKit became the new maintainer of this repository.

Inspired by @kishikawakatsumi, we've been long developed BitcoinCashKit.

BitcoinCashKit was a fork of kishikawakatsumi/BitcoinKit enhanced several features.

We and @kishikawakatsumi talked each other, and agreed on us keeping this project move forward from now on. This is mainly because we wanted to contribute the original repository, but @kishikawakatsumi has not enough time to maintain and investigate more about Bitcoin. He is really smart and noted developer, thus he has a lot of other projects to keep an eye on.

I and some of BitcoinCashKit developer are mainly from Yenom Inc, Bitcoin(BCH/BTC) development company in Japan. We have passion for Bitcoin and believe we can make this project go further.

And any contributes to this project are welcome.
Even small change, question, issue, refactoring, feeling, etc...

Let's make this project move forward together!
Best Regards.

Shun Usami

Add Reddit to README

What problem does this feture solve?

Build a Reddit community for BitcoinKit.

Describe what you've considered?

  • Create Reddit community
  • Add to RAEDME

Code sample / Spec

swift4.1 error

public static func buildPublicKeyHashOut(pubKeyHash: Data) -> Data {
return Data() + OP_DUP + OP_HASH160 + OP_0 + pubKeyHash + OP_EQUALVERIFY + OP_CHECKSIG
}

Problems with pod install

Hi there,

I'm having a problem installing this framework via CocoaPods

screen shot 2018-06-06 at 9 51 38 am

I have tried to reinstall autoconf and automake but no luck. Any idea?

BCH/BTC switch function

What problem does this feture solve?

Users can easily select which coin to use

Describe what you've considered?

Supports not only BCH but also other coins such as BTC

Code sample / Spec

Problems with wallet derivation with testnet

Hi, I believe that there is a problem in derivation and some time doesn't work well. I made some tests with testnet and validate results with https://iancoleman.io/bip39/ and it doesn't match.

I found that in the file BitcoinKitPrivate.m (line 147) you save new private key like this (and some times data length is less than 32 bytes)

    result = [NSMutableData dataWithLength:numBytes];
    BN_bn2bin(privateKey, result.mutableBytes);

and I believe that you need to save new private key like this

    result = [NSMutableData dataWithLength:32];
    BN_bn2bin(privateKey, &result.mutableBytes[32-numBytes]);

Regards

Add MockHelper for script uses multiple signatures

What problem does this feture solve?

Multi-sig using script is unavailable now.

Describe what you've considered?

public static func verifyMultiKey(lockScript: Script, unlockScriptBuilder: MultiKeyScriptBuilder, keys: [MockKey]) throws -> Bool {}

💫Announcement💫 Rename the organization/repository

We're thinking of renaming both/part of organization name and repository name.
This is what we are thinking of. Please give us a feedback!
We want to decide and fix the organization name and repository name as soon as possible.

It'll be decided at least until 8/15.

There are several possibilities of renaming .
Priority order is bellow.

1. BitcoinKit/BitcoinKit

We think it'd be the best.
The problem is, the organization name BitcoinKit is already taken.
The organization seems to be not so much active for about 3 years, so we are negotiating the owner if they give it to us or not.

2. yenom/BitcoinKit

We think this would be the second best.
Since the maintainer for now is almost equal to Yenom developers, it can be the best option.

Dominating or controlling the project is not our aim, instead we want to see broad collaboration.
I think transferring the ownership to a company is not good idea from this perspective.

3. BitcoinCashKit/BitcoinCashKit

We think this would be the third best.

We're planning to keep compatibility of both BCH/BTC for as long as possible.
We'll choose BCH when we have to choose one of them.
e.g. The situation that keeping compatibility is too difficult.
Renaming the repository name to be BitcoinCashKit is good because the name makes it clear.

However, we'll try our best to keep compatibility.
And we believe BitcoinKit is far better from the branding perspective.

Other options

  1. yenom/BitcoinCashKit
    Right now this is Yenom developers' working repo.

  2. BitcoinCashKit/BitcoinKit
    This is current situation.

Build faild

Still I am getting Could not build Objective-C module 'secp256k1'

UTXOs are not updated in Local DB of SampleWallet

Current behavior

When you spend utxos, they are still utxo.
Hence, the value of balance is wrong.

Expected behavior

When you spend utxos, they should be updated.

Steps to reproduce

Environment

  • BitcoinKit: ?.?
  • Xcode Version: ?.? (????)
  • Swift Version: ?.?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.