Skip to content

Commit

Permalink
Rename TrustWalletCore to PPTrustWalletCore
Browse files Browse the repository at this point in the history
  • Loading branch information
cbhaiji committed Mar 23, 2020
1 parent ee15d8b commit 0c6819d
Show file tree
Hide file tree
Showing 269 changed files with 497 additions and 496 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jni/java/wallet/core/jni
swift/Sources/Generated
swift/wallet-core/
src/Generated
include/TrustWalletCore/TWHRP.h
include/TrustWalletCore/TW*Proto.h
include/PPTrustWalletCore/TWHRP.h
include/PPTrustWalletCore/TW*Proto.h

# Code coverage files
coverage.info
Expand Down
Binary file added PPTrustWalletCore-iOS-2.0.4.zip
Binary file not shown.
26 changes: 13 additions & 13 deletions TrustWalletCore.podspec → PPTrustWalletCore.podspec
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
version = '0.13.0'
version = '3.0.0'

Pod::Spec.new do |s|
s.name = 'TrustWalletCore'
s.name = 'PPTrustWalletCore'
s.version = version
s.summary = 'Trust Wallet core data structures and algorithms.'
s.homepage = 'https://github.com/TrustWallet/wallet-core'
s.homepage = 'https://github.com/pumapayio/wallet-core'
s.license = 'MIT'
s.authors = { 'Alejandro Isaza' => '[email protected]' }
s.authors = { 'Chirag Bhaiji' => '[email protected]' }

s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.12'
s.swift_version = '5.1'

s.source = {
git: 'git@github.com:TrustWallet/wallet-core.git',
git: 'https://github.com/pumapayio/wallet-core.git',
tag: version,
submodules: true
}

s.default_subspec = 'Core'

s.subspec 'Types' do |ss|
ss.source_files =
ss.source_files =
'swift/Sources/Generated/Enums/*.swift',
'swift/Sources/Generated/Protobuf/*.swift'
ss.dependency 'SwiftProtobuf'
Expand Down Expand Up @@ -128,14 +128,14 @@ Pod::Spec.new do |s|
'src/proto/*.proto'
ss.xcconfig = {
'HEADER_SEARCH_PATHS' => '$(inherited) ' \
'${PODS_ROOT}/TrustWalletCore/src ' \
'${PODS_ROOT}/TrustWalletCore/trezor-crypto/src',
'${PODS_ROOT}/PPTrustWalletCore/src ' \
'${PODS_ROOT}/PPTrustWalletCore/trezor-crypto/src',
'SYSTEM_HEADER_SEARCH_PATHS' => '$(inherited) ' \
'/usr/local/include' \
'${PODS_ROOT}/TrustWalletCore/include ' \
'${PODS_ROOT}/TrustWalletCore/trezor-crypto/include ' \
"${PODS_ROOT}/TrustWalletCore/#{protobuf_source_dir}/src " \
"${PODS_ROOT}/TrustWalletCore/#{include_dir} ",
'${PODS_ROOT}/PPTrustWalletCore/include ' \
'${PODS_ROOT}/PPTrustWalletCore/trezor-crypto/include ' \
"${PODS_ROOT}/PPTrustWalletCore/#{protobuf_source_dir}/src " \
"${PODS_ROOT}/PPTrustWalletCore/#{include_dir} ",
'GCC_WARN_UNUSED_FUNCTION' => 'NO',
'GCC_WARN_64_TO_32_BIT_CONVERSION' => 'NO',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
Expand All @@ -145,7 +145,7 @@ Pod::Spec.new do |s|
ss.pod_target_xcconfig = {
'SYSTEM_HEADER_SEARCH_PATHS' => '$(inherited) /usr/local/include'
}
ss.dependency 'TrustWalletCore/Types'
ss.dependency 'PPTrustWalletCore/Types'
end
s.prepare_command = 'tools/install-dependencies && tools/generate-files'
end
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
}

