Install the keystone SDK
The Keystone SDK offers a streamlined solution for facilitating communication between software wallets and the Keystone hardware wallet. This powerful toolkit simplifies the process of encoding transaction data into QR codes, enabling seamless transfer of information to the Keystone device. Additionally, the SDK provides efficient decoding capabilities for QR codes generated on the Keystone hardware wallet, ensuring smooth data retrieval. By incorporating the Keystone SDK, developers can significantly enhance the interoperability and user experience of their wallet applications, making hardware wallet integration more accessible and efficient.
Web/Extension/React Native
- @keystonehq/keystone-sdk, covert transaction to QR code content, and parse QR code to signature.
- @keystonehq/animated-qr, animated QR code presenting and scanning.
- Add library as dependency in your project.
yarn add @keystonehq/keystone-sdk @keystonehq/animated-qr
npm install --save @keystonehq/keystone-sdk @keystonehq/animated-qr
You can start to play with the KeystoneSDK
in your App after the library has been added.
import KeystoneSDK from "@keystonehq/keystone-sdk"
let keystoneSDK = new KeystoneSDK()
IOS
The Keystone SDK IOS version is provided by a Swift package, you can get it from here: keystone-sdk-ios, check all the available versions here
Simply add it to the dependencies in your Package.swift.
dependencies: [
.package(url: "https://github.com/KeystoneHQ/keystone-sdk-ios/", from: "0.0.1")
]
Or in Xcode, click File
-> Add Packages...
,
paste https://github.com/KeystoneHQ/keystone-sdk-ios/
in search box,
click Add Package
to add keystone-sdk-ios
into your project.
Now the SDK can be added into the project.
import KeystoneSDK
let keystoneSDK = KeystoneSDK()
Android
The Keystone sdk android version is provided by this an Android library, you can get it from here:keystone-sdk-android, check all the available versions here
-
Add JitPack as dependency repository in your project. add to
build.gradle
withallprojects {
repositories {
maven { url "https://jitpack.io" }
}
}or add to
settings.gradle
withdependencyResolutionManagement {
repositories {
maven { url 'https://www.jitpack.io' }
}
} -
Add KeystoneSDK Android library to your project
dependencies {
compile 'com.github.KeystoneHQ/keystone-sdk-android:{latest version}'
}
Now you can import the SDK into your project.
import com.keystone.sdk.KeystoneSDK
val keystoneSDK = KeystoneSDK()
Sample APP
Here is the Android demo app and iOS demo app for your reference.