Skip to content

Commit

Permalink
Merge pull request #32 from KeystoneHQ/add-device-version
Browse files Browse the repository at this point in the history
feat: add device version
  • Loading branch information
soralit authored Oct 11, 2023
2 parents d818e28 + 5702314 commit 8df8a3c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions KeystoneSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "KeystoneSDK"
spec.version = "0.6.2"
spec.version = "0.6.3"
spec.summary = "A library to simplify the way how software wallets communicate with the Keystone hardware wallet via UR."
spec.homepage = "https://github.com/KeystoneHQ/keystone-sdk-ios"
spec.license = { :type => 'Copyright', :text => 'Copyright 2023 Keystone' }
Expand All @@ -12,6 +12,6 @@ Pod::Spec.new do |spec|
spec.source_files = "Sources/KeystoneSDK/*.swift", "Sources/KeystoneSDK/**/*.swift"
spec.requires_arc = true
spec.static_framework = true
spec.dependency "URRegistryFFI", "~> 0.2.3"
spec.dependency "URRegistryFFI", "~> 0.2.4"
spec.dependency "URKit", "~> 10.1.0"
end
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ let package = Package(
),
.binaryTarget(
name: "URRegistryFFI",
url: "https://github.com/KeystoneHQ/keystone-sdk-rust/releases/download/sdk-0.1.4/URRegistryFFI.xcframework.zip",
checksum: "f9ed80ecfcf40df83aa7662bc4120a6b49673fd52ffe0ee6e97f1d62e93f9ab6"
url: "https://github.com/KeystoneHQ/keystone-sdk-rust/releases/download/sdk-0.1.6/URRegistryFFI.xcframework.zip",
checksum: "299b4adb24b04c62f1a651c7ac7b8ac4d5040fcf56295cbc0f43d16969bd8e7e"
),
.testTarget(
name: "KeystoneSDKTests",
Expand Down
1 change: 1 addition & 0 deletions Sources/KeystoneSDK/Model/MultiAccounts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ public struct MultiAccounts : Equatable, Codable {
public var keys: Array<Account>
public var device: String?
public var deviceId: String?
public var deviceVersion: String?
}
3 changes: 2 additions & 1 deletion Tests/KeystoneSDKTests/KeystoneWalletTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import URKit
final class KeystoneWalletTests: XCTestCase {

func testParseMultiAccountsWithBTC() {
let multiAccountsCBORHex = "a3011aa424853c0281d9012fa4035821034af544244d31619d773521a1a366373c485ff89de50bea543c2b14cccfbb6a500458208dc2427d8ab23caab07729f88f089a3cfa2cfffcd7d1e507f983c0d44a5dbd3506d90130a10186182cf500f500f5081a149439dc03686b657973746f6e65"
let multiAccountsCBORHex = "a4011aa424853c0281d9012fa4035821034af544244d31619d773521a1a366373c485ff89de50bea543c2b14cccfbb6a500458208dc2427d8ab23caab07729f88f089a3cfa2cfffcd7d1e507f983c0d44a5dbd3506d90130a10186182cf500f500f5081a149439dc03686b657973746f6e650565312e302e32"

let keystoneWallet = KeystoneWallet()
let ur = try! UR(type: "crypto-multi-accounts", cborData: multiAccountsCBORHex.hexadecimal)
Expand All @@ -23,6 +23,7 @@ final class KeystoneWalletTests: XCTestCase {
XCTAssertEqual(multiAccounts.device, "keystone")
XCTAssertEqual(multiAccounts.masterFingerprint, "a424853c")
XCTAssertEqual(multiAccounts.deviceId, nil)
XCTAssertEqual(multiAccounts.deviceVersion, "1.0.2")

XCTAssertEqual(firstHDKey.chain, "BTC")
XCTAssertEqual(firstHDKey.path, "m/44'/0'/0'")
Expand Down

0 comments on commit 8df8a3c

Please sign in to comment.