dependencies {
implementation project(':trustwalletcore')
implementation project(':pptrustwalletcore')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'

Expand Down
10 changes: 5 additions & 5 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ VERSION_CODE=1
GROUP=com.trustwallet.walletcore

POM_DESCRIPTION=Cross-platform, cross-blockchain wallet library.
POM_URL=https://github.com/TrustWallet/wallet-core
POM_SCM_URL=https://github.com/TrustWallet/wallet-core
POM_SCM_CONNECTION=scm:[email protected]:TrustWallet/wallet-core.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:TrustWallet/wallet-core.git
POM_URL=https://github.com/pumapayio/wallet-core
POM_SCM_URL=https://github.com/pumapayio/wallet-core
POM_SCM_CONNECTION=scm:[email protected]:pumapayio/wallet-core.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:pumapayio/wallet-core.git
POM_LICENCE_NAME=MIT
POM_LICENCE_URL=https://opensource.org/licenses/MIT
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=TrustWallet
POM_DEVELOPER_NAME=Trust Wallet
POM_DEVELOPER_NAME=Trust Wallet
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ artifacts {
publishing {
publications {
Production(MavenPublication) {
artifact("$buildDir/outputs/aar/trustwalletcore-release.aar")
artifact sourcesJar {
artifact("$buildDir/outputs/aar/pptrustwalletcore-release.aar")
artifact sourcesJar {
classifier "sources"
}
groupId this.group
Expand Down Expand Up @@ -53,7 +53,7 @@ artifactory {
if (this.version.endsWith("-SNAPSHOT")) {
repoKey = 'oss-snapshot-local'
} else {
repoKey = 'oss-release-local'
repoKey = 'oss-release-local'
}
username = System.getenv('BINTRAY_USER')
password = System.getenv('BINTRAY_KEY')
Expand Down Expand Up @@ -88,4 +88,4 @@ bintray {
vcsTag = this.version
}
}
}
}
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app', ':trustwalletcore'
include ':app', ':pptrustwalletcore'
2 changes: 1 addition & 1 deletion codegen/bin/codegen
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Encoding.default_internal = Encoding::UTF_8

options = OpenStruct.new
# default input / output path
options.input = "#{CurrentDir}/../../include/TrustWalletCore"
options.input = "#{CurrentDir}/../../include/PPTrustWalletCore"
options.output = "#{CurrentDir}/../../"
options.swift = true
options.java = true
Expand Down
2 changes: 1 addition & 1 deletion codegen/bin/coins
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ erbs = [
{'template' => 'coins.cpp.erb', 'folder' => 'src/Generated', 'file' => 'Coins.cpp'},
{'template' => 'coins.md.erb', 'folder' => 'docs', 'file' => 'coins.md'},
{'template' => 'hrp.cpp.erb', 'folder' => 'src/Generated', 'file' => 'TWHRP.cpp'},
{'template' => 'hrp.h.erb', 'folder' => 'include/TrustWalletCore', 'file' => 'TWHRP.h'}
{'template' => 'hrp.h.erb', 'folder' => 'include/PPTrustWalletCore', 'file' => 'TWHRP.h'}
]

FileUtils.mkdir_p File.join('src', 'Generated')
Expand Down
4 changes: 2 additions & 2 deletions codegen/bin/newcoin
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ def self.generate_file(templateFile, folder, fileName, coin)
end

def self.insert_coin_type(coin)
target_file = "include/TrustWalletCore/TWCoinType.h"
target_file = "include/PPTrustWalletCore/TWCoinType.h"
target_line = " TWCoinType#{coin['name']} = #{coin_type(coin['derivationPath'])},\n"
if insert_target_line(target_file, target_line, "};\n")
insert_blockchain_type(coin)
end
end

def insert_blockchain_type(coin)
target_file = "include/TrustWalletCore/TWBlockchain.h"
target_file = "include/PPTrustWalletCore/TWBlockchain.h"
line_number = File.readlines(target_file).count
target_line = " TWBlockchain#{coin['blockchain']} = #{line_number - 17},\n"
insert_target_line(target_file, target_line, "};\n")
Expand Down
2 changes: 1 addition & 1 deletion codegen/lib/code_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def render_template(header:, template:, output_subfolder:, extension:)
unless string.nil? || string.empty?
code << "\n" unless header.nil?
code << string

path = File.expand_path(File.join(output_folder, output_subfolder, "#{file}.#{extension}"))
File.write(path, code)
end
Expand Down
2 changes: 1 addition & 1 deletion codegen/lib/templates/TWCoinTypeTests.cpp.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//

#include "../interface/TWTestUtilities.h"
#include <TrustWalletCore/TWCoinTypeConfiguration.h>
#include <PPTrustWalletCore/TWCoinTypeConfiguration.h>
#include <gtest/gtest.h>


Expand Down
2 changes: 1 addition & 1 deletion codegen/lib/templates/coins.cpp.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//

#include "Coin.h"
#include <TrustWalletCore/TWCoinTypeConfiguration.h>
#include <PPTrustWalletCore/TWCoinTypeConfiguration.h>

using namespace TW;

Expand Down
2 changes: 1 addition & 1 deletion codegen/lib/templates/hrp.cpp.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// This is a GENERATED FILE from \coins.json, changes made here WILL BE LOST.
//

#include <TrustWalletCore/TWHRP.h>
#include <PPTrustWalletCore/TWHRP.h>

#include <cstring>

Expand Down
2 changes: 1 addition & 1 deletion codegen/lib/templates/jni_c.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<% end -%>
<% end -%>
<% includes.each do |include| -%>
#include <TrustWalletCore/TW<%= include %>.h>
#include <PPTrustWalletCore/TW<%= include %>.h>
<% end -%>

#include "TWJNI.h"
Expand Down
2 changes: 1 addition & 1 deletion codegen/lib/templates/jni_h.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define JNI_TW_<%= entity.name.upcase %>_H

#include <jni.h>
#include <TrustWalletCore/TWBase.h>
#include <PPTrustWalletCore/TWBase.h>

TW_EXTERN_C_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion codegen/lib/templates/newcoin/TWAddressTests.cpp.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.

#include <TrustWalletCore/TWAnyAddress.h>
#include <PPTrustWalletCore/TWAnyAddress.h>
#include "HexCoding.h"

#include "../interface/TWTestUtilities.h"
Expand Down
2 changes: 1 addition & 1 deletion codegen/lib/templates/newcoin/TWSignerTests.cpp.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.

#include <TrustWalletCore/TWAnySigner.h>
#include <PPTrustWalletCore/TWAnySigner.h>
#include "HexCoding.h"

#include "../interface/TWTestUtilities.h"
Expand Down
14 changes: 7 additions & 7 deletions codegen/lib/templates/swift/TrustWalletCore.h.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ FOUNDATION_EXPORT double TrustWalletCoreVersionNumber;
//! Project version string for TrustWalletCore.
FOUNDATION_EXPORT const unsigned char TrustWalletCoreVersionString[];

#include <TrustWalletCore/TWBase.h>
#include <TrustWalletCore/TWData.h>
#include <TrustWalletCore/TWString.h>
#include <TrustWalletCore/TWFoundationData.h>
#include <TrustWalletCore/TWFoundationString.h>
#include <PPTrustWalletCore/TWBase.h>
#include <PPTrustWalletCore/TWData.h>
#include <PPTrustWalletCore/TWString.h>
#include <PPTrustWalletCore/TWFoundationData.h>
#include <PPTrustWalletCore/TWFoundationString.h>

#include <TrustWalletCore/TWAnySigner.h>
#include <PPTrustWalletCore/TWAnySigner.h>

<% entities.sort { |x,y| x.name <=> y.name }.select { |entity| !entity.name.end_with?("Proto") }.each do |entity| -%>
#include <TrustWalletCore/TW<%= entity.name %>.h>
#include <PPTrustWalletCore/TW<%= entity.name %>.h>
<% end -%>
2 changes: 1 addition & 1 deletion codegen/test/test_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_init
end

def test_parse_public_key
parser = Parser.new(path: File.expand_path(File.join(File.dirname(__FILE__), '../../include/TrustWalletCore/TWPublicKey.h')))
parser = Parser.new(path: File.expand_path(File.join(File.dirname(__FILE__), '../../include/PPTrustWalletCore/TWPublicKey.h')))
parser.parse

assert_not_nil(parser.entity)
Expand Down
2 changes: 1 addition & 1 deletion docker/wallet-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ RUN cmake --version
# Clone repo
ENV CC=/usr/bin/clang
ENV CXX=/usr/bin/clang++
RUN git clone https://github.com/TrustWallet/wallet-core.git
RUN git clone https://github.com/pumapayio/wallet-core.git

# Prepare dependencies
RUN cd /wallet-core \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion jni/cpp/AnySigner.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define JNI_TW_ANYSIGNER_H

#include <jni.h>
#include <TrustWalletCore/TWBase.h>
#include <PPTrustWalletCore/TWBase.h>

TW_EXTERN_C_BEGIN

Expand Down
18 changes: 9 additions & 9 deletions jni/cpp/TWJNI.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

#pragma once

#include <TrustWalletCore/TWBase.h>
#include <TrustWalletCore/TWData.h>
#include <TrustWalletCore/TWString.h>
#include <PPTrustWalletCore/TWBase.h>
#include <PPTrustWalletCore/TWData.h>
#include <PPTrustWalletCore/TWString.h>

#include <TrustWalletCore/TWHash.h>
#include <TrustWalletCore/TWPrivateKey.h>
#include <TrustWalletCore/TWPublicKey.h>
#include <PPTrustWalletCore/TWHash.h>
#include <PPTrustWalletCore/TWPrivateKey.h>
#include <PPTrustWalletCore/TWPublicKey.h>

#include <TrustWalletCore/TWBitcoinScript.h>
#include <TrustWalletCore/TWSegwitAddress.h>
#include <TrustWalletCore/TWAnySigner.h>
#include <PPTrustWalletCore/TWBitcoinScript.h>
#include <PPTrustWalletCore/TWSegwitAddress.h>
#include <PPTrustWalletCore/TWAnySigner.h>

#include <jni.h>
#include "TWJNIData.h"
Expand Down
12 changes: 6 additions & 6 deletions samples/cpp/sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.

#include <TrustWalletCore/TWCoinType.h>
#include <TrustWalletCore/TWAnySigner.h>
#include <TrustWalletCore/TWCoinTypeConfiguration.h>
#include <TrustWalletCore/TWHDWallet.h>
#include <TrustWalletCore/TWPrivateKey.h>
#include <TrustWalletCore/TWString.h>
#include <PPTrustWalletCore/TWCoinType.h>
#include <PPTrustWalletCore/TWAnySigner.h>
#include <PPTrustWalletCore/TWCoinTypeConfiguration.h>
#include <PPTrustWalletCore/TWHDWallet.h>
#include <PPTrustWalletCore/TWPrivateKey.h>
#include <PPTrustWalletCore/TWString.h>

#include <iostream>
#include <string>
Expand Down
10 changes: 5 additions & 5 deletions samples/go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package main

// #cgo CFLAGS: -I/wallet-core/include
// #cgo LDFLAGS: -L/wallet-core/build -L/wallet-core/build/trezor-crypto -lTrustWalletCore -lprotobuf -lTrezorCrypto -lc++ -lm
// #include <TrustWalletCore/TWHDWallet.h>
// #include <TrustWalletCore/TWString.h>
// #include <TrustWalletCore/TWData.h>
// #include <TrustWalletCore/TWPrivateKey.h>
// #include <TrustWalletCore/TWPublicKey.h>
// #include <PPTrustWalletCore/TWHDWallet.h>
// #include <PPTrustWalletCore/TWString.h>
// #include <PPTrustWalletCore/TWData.h>
// #include <PPTrustWalletCore/TWPrivateKey.h>
// #include <PPTrustWalletCore/TWPublicKey.h>
import "C"

import "fmt"
Expand Down
2 changes: 1 addition & 1 deletion src/Binance/Address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "Address.h"

#include <TrustWalletCore/TWHRP.h>
#include <PPTrustWalletCore/TWHRP.h>

using namespace TW::Binance;

Expand Down
2 changes: 1 addition & 1 deletion src/Bitcoin/Script.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "../Data.h"

#include "OpCodes.h"
#include <TrustWalletCore/TWCoinType.h>
#include <PPTrustWalletCore/TWCoinType.h>

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/Bitcoin/SegwitAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "../Bech32.h"

#include <TrezorCrypto/ecdsa.h>
#include <TrustWalletCore/TWHRP.h>
#include <PPTrustWalletCore/TWHRP.h>

using namespace TW::Bitcoin;

Expand Down
2 changes: 1 addition & 1 deletion src/Bitcoin/SignatureVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#pragma once

#include <TrustWalletCore/TWBitcoinSigHashType.h>
#include <PPTrustWalletCore/TWBitcoinSigHashType.h>

namespace TW::Bitcoin {
enum SignatureVersion {
Expand Down
2 changes: 1 addition & 1 deletion src/Bitcoin/TransactionBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "TransactionPlan.h"
#include "UnspentSelector.h"
#include "../proto/Bitcoin.pb.h"
#include <TrustWalletCore/TWCoinType.h>
#include <PPTrustWalletCore/TWCoinType.h>

#include <algorithm>

Expand Down
Loading

0 comments on commit 0c6819d

Please sign in to comment.