Giter Club home page Giter Club logo

tangem-sdk-android's Introduction

Tests Version License: MIT Platform Twitter

Welcome to Tangem

The Tangem card is a self-custodial hardware wallet that works via NFC. The main functions of Tangem cards are to securely create and store a private key and sign data.

Tangem SDK is needed to facilitate support for Tangem cards in third-party applications.

Supported platforms: iOS | Android | JVM | Flutter | React Native | Cordova | Capacitor

Documentation

For exhaustive documentation, see Tangem Developers Portal.

To kick off the development process you can start with Getting started for Android page and Getting started for JVM page.

License

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

tangem-sdk-android's People

Contributors

iiiburnyiii avatar imaks99 avatar kozarezvlad avatar lazutkin-andrey avatar mama1emon avatar mobile-tangem avatar reginalatypova avatar roman-pv avatar sateetas avatar simonpulba avatar usmonie avatar yoggam1 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

Watchers

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

tangem-sdk-android's Issues

flutter error tangem_sdk 0.8.0

Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.github.tangem.tangem-sdk-android:android:3.8.2.

Need the newest version for Flutter SDK

Hi, We has problems with the Tangem SDK version in the Flutter Tangem SDK.
for the moment I solved It in iOS using the github repository equals to the Tangem App Pod File.

But in Android I can´t found the way to use your actual version, how I can use
tangemCardSdk = "release-app_5.4-315"
in the build.gradle of Flutter Tangem SDK?.

The actual Flutter Tangem SDK build.gradle code

`group 'com.tangem.tangem_sdk'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.8.0'
repositories {
google()
mavenCentral()
}

dependencies {
    classpath 'com.android.tools.build:gradle:7.1.2'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

}

allprojects {
repositories {
google()
mavenCentral()
maven {url 'https://jitpack.io'}
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 33

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
    jvmTarget = '1.8'
}

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
    minSdkVersion 21
}

}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation "com.github.tangem.tangem-sdk-android:android:3.8.2"
implementation "com.github.tangem.tangem-sdk-android:core:3.8.2"

implementation 'com.squareup.moshi:moshi:1.12.0'
implementation "com.squareup.moshi:moshi-kotlin:1.12.0"
kapt("com.squareup.moshi:moshi-kotlin-codegen:1.12.0")

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.10.1'

}
`

Here you can see the issue:

tangem/tangem-sdk-flutter#20

Legacy support libraries are detected (AndroidX support).

Version

3.6.2

Issue:

Attempt to remove support for legacy support libraries causes a warning and performance issue:

The following legacy support libraries are detected:
app -> com.github.tangem.tangem-sdk-android:android:3.6.2 -> at.favre.lib:armadillo:0.9.0 -> com.android.support:support-annotations:28.0.0

Steps to reproduce:

  • Apply the latest dependency com.github.tangem.tangem-sdk-android:android:3.6.2
  • In the gradle.properties file apply android.enableJetifier=false

Suggestions:

Update the legacy dependency at.favre.lib:armadillo:0.9.0 to at.favre.lib:armadillo:1.0.0+

Thanks.

TangemSdk.sign invokes both Success and Failure

Using:

implementation "com.github.tangem.tangem-sdk-android:core:3.8.2"
implementation "com.github.tangem.tangem-sdk-android:android:3.8.2"

When I try to get something signed using TangemSdk.sign , after successfully signing and getting the CompletionResult.Success , also the CompletionResult.Failure is invoked unexpectedly.

To be clear, the the Success part works OK and has the correct signature. So things seem to work fine, until the Failure is also triggered. It doesn't cause problems when the failure is ignored, but if a failure message is displayed or some code is run when Tangem signing fails, it breaks the proper operation.

The code I receive in the Failure TangemSdkError is 50002 .
Perhaps this has something to do with cards setup with the older Tangem app. Perhaps not.

Could you please check?

Add XinFin-XDC Network support

Hello Team,

It will be great if Would you consider to Add ETH compatible DPOS chain XinFin(XDC) Network support.

XinFin Digital Contract or XDC — the XinFin network’s native crypto — is a one-stop solution that combines speed, scalability, and sustainability into an immaculate package. XDC is built on XinFin’s exclusive consensus mechanism — the XinFin Delegated Proof-of-Stake or XDPoS protocol that was specially developed to overcome the shortcomings of the technology that came before it.

XinFin Network: https://xdc.network/home
XDC Wallet (Android App): https://play.google.com/store/apps/details?id=com.xdcwallet&hl=en&gl=US
Github:- https://github.com/XinFinOrg/XDPoSChain
CMC :- https://coinmarketcap.com/currencies/xinfin-network/
Circulating Supply:- https://explorerapi.xinfin.network/publicAPI?module=balance&action=getcirculatingsupply
Total Supply:- https://explorerapi.xinfin.network/publicAPI?module=balance&action=totalXDC
Docker FullNode:- https://github.com/xinfinorg/XinFin-Node
Integration Code example: https://xinfin.org/exchange-listing-resource

Technical Community Support available at:

Telegram Community: https://t.me/XinFinDevelopers
Slack Community: https://xinfin-public.slack.com/messages/CELR2M831/
Slack Invitation Link: https://launchpass.com/xinfin-public
Technical help Resource: http://howto.xinfin.org/

It is a pleasure to talk about commercials and ready to support with large XinFin community to increase the adoption rate of your team.

