@solana-mobile/seed-vault-lib 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,7 +43,9 @@ class SolanaMobileSeedVaultLibModule(val reactContext: ReactApplicationContext)
|
|
|
43
43
|
init {
|
|
44
44
|
reactContext.addActivityEventListener(mActivityEventListener)
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
if (SeedVault.isAvailable(reactContext, true)) {
|
|
47
|
+
observeSeedVaultContentChanges()
|
|
48
|
+
}
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
@ReactMethod
|
|
@@ -542,4 +544,4 @@ class SolanaMobileSeedVaultLibModule(val reactContext: ReactApplicationContext)
|
|
|
542
544
|
private const val DEFAULT_ACTIVITY_RESULT_TIMEOUT_MS = 300000L
|
|
543
545
|
private const val MINIMUM_ACTIVITY_RESULT_TIMEOUT_MS = 30000L
|
|
544
546
|
}
|
|
545
|
-
}
|
|
547
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -139,7 +139,10 @@ interface SignTransactionsAPI {
|
|
|
139
139
|
signTransaction(authToken: AuthToken, derivationPath: DerivationPath, transaction: Base64EncodedTransaction): SigningResult;
|
|
140
140
|
signTransactions(authToken: AuthToken, signingRequests: SigningRequest[]): SigningResult[];
|
|
141
141
|
}
|
|
142
|
-
interface
|
|
142
|
+
interface SeedVaultAvailabilityAPI {
|
|
143
|
+
isSeedVaultAvailable(allowSimulated: boolean): boolean;
|
|
144
|
+
}
|
|
145
|
+
interface SeedVaultAPI extends AuthorizeSeedAPI, AccountAPI, CreateNewSeedAPI, ImportExistingSeedAPI, PublicKeyAPI, SeedVaultAvailabilityAPI, SignMessagesAPI, SignTransactionsAPI {
|
|
143
146
|
}
|
|
144
147
|
declare const SeedVaultPermissionAndroid: Permission;
|
|
145
148
|
declare function useSeedVault(handleSeedVaultEvent: (event: SeedVaultEvent) => void, handleContentChange: (event: SeedVaultContentChange) => void): void;
|
|
@@ -139,7 +139,10 @@ interface SignTransactionsAPI {
|
|
|
139
139
|
signTransaction(authToken: AuthToken, derivationPath: DerivationPath, transaction: Base64EncodedTransaction): SigningResult;
|
|
140
140
|
signTransactions(authToken: AuthToken, signingRequests: SigningRequest[]): SigningResult[];
|
|
141
141
|
}
|
|
142
|
-
interface
|
|
142
|
+
interface SeedVaultAvailabilityAPI {
|
|
143
|
+
isSeedVaultAvailable(allowSimulated: boolean): boolean;
|
|
144
|
+
}
|
|
145
|
+
interface SeedVaultAPI extends AuthorizeSeedAPI, AccountAPI, CreateNewSeedAPI, ImportExistingSeedAPI, PublicKeyAPI, SeedVaultAvailabilityAPI, SignMessagesAPI, SignTransactionsAPI {
|
|
143
146
|
}
|
|
144
147
|
declare const SeedVaultPermissionAndroid: Permission;
|
|
145
148
|
declare function useSeedVault(handleSeedVaultEvent: (event: SeedVaultEvent) => void, handleContentChange: (event: SeedVaultContentChange) => void): void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-mobile/seed-vault-lib",
|
|
3
3
|
"description": "A React Native wrapper of the Solana Mobile, Seed Vault SDK. Apps can use this to interact with seed vault implementations on Android",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"author": "Marco Martinez <marco.martinez@solanamobile.com>",
|
|
6
6
|
"repository": "https://github.com/solana-mobile/seed-vault-sdk",
|
|
7
7
|
"license": "Apache-2.0",
|
package/src/types.ts
CHANGED
|
@@ -81,11 +81,16 @@ interface SignTransactionsAPI {
|
|
|
81
81
|
signTransactions(authToken: AuthToken, signingRequests: SigningRequest[]): SigningResult[]
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
interface SeedVaultAvailabilityAPI {
|
|
85
|
+
isSeedVaultAvailable(allowSimulated: boolean): boolean
|
|
86
|
+
}
|
|
87
|
+
|
|
84
88
|
export interface SeedVaultAPI
|
|
85
89
|
extends AuthorizeSeedAPI,
|
|
86
90
|
AccountAPI,
|
|
87
91
|
CreateNewSeedAPI,
|
|
88
92
|
ImportExistingSeedAPI,
|
|
89
93
|
PublicKeyAPI,
|
|
94
|
+
SeedVaultAvailabilityAPI,
|
|
90
95
|
SignMessagesAPI,
|
|
91
|
-
SignTransactionsAPI {}
|
|
96
|
+
SignTransactionsAPI {}
|