@solana-mobile/seed-vault-lib 0.3.3 → 0.4.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.
- package/LICENSE +12 -12
- package/README.md +105 -97
- package/android/build.gradle +12 -4
- package/android/gradlew +185 -185
- package/android/gradlew.bat +89 -89
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/solanamobile/seedvault/model/SigningRequest.kt +44 -44
- package/android/src/main/java/com/solanamobile/seedvault/reactnative/Extensions.kt +98 -98
- package/android/src/main/java/com/solanamobile/seedvault/reactnative/SeedVaultLibReactNativePackage.kt +15 -15
- package/android/src/main/java/com/solanamobile/seedvault/reactnative/SerializationUtils.kt +80 -80
- package/android/src/main/java/com/solanamobile/seedvault/reactnative/SolanaMobileSeedVaultLibModule.kt +50 -29
- package/lib/index.d.ts +162 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +61 -0
- package/lib/index.js.map +1 -0
- package/package.json +38 -64
- package/src/index.ts +3 -0
- package/src/seedVaultEvent.ts +111 -0
- package/src/types.ts +113 -0
- package/src/useSeedVault.ts +100 -0
- package/android/settings.gradle +0 -7
- package/lib/esm/index.js +0 -116
- package/lib/esm/index.native.js +0 -116
- package/lib/esm/package.json +0 -3
- package/lib/types/index.d.ts +0 -172
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.native.d.ts +0 -172
- package/lib/types/index.native.d.ts.map +0 -1
package/lib/types/index.d.ts
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { Permission } from "react-native";
|
|
2
|
-
// ERRORS
|
|
3
|
-
interface SeedVaultError {
|
|
4
|
-
message: string;
|
|
5
|
-
}
|
|
6
|
-
type ActionFailedError = SeedVaultError;
|
|
7
|
-
type NotModifiedError = SeedVaultError;
|
|
8
|
-
// EVENTS
|
|
9
|
-
// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/
|
|
10
|
-
declare const SeedVaultEventType: {
|
|
11
|
-
readonly AuthorizeSeedAccess: "SeedAuthorized";
|
|
12
|
-
readonly CreateNewSeed: "NewSeedCreated";
|
|
13
|
-
readonly ImportExistingSeed: "ExistingSeedImported";
|
|
14
|
-
readonly PayloadsSigned: "PayloadsSigned";
|
|
15
|
-
readonly GetPublicKeys: "PublicKeysEvent";
|
|
16
|
-
readonly ContentChange: "SeedVaultContentChange";
|
|
17
|
-
readonly SeedSettingsShown: "SeedSettingsShown";
|
|
18
|
-
};
|
|
19
|
-
type SeedVaultEventType = (typeof SeedVaultEventType)[keyof typeof SeedVaultEventType];
|
|
20
|
-
interface ISeedVaultEvent {
|
|
21
|
-
__type: SeedVaultEventType;
|
|
22
|
-
}
|
|
23
|
-
// Authorize Seed Access
|
|
24
|
-
type SeedAccessAuthorizedEvent = Readonly<{
|
|
25
|
-
__type: typeof SeedVaultEventType.AuthorizeSeedAccess;
|
|
26
|
-
authToken: string;
|
|
27
|
-
}> & ISeedVaultEvent;
|
|
28
|
-
type AuthorizeSeedAccessEvent = SeedAccessAuthorizedEvent | ActionFailedError;
|
|
29
|
-
// Create New Seed
|
|
30
|
-
type NewSeedCreatedEvent = Readonly<{
|
|
31
|
-
__type: typeof SeedVaultEventType.CreateNewSeed;
|
|
32
|
-
authToken: string;
|
|
33
|
-
}> & ISeedVaultEvent;
|
|
34
|
-
type CreateNewSeedEvent = NewSeedCreatedEvent | ActionFailedError;
|
|
35
|
-
// Import Existing Seed
|
|
36
|
-
type ExistingSeedImportedEvent = Readonly<{
|
|
37
|
-
__type: typeof SeedVaultEventType.ImportExistingSeed;
|
|
38
|
-
authToken: string;
|
|
39
|
-
}> & ISeedVaultEvent;
|
|
40
|
-
type ImportExistingSeedEvent = ExistingSeedImportedEvent | ActionFailedError;
|
|
41
|
-
type SeedEvent = AuthorizeSeedAccessEvent | CreateNewSeedEvent | ImportExistingSeedEvent;
|
|
42
|
-
// Sign Payloads
|
|
43
|
-
type SigningResponse = Readonly<{
|
|
44
|
-
signatures: [
|
|
45
|
-
[
|
|
46
|
-
]
|
|
47
|
-
];
|
|
48
|
-
resolvedDerivationPaths: string[];
|
|
49
|
-
}>;
|
|
50
|
-
type PayloadsSignedEvent = Readonly<{
|
|
51
|
-
__type: typeof SeedVaultEventType.PayloadsSigned;
|
|
52
|
-
result: SigningResponse[];
|
|
53
|
-
}> & ISeedVaultEvent;
|
|
54
|
-
type SignPayloadsEvent = PayloadsSignedEvent | ActionFailedError;
|
|
55
|
-
// Get Public Keys
|
|
56
|
-
type PublicKeyResponse = Readonly<{
|
|
57
|
-
publicKey: [
|
|
58
|
-
];
|
|
59
|
-
publicKeyEncoded: string;
|
|
60
|
-
resolvedDerivationPath: string;
|
|
61
|
-
}>;
|
|
62
|
-
type GotPublicKeyEvent = Readonly<{
|
|
63
|
-
__type: typeof SeedVaultEventType.GetPublicKeys;
|
|
64
|
-
result: PublicKeyResponse[];
|
|
65
|
-
}> & ISeedVaultEvent;
|
|
66
|
-
type PublicKeyEvent = GotPublicKeyEvent | ActionFailedError;
|
|
67
|
-
// Content Change
|
|
68
|
-
type SeedVaultContentChangeNotification = Readonly<{
|
|
69
|
-
__type: typeof SeedVaultEventType.ContentChange;
|
|
70
|
-
uris: string[];
|
|
71
|
-
}> & ISeedVaultEvent;
|
|
72
|
-
type SeedVaultContentChange = SeedVaultContentChangeNotification;
|
|
73
|
-
// Show Seed Settings
|
|
74
|
-
type SeedSettingsShownNotification = Readonly<{
|
|
75
|
-
__type: typeof SeedVaultEventType.SeedSettingsShown;
|
|
76
|
-
}> & ISeedVaultEvent;
|
|
77
|
-
type SeedSettingsShown = SeedSettingsShownNotification;
|
|
78
|
-
type SeedVaultEvent = AuthorizeSeedAccessEvent | CreateNewSeedEvent | ImportExistingSeedEvent | SignPayloadsEvent | PublicKeyEvent | SeedSettingsShown;
|
|
79
|
-
type AuthToken = number;
|
|
80
|
-
type Base64EncodedAddress = string;
|
|
81
|
-
type Base64EncodedSignature = string;
|
|
82
|
-
type Base64EncodedPayload = string;
|
|
83
|
-
type Base64EncodedMessage = Base64EncodedPayload;
|
|
84
|
-
type Base64EncodedTransaction = Base64EncodedPayload;
|
|
85
|
-
type DerivationPath = string;
|
|
86
|
-
type Account = Readonly<{
|
|
87
|
-
id: number;
|
|
88
|
-
name: string;
|
|
89
|
-
derivationPath: DerivationPath;
|
|
90
|
-
publicKeyEncoded: Base64EncodedAddress;
|
|
91
|
-
}>;
|
|
92
|
-
declare const SeedPurpose: {
|
|
93
|
-
readonly SignSolanaTransaction: 0;
|
|
94
|
-
};
|
|
95
|
-
type SeedPurpose = (typeof SeedPurpose)[keyof typeof SeedPurpose];
|
|
96
|
-
type Seed = Readonly<{
|
|
97
|
-
authToken: AuthToken;
|
|
98
|
-
name: string;
|
|
99
|
-
purpose: SeedPurpose;
|
|
100
|
-
}>;
|
|
101
|
-
type SeedPublicKey = Readonly<{
|
|
102
|
-
publicKey: Uint8Array;
|
|
103
|
-
publicKeyEncoded: Base64EncodedAddress;
|
|
104
|
-
resolvedDerivationPath: DerivationPath;
|
|
105
|
-
}>;
|
|
106
|
-
type SigningRequest = Readonly<{
|
|
107
|
-
payload: Base64EncodedPayload;
|
|
108
|
-
requestedSignatures: DerivationPath[];
|
|
109
|
-
}>;
|
|
110
|
-
type SigningResult = Readonly<{
|
|
111
|
-
signatures: Base64EncodedSignature[];
|
|
112
|
-
resolvedDerivationPaths: DerivationPath[];
|
|
113
|
-
}>;
|
|
114
|
-
interface AuthorizeSeedAPI {
|
|
115
|
-
hasUnauthorizedSeeds(): boolean;
|
|
116
|
-
hasUnauthorizedSeedsForPurpose(purpose: SeedPurpose): boolean;
|
|
117
|
-
getAuthorizedSeeds(): Seed[];
|
|
118
|
-
authorizeNewSeed(): {
|
|
119
|
-
authToken: AuthToken;
|
|
120
|
-
};
|
|
121
|
-
deauthorizeSeed(authToken: AuthToken): void;
|
|
122
|
-
}
|
|
123
|
-
interface AccountAPI {
|
|
124
|
-
getAccounts(authToken: AuthToken, filterOnColumn: string, value: any): Account[];
|
|
125
|
-
getUserWallets(authToken: AuthToken): Account[];
|
|
126
|
-
updateAccountName(authToken: AuthToken, accountId: number, name?: string): void;
|
|
127
|
-
updateAccountIsUserWallet(authToken: AuthToken, accountId: number, isUserWallet: boolean): void;
|
|
128
|
-
updateAccountIsValid(authToken: AuthToken, accountId: number, isValid: boolean): void;
|
|
129
|
-
}
|
|
130
|
-
interface CreateNewSeedAPI {
|
|
131
|
-
createNewSeed(): {
|
|
132
|
-
authToken: AuthToken;
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
// TODO
|
|
136
|
-
// interface ImplementationLimitsAPI {
|
|
137
|
-
// getImplementationLimits(): void
|
|
138
|
-
// getImplementationLimitsForPurpose()
|
|
139
|
-
// }
|
|
140
|
-
interface ImportExistingSeedAPI {
|
|
141
|
-
importExistingSeed(): {
|
|
142
|
-
authToken: AuthToken;
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
interface PublicKeyAPI {
|
|
146
|
-
getPublicKey(authToken: AuthToken, derivationPath: DerivationPath): SeedPublicKey;
|
|
147
|
-
getPublicKeys(authToken: AuthToken, derivationPaths: DerivationPath[]): SeedPublicKey[];
|
|
148
|
-
resolveDerivationPath(derivationPath: DerivationPath): DerivationPath;
|
|
149
|
-
resolveDerivationPathForPurpose(derivationPath: DerivationPath, purpose: SeedPurpose): DerivationPath;
|
|
150
|
-
}
|
|
151
|
-
interface SignMessagesAPI {
|
|
152
|
-
signMessage(authToken: AuthToken, derivationPath: DerivationPath, message: Base64EncodedMessage): SigningResult;
|
|
153
|
-
signMessages(authToken: AuthToken, signingRequests: SigningRequest[]): SigningResult[];
|
|
154
|
-
}
|
|
155
|
-
interface SignTransactionsAPI {
|
|
156
|
-
signTransaction(authToken: AuthToken, derivationPath: DerivationPath, transaction: Base64EncodedTransaction): SigningResult;
|
|
157
|
-
signTransactions(authToken: AuthToken, signingRequests: SigningRequest[]): SigningResult[];
|
|
158
|
-
}
|
|
159
|
-
interface SeedVaultAvailabilityAPI {
|
|
160
|
-
isSeedVaultAvailable(allowSimulated: boolean): boolean;
|
|
161
|
-
}
|
|
162
|
-
interface ShowSeedSettingsAPI {
|
|
163
|
-
showSeedSettings(authToken: AuthToken): void;
|
|
164
|
-
}
|
|
165
|
-
interface SeedVaultAPI extends AuthorizeSeedAPI, AccountAPI, CreateNewSeedAPI, ImportExistingSeedAPI, PublicKeyAPI, SeedVaultAvailabilityAPI, SignMessagesAPI, SignTransactionsAPI, ShowSeedSettingsAPI {
|
|
166
|
-
}
|
|
167
|
-
declare const SeedVaultPermissionAndroid: Permission;
|
|
168
|
-
declare const SeedVaultPrivilegedPermissionAndroid: Permission;
|
|
169
|
-
declare function useSeedVault(handleSeedVaultEvent: (event: SeedVaultEvent) => void, handleContentChange: (event: SeedVaultContentChange) => void): void;
|
|
170
|
-
declare const SeedVault: SeedVaultAPI;
|
|
171
|
-
export { SeedVaultError, ActionFailedError, NotModifiedError, SeedVaultEventType, ISeedVaultEvent, SeedAccessAuthorizedEvent, AuthorizeSeedAccessEvent, NewSeedCreatedEvent, CreateNewSeedEvent, ExistingSeedImportedEvent, ImportExistingSeedEvent, SeedEvent, SigningResponse, PayloadsSignedEvent, SignPayloadsEvent, PublicKeyResponse, GotPublicKeyEvent, PublicKeyEvent, SeedVaultContentChangeNotification, SeedVaultContentChange, SeedSettingsShownNotification, SeedSettingsShown, SeedVaultEvent, Account, SeedPurpose, Seed, SeedPublicKey, SigningRequest, SigningResult, SeedVaultAPI, SeedVaultPermissionAndroid, SeedVaultPrivilegedPermissionAndroid, useSeedVault, SeedVault };
|
|
172
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts","../../src/seedVaultEvent.ts","../../src/types.ts","../../src/useSeedVault.ts"],"names":[],"mappings":""}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { Permission } from "react-native";
|
|
2
|
-
// ERRORS
|
|
3
|
-
interface SeedVaultError {
|
|
4
|
-
message: string;
|
|
5
|
-
}
|
|
6
|
-
type ActionFailedError = SeedVaultError;
|
|
7
|
-
type NotModifiedError = SeedVaultError;
|
|
8
|
-
// EVENTS
|
|
9
|
-
// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/
|
|
10
|
-
declare const SeedVaultEventType: {
|
|
11
|
-
readonly AuthorizeSeedAccess: "SeedAuthorized";
|
|
12
|
-
readonly CreateNewSeed: "NewSeedCreated";
|
|
13
|
-
readonly ImportExistingSeed: "ExistingSeedImported";
|
|
14
|
-
readonly PayloadsSigned: "PayloadsSigned";
|
|
15
|
-
readonly GetPublicKeys: "PublicKeysEvent";
|
|
16
|
-
readonly ContentChange: "SeedVaultContentChange";
|
|
17
|
-
readonly SeedSettingsShown: "SeedSettingsShown";
|
|
18
|
-
};
|
|
19
|
-
type SeedVaultEventType = (typeof SeedVaultEventType)[keyof typeof SeedVaultEventType];
|
|
20
|
-
interface ISeedVaultEvent {
|
|
21
|
-
__type: SeedVaultEventType;
|
|
22
|
-
}
|
|
23
|
-
// Authorize Seed Access
|
|
24
|
-
type SeedAccessAuthorizedEvent = Readonly<{
|
|
25
|
-
__type: typeof SeedVaultEventType.AuthorizeSeedAccess;
|
|
26
|
-
authToken: string;
|
|
27
|
-
}> & ISeedVaultEvent;
|
|
28
|
-
type AuthorizeSeedAccessEvent = SeedAccessAuthorizedEvent | ActionFailedError;
|
|
29
|
-
// Create New Seed
|
|
30
|
-
type NewSeedCreatedEvent = Readonly<{
|
|
31
|
-
__type: typeof SeedVaultEventType.CreateNewSeed;
|
|
32
|
-
authToken: string;
|
|
33
|
-
}> & ISeedVaultEvent;
|
|
34
|
-
type CreateNewSeedEvent = NewSeedCreatedEvent | ActionFailedError;
|
|
35
|
-
// Import Existing Seed
|
|
36
|
-
type ExistingSeedImportedEvent = Readonly<{
|
|
37
|
-
__type: typeof SeedVaultEventType.ImportExistingSeed;
|
|
38
|
-
authToken: string;
|
|
39
|
-
}> & ISeedVaultEvent;
|
|
40
|
-
type ImportExistingSeedEvent = ExistingSeedImportedEvent | ActionFailedError;
|
|
41
|
-
type SeedEvent = AuthorizeSeedAccessEvent | CreateNewSeedEvent | ImportExistingSeedEvent;
|
|
42
|
-
// Sign Payloads
|
|
43
|
-
type SigningResponse = Readonly<{
|
|
44
|
-
signatures: [
|
|
45
|
-
[
|
|
46
|
-
]
|
|
47
|
-
];
|
|
48
|
-
resolvedDerivationPaths: string[];
|
|
49
|
-
}>;
|
|
50
|
-
type PayloadsSignedEvent = Readonly<{
|
|
51
|
-
__type: typeof SeedVaultEventType.PayloadsSigned;
|
|
52
|
-
result: SigningResponse[];
|
|
53
|
-
}> & ISeedVaultEvent;
|
|
54
|
-
type SignPayloadsEvent = PayloadsSignedEvent | ActionFailedError;
|
|
55
|
-
// Get Public Keys
|
|
56
|
-
type PublicKeyResponse = Readonly<{
|
|
57
|
-
publicKey: [
|
|
58
|
-
];
|
|
59
|
-
publicKeyEncoded: string;
|
|
60
|
-
resolvedDerivationPath: string;
|
|
61
|
-
}>;
|
|
62
|
-
type GotPublicKeyEvent = Readonly<{
|
|
63
|
-
__type: typeof SeedVaultEventType.GetPublicKeys;
|
|
64
|
-
result: PublicKeyResponse[];
|
|
65
|
-
}> & ISeedVaultEvent;
|
|
66
|
-
type PublicKeyEvent = GotPublicKeyEvent | ActionFailedError;
|
|
67
|
-
// Content Change
|
|
68
|
-
type SeedVaultContentChangeNotification = Readonly<{
|
|
69
|
-
__type: typeof SeedVaultEventType.ContentChange;
|
|
70
|
-
uris: string[];
|
|
71
|
-
}> & ISeedVaultEvent;
|
|
72
|
-
type SeedVaultContentChange = SeedVaultContentChangeNotification;
|
|
73
|
-
// Show Seed Settings
|
|
74
|
-
type SeedSettingsShownNotification = Readonly<{
|
|
75
|
-
__type: typeof SeedVaultEventType.SeedSettingsShown;
|
|
76
|
-
}> & ISeedVaultEvent;
|
|
77
|
-
type SeedSettingsShown = SeedSettingsShownNotification;
|
|
78
|
-
type SeedVaultEvent = AuthorizeSeedAccessEvent | CreateNewSeedEvent | ImportExistingSeedEvent | SignPayloadsEvent | PublicKeyEvent | SeedSettingsShown;
|
|
79
|
-
type AuthToken = number;
|
|
80
|
-
type Base64EncodedAddress = string;
|
|
81
|
-
type Base64EncodedSignature = string;
|
|
82
|
-
type Base64EncodedPayload = string;
|
|
83
|
-
type Base64EncodedMessage = Base64EncodedPayload;
|
|
84
|
-
type Base64EncodedTransaction = Base64EncodedPayload;
|
|
85
|
-
type DerivationPath = string;
|
|
86
|
-
type Account = Readonly<{
|
|
87
|
-
id: number;
|
|
88
|
-
name: string;
|
|
89
|
-
derivationPath: DerivationPath;
|
|
90
|
-
publicKeyEncoded: Base64EncodedAddress;
|
|
91
|
-
}>;
|
|
92
|
-
declare const SeedPurpose: {
|
|
93
|
-
readonly SignSolanaTransaction: 0;
|
|
94
|
-
};
|
|
95
|
-
type SeedPurpose = (typeof SeedPurpose)[keyof typeof SeedPurpose];
|
|
96
|
-
type Seed = Readonly<{
|
|
97
|
-
authToken: AuthToken;
|
|
98
|
-
name: string;
|
|
99
|
-
purpose: SeedPurpose;
|
|
100
|
-
}>;
|
|
101
|
-
type SeedPublicKey = Readonly<{
|
|
102
|
-
publicKey: Uint8Array;
|
|
103
|
-
publicKeyEncoded: Base64EncodedAddress;
|
|
104
|
-
resolvedDerivationPath: DerivationPath;
|
|
105
|
-
}>;
|
|
106
|
-
type SigningRequest = Readonly<{
|
|
107
|
-
payload: Base64EncodedPayload;
|
|
108
|
-
requestedSignatures: DerivationPath[];
|
|
109
|
-
}>;
|
|
110
|
-
type SigningResult = Readonly<{
|
|
111
|
-
signatures: Base64EncodedSignature[];
|
|
112
|
-
resolvedDerivationPaths: DerivationPath[];
|
|
113
|
-
}>;
|
|
114
|
-
interface AuthorizeSeedAPI {
|
|
115
|
-
hasUnauthorizedSeeds(): boolean;
|
|
116
|
-
hasUnauthorizedSeedsForPurpose(purpose: SeedPurpose): boolean;
|
|
117
|
-
getAuthorizedSeeds(): Seed[];
|
|
118
|
-
authorizeNewSeed(): {
|
|
119
|
-
authToken: AuthToken;
|
|
120
|
-
};
|
|
121
|
-
deauthorizeSeed(authToken: AuthToken): void;
|
|
122
|
-
}
|
|
123
|
-
interface AccountAPI {
|
|
124
|
-
getAccounts(authToken: AuthToken, filterOnColumn: string, value: any): Account[];
|
|
125
|
-
getUserWallets(authToken: AuthToken): Account[];
|
|
126
|
-
updateAccountName(authToken: AuthToken, accountId: number, name?: string): void;
|
|
127
|
-
updateAccountIsUserWallet(authToken: AuthToken, accountId: number, isUserWallet: boolean): void;
|
|
128
|
-
updateAccountIsValid(authToken: AuthToken, accountId: number, isValid: boolean): void;
|
|
129
|
-
}
|
|
130
|
-
interface CreateNewSeedAPI {
|
|
131
|
-
createNewSeed(): {
|
|
132
|
-
authToken: AuthToken;
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
// TODO
|
|
136
|
-
// interface ImplementationLimitsAPI {
|
|
137
|
-
// getImplementationLimits(): void
|
|
138
|
-
// getImplementationLimitsForPurpose()
|
|
139
|
-
// }
|
|
140
|
-
interface ImportExistingSeedAPI {
|
|
141
|
-
importExistingSeed(): {
|
|
142
|
-
authToken: AuthToken;
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
interface PublicKeyAPI {
|
|
146
|
-
getPublicKey(authToken: AuthToken, derivationPath: DerivationPath): SeedPublicKey;
|
|
147
|
-
getPublicKeys(authToken: AuthToken, derivationPaths: DerivationPath[]): SeedPublicKey[];
|
|
148
|
-
resolveDerivationPath(derivationPath: DerivationPath): DerivationPath;
|
|
149
|
-
resolveDerivationPathForPurpose(derivationPath: DerivationPath, purpose: SeedPurpose): DerivationPath;
|
|
150
|
-
}
|
|
151
|
-
interface SignMessagesAPI {
|
|
152
|
-
signMessage(authToken: AuthToken, derivationPath: DerivationPath, message: Base64EncodedMessage): SigningResult;
|
|
153
|
-
signMessages(authToken: AuthToken, signingRequests: SigningRequest[]): SigningResult[];
|
|
154
|
-
}
|
|
155
|
-
interface SignTransactionsAPI {
|
|
156
|
-
signTransaction(authToken: AuthToken, derivationPath: DerivationPath, transaction: Base64EncodedTransaction): SigningResult;
|
|
157
|
-
signTransactions(authToken: AuthToken, signingRequests: SigningRequest[]): SigningResult[];
|
|
158
|
-
}
|
|
159
|
-
interface SeedVaultAvailabilityAPI {
|
|
160
|
-
isSeedVaultAvailable(allowSimulated: boolean): boolean;
|
|
161
|
-
}
|
|
162
|
-
interface ShowSeedSettingsAPI {
|
|
163
|
-
showSeedSettings(authToken: AuthToken): void;
|
|
164
|
-
}
|
|
165
|
-
interface SeedVaultAPI extends AuthorizeSeedAPI, AccountAPI, CreateNewSeedAPI, ImportExistingSeedAPI, PublicKeyAPI, SeedVaultAvailabilityAPI, SignMessagesAPI, SignTransactionsAPI, ShowSeedSettingsAPI {
|
|
166
|
-
}
|
|
167
|
-
declare const SeedVaultPermissionAndroid: Permission;
|
|
168
|
-
declare const SeedVaultPrivilegedPermissionAndroid: Permission;
|
|
169
|
-
declare function useSeedVault(handleSeedVaultEvent: (event: SeedVaultEvent) => void, handleContentChange: (event: SeedVaultContentChange) => void): void;
|
|
170
|
-
declare const SeedVault: SeedVaultAPI;
|
|
171
|
-
export { SeedVaultError, ActionFailedError, NotModifiedError, SeedVaultEventType, ISeedVaultEvent, SeedAccessAuthorizedEvent, AuthorizeSeedAccessEvent, NewSeedCreatedEvent, CreateNewSeedEvent, ExistingSeedImportedEvent, ImportExistingSeedEvent, SeedEvent, SigningResponse, PayloadsSignedEvent, SignPayloadsEvent, PublicKeyResponse, GotPublicKeyEvent, PublicKeyEvent, SeedVaultContentChangeNotification, SeedVaultContentChange, SeedSettingsShownNotification, SeedSettingsShown, SeedVaultEvent, Account, SeedPurpose, Seed, SeedPublicKey, SigningRequest, SigningResult, SeedVaultAPI, SeedVaultPermissionAndroid, SeedVaultPrivilegedPermissionAndroid, useSeedVault, SeedVault };
|
|
172
|
-
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../src/index.ts","../../src/seedVaultEvent.ts","../../src/types.ts","../../src/useSeedVault.ts"],"names":[],"mappings":""}
|