Hope you will revert soon.

Nokia 8.1 throwing error

I've got a Nokia 8.1 running Android 11. When trying to scan my STELLAR-card the error 30001 is shown.

I verified that the card works by scanning with another phone (wileyfox, android 7).

Initially the error occured in the official Tangem App. I tried to verify if it's a problem with that app and built a dummy react-native app using https://github.com/XRPL-Labs/tangem-sdk-react-native (which is the one dowloaded through npm i tangem-sdk-react-native). But that showed the exact same dialog and also failed with error 30001.

3.7.0 release: missed dependencies.

Version

3.7.0

Issue:

Can't find dependecy for the 'android' path.

dependencies {
    implementation "com.github.tangem.tangem-sdk-android:core: 3.7.0" // Ok
    implementation "com.github.tangem.tangem-sdk-android:android: 3.7.0" // Don't exist
}

How to get wallet address from CardWallet.publicKey?

I'm using the Android SDK in my app, with a card that has created a wallet through the Tangem Android app.
When I scan the card successfully, I get 2 CardWallet's. Since my app is based on Ethereum, I'm looking at the one with curve secp256k1
My public key for this wallet is :
0x03a2eeec0b16a6287903f5b426c06ced04b03c1305c50d9e40625cb5f7f3748e4d
The corresponding address would be:
0x85ebce013Acd634eaA2cFD2C6AF88B9c1dEF0679

But this is not the address I'm seeing in the Tangem App under Ethereum Mainnet. The one in the Tangem app is:
0x5623bEda.....f071395b

In settings of my Card : isHDWalletAllowed=true
cardWallet.derivedKeys is empty

How can I get the public key that corresponds to the address seen in the Tangem app, so my app and the Tangem app would use the same address?

I tried deriving more public keys from wallet.extendedPublicKey, but not hit any matches (what is the derivation path)? Do you have any working code for it?

Any help appreciated, since I'm stuck on this problem for 2 days.

I am using

implementation "com.github.tangem.tangem-sdk-android:core:3.6.2"
implementation "com.github.tangem.tangem-sdk-android:android:3.6.2"

Thanks

Error scanning card in release mode

Hi, I am working in a implementation for user your card in our Wallet, Ozone Wallet, I just finished my implementation, in debug mode work in iOS and Android, but in release only work with Android, for android I receive the error below, I understhan is related with the security providers, but I can't solve, You you can help me?

FATAL EXCEPTION: DefaultDispatcher-worker-2
Process: com.chiatk.apps.ozone1, PID: 30272
java.security.NoSuchAlgorithmException: no such algorithm: SHA256withECDSA for provider SC
at sun.security.jca.GetInstance.getService(GetInstance.java:87)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
at java.security.Signature.getInstance(Signature.java:504)
at aa.i.p(Unknown Source:19)
at aa.a.j(Unknown Source:59)
at aa.a.k(Unknown Source:6)
at com.tangem.operations.attestation.AttestCardKeyResponse.e(Unknown Source:22)
at ga.a$a.a(Unknown Source:19)
at ga.a$a.invoke(Unknown Source:2)
at fa.b$f.a(Unknown Source:207)
at fa.b$f.invoke(Unknown Source:2)
at fa.b$c.a(Unknown Source:237)
at fa.b$c.invoke(Unknown Source:2)
at r9.b$r$d.emit(Unknown Source:15)
at kotlinx.coroutines.flow.j$c.emit(Unknown Source:64)
at r9.b$r$h$a.emit(Unknown Source:66)
at r9.b$r$g$a.emit(Unknown Source:94)
at r9.b$r$f$a.emit(Unknown Source:88)
at r9.b$r$e$a.emit(Unknown Source:90)
at kotlinx.coroutines.flow.l$a$a.emit(Unknown Source:58)
at kotlinx.coroutines.flow.g.e(Unknown Source:145)
at kotlinx.coroutines.flow.g.a(Unknown Source:0)
at kotlinx.coroutines.flow.b.a(Unknown Source:12)
at kotlinx.coroutines.flow.l$a.a(Unknown Source:7)
at r9.b$r$e.a(Unknown Source:7)
at r9.b$r$f.a(Unknown Source:7)
at r9.b$r$g.a(Unknown Source:7)
at r9.b$r$h.a(Unknown Source:7)
at kotlinx.coroutines.flow.j.b(Unknown Source:72)
at kotlinx.coroutines.flow.e.c(Unknown Source:0)
at kotlinx.coroutines.flow.j$a.a(Unknown Source:75)
at r9.b$r.invokeSuspend(Unknown Source:89)
at kotlin.coroutines.jvm.internal.a.resumeWith(Unknown Source:11)
at tf.s0.run(Unknown Source:88)
at kotlinx.coroutines.internal.k.run(Unknown Source:12)
at kotlinx.coroutines.scheduling.k.run(Unknown Source:2)
at kotlinx.coroutines.scheduling.a.q(Unknown Source:0)
at kotlinx.coroutines.scheduling.a$c.d(Unknown Source:14)
at kotlinx.coroutines.scheduling.a$c.n(Unknown Source:28)
at kotlinx.coroutines.scheduling.a$c.run(Unknown Source:0)
Suppressed: tf.q0: [r9.b$t@3a46388, h2{Cancelling}@6820121, Dispatchers.IO]

tangem/tangem-sdk-flutter#19

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.