This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
forked from trustwallet/wallet-core
-
Notifications
You must be signed in to change notification settings - Fork 7
Dgld #2
Closed
Closed
Dgld #2
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
72c8b9e
Update FIO block explorer url (#903)
hewigovens 48c04b5
Linux build.
645931c
Merge branch 'master' of github.com:trustwallet/wallet-core
72846ba
Update zcash/xlm block explorer (#915)
hewigovens d3e86ea
Change password type from string to data (#917)
hewigovens 21b25e0
DGLD skeleton generated.
8f8a396
enable Filecoin json protobuf signing (#919)
hewigovens 9d76b1a
DGLD address logic.
0d91994
[IoTeX ] support IoTeX native staking (#912)
coderbradlee 0ee8c70
Merge branch 'master' of github.com:trustwallet/wallet-core
59664e5
Derivation path changed to reflect BIP44.
4fd327a
Fix possible memory leak in walletconsole/Util.cpp (#921)
draane 6196197
Fix for tests.
f8761e9
Merge branch 'master' of github.com:blockchain/wallet-core
e8ff9c7
Build sample apps in CI (#909)
optout21 7545323
Build fixes.
fa3d717
Entry code for DGLD. Coin parameters update.
6990c1b
Merge branch 'master' of github.com:trustwallet/wallet-core
0f11aa1
DGLD address logic simplified.
87c4f1f
Create auto_assign.yml (#928)
vikmeup 15fb8f3
Add CODEOWNERS (#930)
vikmeup e0e21bc
Migrate CI to GitHub Actions (#937)
hewigovens 7dde1a5
Bitcoin Script minor fixes and new tests. (#933)
optout21 be7aa7d
Build system fixes to allow compilation on Linux for Android.
9a7c3cb
Merge branch 'master' of github.com:trustwallet/wallet-core
4dfeeeb
Some low-impact cppcheck finding fixes. (#938)
optout21 02eab8a
Add Elrond blockchain (#929)
andreibancioiu 3eb5175
Android test app.
d1b8a62
Merge branch 'master' of github.com:trustwallet/wallet-core
458d32e
Fixes for Android build.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, | ||
# @global-owner1 and @global-owner2 will be requested for | ||
# review when someone opens a pull request. | ||
|
||
* @hewigovens @catenocrypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Android CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: [macos-10.15] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install system dependencies | ||
run: brew install boost ninja | ||
- name: Install Android Dependencies | ||
run: | | ||
$ANDROID_HOME/tools/bin/sdkmanager --verbose "cmake;3.10.2.4988404" "ndk-bundle" | ||
$ANDROID_HOME/tools/bin/sdkmanager "system-images;android-26;google_apis;x86" | ||
- name: Accept Licenses | ||
run: echo -e "y\ny\ny\ny\ny\n" | $ANDROID_HOME/tools/bin/sdkmanager --licenses | ||
- name: Cache internal dependencies | ||
id: internal_cache | ||
uses: actions/[email protected] | ||
with: | ||
path: build/local | ||
key: ${{ runner.os }}-internal-${{ hashFiles('tools/install-dependencies') }} | ||
- name: Install internal dependencies | ||
run: | | ||
tools/install-dependencies | ||
if: steps.internal_cache.outputs.cache-hit != 'true' | ||
- name: Run test | ||
run: | | ||
tools/generate-files | ||
tools/android-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: iOS CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: [macos-10.15] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install system dependencies | ||
run: | | ||
brew install boost ninja xcodegen | ||
- name: Cache internal dependencies | ||
id: internal_cache | ||
uses: actions/[email protected] | ||
with: | ||
path: build/local | ||
key: ${{ runner.os }}-internal-${{ hashFiles('tools/install-dependencies') }} | ||
- name: Install internal dependencies | ||
run: | | ||
tools/install-dependencies | ||
if: steps.internal_cache.outputs.cache-hit != 'true' | ||
- name: Run codegen tests | ||
run: tools/codegen-test | ||
- name: Run iOS tests | ||
run: | | ||
tools/generate-files | ||
tools/ios-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Linux CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: [ubuntu-18.04] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install system dependencies | ||
run: | | ||
# build-essential libboost-all-dev clang-9 ruby-full cmake | ||
sudo apt-get install libc++-dev libc++abi-dev ninja-build lcov llvm | ||
- name: Cache internal dependencies | ||
id: internal_cache | ||
uses: actions/[email protected] | ||
with: | ||
path: build/local | ||
key: ${{ runner.os }}-internal-${{ hashFiles('tools/install-dependencies') }} | ||
- name: Install internal dependencies | ||
run: | | ||
tools/install-dependencies | ||
env: | ||
CC: /usr/bin/clang | ||
CXX: /usr/bin/clang++ | ||
if: steps.internal_cache.outputs.cache-hit != 'true' | ||
- name: Build and test | ||
run: | | ||
tools/generate-files | ||
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCODE_COVERAGE=ON -DBOOST_ROOT=${BOOST_ROOT_1_72_0} | ||
make -Cbuild | ||
build/tests/tests tests --gtest_output=xml | ||
env: | ||
CC: /usr/bin/clang | ||
CXX: /usr/bin/clang++ | ||
- name: Gather code coverage | ||
run: | | ||
sudo rm -rf coverage.info | ||
tools/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ xcode/ | |
cmake-build-debug/ | ||
.cquery_cache/ | ||
.cxx/ | ||
CMakeCache.txt | ||
CMakeFiles/ | ||
|
||
# Dependencies | ||
node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...droidTest/java/com/trustwallet/core/app/blockchains/digitalgold/TestDigitalGoldAddress.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright © 2017-2020 Trust Wallet. | ||
// | ||
// This file is part of Trust. The full Trust copyright notice, including | ||
// terms governing use, modification, and redistribution, is contained in the | ||
// file LICENSE at the root of the source code distribution tree. | ||
|
||
package com.trustwallet.core.app.blockchains.digitalgold | ||
|
||
import com.trustwallet.core.app.utils.toHex | ||
import com.trustwallet.core.app.utils.toHexByteArray | ||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import wallet.core.jni.* | ||
|
||
class TestDigitalGoldAddress { | ||
|
||
init { | ||
System.loadLibrary("TrustWalletCore") | ||
} | ||
|
||
@Test | ||
fun testAddress() { | ||
// TODO: Check and finalize implementation | ||
|
||
val key = PrivateKey("__PRIVATE_KEY_DATA__".toHexByteArray()) | ||
val pubkey = key.publicKeyEd25519 | ||
val address = AnyAddress(pubkey, CoinType.DIGITALGOLD) | ||
val expected = AnyAddress("__EXPECTED_RESULT_ADDRESS__", CoinType.DIGITALGOLD) | ||
|
||
assertEquals(pubkey.data().toHex(), "0x__EXPECTED_PUBKEY_DATA__") | ||
assertEquals(address.description(), expected.description()) | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...ndroidTest/java/com/trustwallet/core/app/blockchains/digitalgold/TestDigitalGoldSigner.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright © 2017-2020 Trust Wallet. | ||
// | ||
// This file is part of Trust. The full Trust copyright notice, including | ||
// terms governing use, modification, and redistribution, is contained in the | ||
// file LICENSE at the root of the source code distribution tree. | ||
|
||
package com.trustwallet.core.app.blockchains.digitalgold | ||
|
||
import com.google.protobuf.ByteString | ||
import com.trustwallet.core.app.utils.Numeric | ||
import com.trustwallet.core.app.utils.toHexByteArray | ||
import com.trustwallet.core.app.utils.toHexBytes | ||
import com.trustwallet.core.app.utils.toHexBytesInByteString | ||
import junit.framework.Assert.assertEquals | ||
import org.junit.Test | ||
import wallet.core.jni.BitcoinSigner | ||
import wallet.core.jni.proto.Bitcoin | ||
|
||
class TestDigitalGoldSigner { | ||
|
||
init { | ||
System.loadLibrary("TrustWalletCore") | ||
} | ||
|
||
@Test | ||
fun DigitalGoldTransactionSigning() { | ||
// TODO: Finalize implementation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
|
||
//val transfer = DigitalGold.TransferMessage.newBuilder() | ||
// .setTo("...") | ||
// .setAmount(...) | ||
// ... | ||
// .build() | ||
//val signingInput = DigitalGold.SigningInput.newBuilder() | ||
// ... | ||
// .build() | ||
|
||
//val output: DigitalGold.SigningOutput = DigitalGoldSigner.sign(signingInput) | ||
|
||
//assertEquals( | ||
// "__EXPECTED_RESULT_DATA__", | ||
// Numeric.toHexString(output.encoded.toByteArray()) | ||
//) | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...app/src/androidTest/java/com/trustwallet/core/app/blockchains/elrond/TestElrondAddress.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright © 2017-2020 Trust Wallet. | ||
// | ||
// This file is part of Trust. The full Trust copyright notice, including | ||
// terms governing use, modification, and redistribution, is contained in the | ||
// file LICENSE at the root of the source code distribution tree. | ||
|
||
package com.trustwallet.core.app.blockchains.elrond | ||
|
||
import com.trustwallet.core.app.utils.toHex | ||
import com.trustwallet.core.app.utils.toHexByteArray | ||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import wallet.core.jni.* | ||
|
||
class TestElrondAddress { | ||
|
||
init { | ||
System.loadLibrary("TrustWalletCore") | ||
} | ||
|
||
private val aliceBech32 = "erd1l453hd0gt5gzdp7czpuall8ggt2dcv5zwmfdf3sd3lguxseux2fsmsgldz" | ||
private var aliceSeedHex = "1a927e2af5306a9bb2ea777f73e06ecc0ac9aaa72fb4ea3fecf659451394cccf" | ||
private var alicePubKeyHex = "0xfd691bb5e85d102687d81079dffce842d4dc328276d2d4c60d8fd1c3433c3293" | ||
|
||
@Test | ||
fun testAddressFromPrivateKey() { | ||
val key = PrivateKey(aliceSeedHex.toHexByteArray()) | ||
val pubKey = key.publicKeyEd25519 | ||
val address = AnyAddress(pubKey, CoinType.ELROND) | ||
|
||
assertEquals(alicePubKeyHex, pubKey.data().toHex()) | ||
assertEquals(aliceBech32, address.description()) | ||
} | ||
|
||
@Test | ||
fun testAddressFromPublicKey() { | ||
val pubKey = PublicKey(alicePubKeyHex.toHexByteArray(), PublicKeyType.ED25519) | ||
val address = AnyAddress(pubKey, CoinType.ELROND) | ||
|
||
assertEquals(aliceBech32, address.description()) | ||
} | ||
|
||
@Test | ||
fun testAddressFromString() { | ||
val address = AnyAddress(aliceBech32, CoinType.ELROND) | ||
|
||
assertEquals(aliceBech32, address.description()) | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@haael This is unclear - are you planning to follow-up in this or next PR with actual test cases?