@idos-network/client 1.0.0-rc.1.0
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 +21 -0
- package/README.md +11 -0
- package/dist/index.d.ts +322 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5633 -0
- package/dist/index.js.map +1 -0
- package/package.json +53 -0
- package/src/enclave/iframe-enclave.ts +237 -0
- package/src/enclave/index.ts +3 -0
- package/src/enclave/metamask-snap-enclave.ts +91 -0
- package/src/enclave/types.ts +44 -0
- package/src/index.ts +472 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 idOS Network
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# idOS Client JavaScript SDK
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@idos-network/client-sdk-js) 
|
|
4
|
+
|
|
5
|
+
## Installing
|
|
6
|
+
|
|
7
|
+
Get [our NPM package](https://www.npmjs.com/package/@idos-network/client) and its dependencies with pnpm or the equivalent of your package manager of choice:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @idos-network/client
|
|
11
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { KwilSigner, NodeKwil, Utils, WebKwil } from "@kwilteam/kwil-js";
|
|
2
|
+
import { JsonRpcSigner, Wallet } from "ethers";
|
|
3
|
+
import { Wallet as Wallet$1 } from "@near-wallet-selector/core";
|
|
4
|
+
|
|
5
|
+
//#region ../@core/src/kwil-actions/schema.d.ts
|
|
6
|
+
declare const DataType: typeof Utils.DataType;
|
|
7
|
+
interface ActionSchemaElem {
|
|
8
|
+
name: string;
|
|
9
|
+
type: typeof DataType.Uuid | typeof DataType.Text | typeof DataType.Int;
|
|
10
|
+
}
|
|
11
|
+
declare const actionSchema: Record<string, ActionSchemaElem[]>;
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region ../@core/src/kwil-infra/create-kwil-client.d.ts
|
|
15
|
+
type KwilActions = typeof actionSchema;
|
|
16
|
+
type ActionName = keyof KwilActions;
|
|
17
|
+
type AllKwilCallAction = { [Name in ActionName]: {
|
|
18
|
+
name: Name;
|
|
19
|
+
// biome-ignore lint/suspicious/noExplicitAny: This is fine
|
|
20
|
+
inputs: Record<KwilActions[Name][number]["name"], any>;
|
|
21
|
+
} };
|
|
22
|
+
type KwilCallActionRequestParams = AllKwilCallAction[ActionName];
|
|
23
|
+
type AllKwilExecuteAction = { [Name in ActionName]: AllKwilCallAction[Name] & {
|
|
24
|
+
description: string;
|
|
25
|
+
} };
|
|
26
|
+
type KwilExecuteActionRequestParams = AllKwilExecuteAction[ActionName];
|
|
27
|
+
/**
|
|
28
|
+
* A client for interacting with kwil with type-safe abstractions for `call` and `execute`.
|
|
29
|
+
* Has utility methods for creating actions and setting a signer.
|
|
30
|
+
*/
|
|
31
|
+
declare class KwilActionClient {
|
|
32
|
+
#private;
|
|
33
|
+
signer?: KwilSigner;
|
|
34
|
+
readonly client: NodeKwil | WebKwil;
|
|
35
|
+
constructor(client: NodeKwil | WebKwil);
|
|
36
|
+
/**
|
|
37
|
+
* Calls an action on the kwil nodes. This similar to `GET` like request.
|
|
38
|
+
*/
|
|
39
|
+
call<T = unknown>(params: KwilCallActionRequestParams, signer?: KwilSigner | undefined): Promise<T>;
|
|
40
|
+
/**
|
|
41
|
+
* Executes an action on the kwil nodes. This similar to `POST` like request.
|
|
42
|
+
*/
|
|
43
|
+
execute(params: KwilExecuteActionRequestParams, signer?: KwilSigner | undefined, synchronous?: boolean): Promise<string | undefined>;
|
|
44
|
+
setSigner(signer: KwilSigner | undefined): void;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region ../@core/src/store/index.d.ts
|
|
49
|
+
/**
|
|
50
|
+
* Create a kwil client for node.js environment
|
|
51
|
+
*/
|
|
52
|
+
interface PipeCodecArgs<T> {
|
|
53
|
+
encode: (o: string) => T;
|
|
54
|
+
decode: (o: T) => string;
|
|
55
|
+
}
|
|
56
|
+
declare class Store {
|
|
57
|
+
#private;
|
|
58
|
+
keyPrefix: string;
|
|
59
|
+
readonly storage: Storage;
|
|
60
|
+
readonly REMEMBER_DURATION_KEY = "storage-expiration";
|
|
61
|
+
constructor(storage: Storage);
|
|
62
|
+
pipeCodec<T>({
|
|
63
|
+
encode,
|
|
64
|
+
decode
|
|
65
|
+
}: PipeCodecArgs<T>): Store;
|
|
66
|
+
// biome-ignore lint/suspicious/noExplicitAny: `any` is fine here.
|
|
67
|
+
get(key: string): any;
|
|
68
|
+
setRememberDuration(days?: number | string): void;
|
|
69
|
+
hasRememberDurationElapsed(): boolean;
|
|
70
|
+
// biome-ignore lint/suspicious/noExplicitAny: `any` is fine here.
|
|
71
|
+
set(key: string, value: any): void;
|
|
72
|
+
reset(): void;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region ../@core/src/types/index.d.ts
|
|
77
|
+
type Wallet$2 = Wallet | JsonRpcSigner | Wallet$1;
|
|
78
|
+
type idOSUser = {
|
|
79
|
+
id: string;
|
|
80
|
+
recipient_encryption_public_key: string;
|
|
81
|
+
};
|
|
82
|
+
type idOSCredential = {
|
|
83
|
+
id: string;
|
|
84
|
+
user_id: string;
|
|
85
|
+
issuer_auth_public_key: string;
|
|
86
|
+
original_id?: string;
|
|
87
|
+
public_notes: string;
|
|
88
|
+
content: string;
|
|
89
|
+
encryptor_public_key: string;
|
|
90
|
+
};
|
|
91
|
+
type idOSWallet = {
|
|
92
|
+
id: string;
|
|
93
|
+
user_id: string;
|
|
94
|
+
address: string;
|
|
95
|
+
wallet_type: string;
|
|
96
|
+
message: string;
|
|
97
|
+
public_key: string;
|
|
98
|
+
signature: string;
|
|
99
|
+
};
|
|
100
|
+
type idOSUserAttribute = {
|
|
101
|
+
id: string;
|
|
102
|
+
attribute_key: string;
|
|
103
|
+
value: string;
|
|
104
|
+
user_id?: string;
|
|
105
|
+
};
|
|
106
|
+
type idOSGrant = {
|
|
107
|
+
id: string;
|
|
108
|
+
ag_owner_user_id: string;
|
|
109
|
+
ag_grantee_wallet_identifier: string;
|
|
110
|
+
data_id: string;
|
|
111
|
+
locked_until: string;
|
|
112
|
+
content_hash?: string;
|
|
113
|
+
};
|
|
114
|
+
type DelegatedWriteGrant = {
|
|
115
|
+
owner_wallet_identifier: string;
|
|
116
|
+
grantee_wallet_identifier: string;
|
|
117
|
+
issuer_public_key: string;
|
|
118
|
+
id: string;
|
|
119
|
+
access_grant_timelock: string;
|
|
120
|
+
not_usable_before: string;
|
|
121
|
+
not_usable_after: string;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region ../@core/src/kwil-actions/credentials.d.ts
|
|
126
|
+
/**
|
|
127
|
+
* Following types are specific to the isle `postMessage` protocol.
|
|
128
|
+
* Do not stress much about them, they will be refactored in the future once the idOS Isle is fully integrated.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
type ShareableCredential = {
|
|
132
|
+
id: string;
|
|
133
|
+
original_credential_id: string;
|
|
134
|
+
public_notes: string;
|
|
135
|
+
public_notes_signature: string;
|
|
136
|
+
broader_signature: string;
|
|
137
|
+
content: string;
|
|
138
|
+
encryptor_public_key: string;
|
|
139
|
+
issuer_auth_public_key: string;
|
|
140
|
+
grantee_wallet_identifier: string;
|
|
141
|
+
locked_until: number;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region ../@core/src/kwil-actions/grants.d.ts
|
|
146
|
+
/**
|
|
147
|
+
* Shares an idOSCredential to the given `userId`.
|
|
148
|
+
*/
|
|
149
|
+
/**
|
|
150
|
+
* Returns the Access Grants for the given `signer` in a paginated manner.
|
|
151
|
+
*/
|
|
152
|
+
interface GetGrantsParams {
|
|
153
|
+
page?: number;
|
|
154
|
+
size?: number;
|
|
155
|
+
user_id?: string | null;
|
|
156
|
+
}
|
|
157
|
+
interface idOSDAGSignatureParams {
|
|
158
|
+
dag_owner_wallet_identifier: string;
|
|
159
|
+
dag_grantee_wallet_identifier: string;
|
|
160
|
+
dag_data_id: string;
|
|
161
|
+
dag_locked_until: number;
|
|
162
|
+
dag_content_hash: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region ../@core/src/kwil-actions/wallets.d.ts
|
|
167
|
+
/**
|
|
168
|
+
* Request a signature for a Delegated Access Grant
|
|
169
|
+
*/
|
|
170
|
+
interface AddWalletParams {
|
|
171
|
+
id: string;
|
|
172
|
+
address: string;
|
|
173
|
+
public_key: string | null;
|
|
174
|
+
message: string;
|
|
175
|
+
signature: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region src/enclave/types.d.ts
|
|
180
|
+
type DiscoverUserEncryptionPublicKeyResponse = {
|
|
181
|
+
userId: string;
|
|
182
|
+
userEncryptionPublicKey: string;
|
|
183
|
+
};
|
|
184
|
+
type EnclaveOptions = {
|
|
185
|
+
container: string;
|
|
186
|
+
theme?: "light" | "dark";
|
|
187
|
+
mode?: "new" | "existing";
|
|
188
|
+
url?: string;
|
|
189
|
+
throwOnUserCancelUnlock?: boolean;
|
|
190
|
+
};
|
|
191
|
+
interface EnclaveProvider {
|
|
192
|
+
load(): Promise<void>;
|
|
193
|
+
reconfigure(options: Omit<EnclaveOptions, "container" | "url">): Promise<void>;
|
|
194
|
+
ready(userId: string, currentUserEncryptionPublicKey?: string): Promise<Uint8Array>;
|
|
195
|
+
reset(): Promise<void>;
|
|
196
|
+
confirm(message: string): Promise<boolean>;
|
|
197
|
+
encrypt(message: Uint8Array, receiverPublicKey?: Uint8Array): Promise<{
|
|
198
|
+
content: Uint8Array;
|
|
199
|
+
encryptorPublicKey: Uint8Array;
|
|
200
|
+
}>;
|
|
201
|
+
decrypt(message: Uint8Array, senderPublicKey?: Uint8Array): Promise<Uint8Array>;
|
|
202
|
+
discoverUserEncryptionPublicKey(userId: string): Promise<DiscoverUserEncryptionPublicKeyResponse>;
|
|
203
|
+
filterCredentials(credentials: idOSCredential[], privateFieldFilters: {
|
|
204
|
+
pick: Record<string, unknown[]>;
|
|
205
|
+
omit: Record<string, unknown[]>;
|
|
206
|
+
}): Promise<idOSCredential[]>;
|
|
207
|
+
backupPasswordOrSecret(): Promise<void>;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/index.d.ts
|
|
212
|
+
type Properties<T> = { [K in keyof T as Exclude<T[K], Function> extends never ? never : K]: T[K] };
|
|
213
|
+
type idOSClient = idOSClientConfiguration | idOSClientIdle | idOSClientWithUserSigner | idOSClientLoggedIn;
|
|
214
|
+
declare class idOSClientConfiguration {
|
|
215
|
+
readonly state: "configuration";
|
|
216
|
+
readonly chainId?: string;
|
|
217
|
+
readonly nodeUrl: string;
|
|
218
|
+
readonly enclaveOptions: Omit<EnclaveOptions, "mode">;
|
|
219
|
+
constructor(params: {
|
|
220
|
+
chainId?: string;
|
|
221
|
+
nodeUrl: string;
|
|
222
|
+
enclaveOptions: Omit<EnclaveOptions, "mode">;
|
|
223
|
+
});
|
|
224
|
+
createClient(): Promise<idOSClientIdle>;
|
|
225
|
+
}
|
|
226
|
+
declare class idOSClientIdle {
|
|
227
|
+
readonly state: "idle";
|
|
228
|
+
readonly store: Store;
|
|
229
|
+
readonly kwilClient: KwilActionClient;
|
|
230
|
+
readonly enclaveProvider: EnclaveProvider;
|
|
231
|
+
constructor(store: Store, kwilClient: KwilActionClient, enclaveProvider: EnclaveProvider);
|
|
232
|
+
static fromConfig(params: idOSClientConfiguration): Promise<idOSClientIdle>;
|
|
233
|
+
addressHasProfile(address: string): Promise<boolean>;
|
|
234
|
+
withUserSigner(signer: Wallet$2): Promise<idOSClientWithUserSigner>;
|
|
235
|
+
logOut(): Promise<idOSClientIdle>;
|
|
236
|
+
}
|
|
237
|
+
declare class idOSClientWithUserSigner implements Omit<Properties<idOSClientIdle>, "state"> {
|
|
238
|
+
readonly state: "with-user-signer";
|
|
239
|
+
readonly store: Store;
|
|
240
|
+
readonly kwilClient: KwilActionClient;
|
|
241
|
+
readonly enclaveProvider: EnclaveProvider;
|
|
242
|
+
readonly signer: Wallet$2;
|
|
243
|
+
readonly kwilSigner: KwilSigner;
|
|
244
|
+
readonly walletIdentifier: string;
|
|
245
|
+
constructor(idOSClientIdle: idOSClientIdle, signer: Wallet$2, kwilSigner: KwilSigner, walletIdentifier: string);
|
|
246
|
+
logOut(): Promise<idOSClientIdle>;
|
|
247
|
+
hasProfile(): Promise<boolean>;
|
|
248
|
+
getUserEncryptionPublicKey(userId: string): Promise<string>;
|
|
249
|
+
logIn(): Promise<idOSClientLoggedIn>;
|
|
250
|
+
}
|
|
251
|
+
declare class idOSClientLoggedIn implements Omit<Properties<idOSClientWithUserSigner>, "state"> {
|
|
252
|
+
readonly state: "logged-in";
|
|
253
|
+
readonly store: Store;
|
|
254
|
+
readonly kwilClient: KwilActionClient;
|
|
255
|
+
readonly enclaveProvider: EnclaveProvider;
|
|
256
|
+
readonly signer: Wallet$2;
|
|
257
|
+
readonly kwilSigner: KwilSigner;
|
|
258
|
+
readonly walletIdentifier: string;
|
|
259
|
+
readonly user: idOSUser;
|
|
260
|
+
constructor(idOSClientWithUserSigner: idOSClientWithUserSigner, user: idOSUser);
|
|
261
|
+
logOut(): Promise<idOSClientIdle>;
|
|
262
|
+
requestDWGMessage(params: DelegatedWriteGrant): Promise<string>;
|
|
263
|
+
removeCredential(id: string): Promise<{
|
|
264
|
+
id: string;
|
|
265
|
+
}>;
|
|
266
|
+
getCredentialById(id: string): Promise<idOSCredential | undefined>;
|
|
267
|
+
shareCredential(credential: ShareableCredential): Promise<ShareableCredential>;
|
|
268
|
+
getAllCredentials(): Promise<idOSCredential[]>;
|
|
269
|
+
getAccessGrantsOwned(): Promise<idOSGrant[]>;
|
|
270
|
+
getCredentialOwned(id: string): Promise<idOSCredential | undefined>;
|
|
271
|
+
getAttributes(): Promise<idOSUserAttribute[]>;
|
|
272
|
+
createAttribute(attribute: idOSUserAttribute): Promise<idOSUserAttribute>;
|
|
273
|
+
getCredentialContentSha256Hash(id: string): Promise<string>;
|
|
274
|
+
createCredentialCopy(id: string, consumerRecipientEncryptionPublicKey: string, consumerAddress: string, lockedUntil: number): Promise<{
|
|
275
|
+
id: string;
|
|
276
|
+
}>;
|
|
277
|
+
requestDAGMessage(params: idOSDAGSignatureParams): Promise<string>;
|
|
278
|
+
getGrants(params: GetGrantsParams): Promise<{
|
|
279
|
+
grants: idOSGrant[];
|
|
280
|
+
totalCount: number;
|
|
281
|
+
}>;
|
|
282
|
+
addWallets(params: AddWalletParams[]): Promise<AddWalletParams[]>;
|
|
283
|
+
getGrantsCount(): Promise<number>;
|
|
284
|
+
getSharedCredential(id: string): Promise<idOSCredential | undefined>;
|
|
285
|
+
revokeAccessGrant(grantId: string): Promise<{
|
|
286
|
+
id: string;
|
|
287
|
+
}>;
|
|
288
|
+
addWallet(params: AddWalletParams): Promise<AddWalletParams>;
|
|
289
|
+
getWallets(): Promise<idOSWallet[]>;
|
|
290
|
+
removeWallet(id: string): Promise<{
|
|
291
|
+
id: string;
|
|
292
|
+
}>;
|
|
293
|
+
removeWallets(ids: string[]): Promise<string[]>;
|
|
294
|
+
filterCredentials(requirements: {
|
|
295
|
+
acceptedIssuers: {
|
|
296
|
+
authPublicKey: string;
|
|
297
|
+
}[];
|
|
298
|
+
publicNotesFieldFilters?: {
|
|
299
|
+
pick: Record<string, unknown[]>;
|
|
300
|
+
omit: Record<string, unknown[]>;
|
|
301
|
+
};
|
|
302
|
+
privateFieldFilters?: {
|
|
303
|
+
pick: Record<string, unknown[]>;
|
|
304
|
+
omit: Record<string, unknown[]>;
|
|
305
|
+
};
|
|
306
|
+
}): Promise<idOSCredential[]>;
|
|
307
|
+
requestAccessGrant(credentialId: string, {
|
|
308
|
+
consumerEncryptionPublicKey,
|
|
309
|
+
consumerAuthPublicKey
|
|
310
|
+
}: {
|
|
311
|
+
consumerEncryptionPublicKey: string;
|
|
312
|
+
consumerAuthPublicKey: string;
|
|
313
|
+
}): Promise<idOSCredential>;
|
|
314
|
+
}
|
|
315
|
+
declare function createIDOSClient(params: {
|
|
316
|
+
nodeUrl: string;
|
|
317
|
+
enclaveOptions: Omit<EnclaveOptions, "mode">;
|
|
318
|
+
}): idOSClientConfiguration;
|
|
319
|
+
|
|
320
|
+
//#endregion
|
|
321
|
+
export { DelegatedWriteGrant, EnclaveOptions, EnclaveProvider, createIDOSClient, idOSClient, idOSClientConfiguration, idOSClientIdle, idOSClientLoggedIn, idOSClientWithUserSigner, idOSCredential, idOSGrant, idOSUser, idOSUserAttribute, idOSWallet };
|
|
322
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["DataType: typeof Utils.DataType","actionSchema: Record<string, ActionSchemaElem[]>","client: NodeKwil | WebKwil","params: KwilCallActionRequestParams","signer: KwilSigner | undefined","params: KwilExecuteActionRequestParams","createNodeKwilClient: (params: CreateKwilClientParams) => Promise<KwilActionClient>","params: CreateKwilClientParams","createWebKwilClient: (params: CreateKwilClientParams) => Promise<KwilActionClient>","o: string","o: T","storage: Storage","key: string","days?: number | string","value: any","message: Extract<IsleNodeMessage, { type: T }>","kwilClient: KwilActionClient","id: string","content_hash: string","params: GetAccessGrantByCredentialIdParams","params: EditCredentialAsIssuerParams","userId: string","params: CreateCredentialByDelegatedWriteGrantParams","credential: ShareableCredential","params: CreateCredentialCopyParams","kwilClient: KwilActionClient","params: { user_id: string | null }","params: GetGrantsParams","params: CreateAccessGrantByDAGParams","id: string","params: idOSDAGSignatureParams","params: DelegatedWriteGrant","kwilClient: KwilActionClient","params: UpsertWalletParams","params: AddWalletParams","params: AddWalletParams[]","id: string","ids: string[]","options: Omit<EnclaveOptions, \"container\" | \"url\">","userId: string","currentUserEncryptionPublicKey?: string","message: string","message: Uint8Array","receiverPublicKey?: Uint8Array","senderPublicKey?: Uint8Array","credentials: idOSCredential[]","privateFieldFilters: {\n pick: Record<string, unknown[]>;\n omit: Record<string, unknown[]>;\n }","params: {\n chainId?: string;\n nodeUrl: string;\n enclaveOptions: Omit<EnclaveOptions, \"mode\">;\n }","store: Store","kwilClient: KwilActionClient","enclaveProvider: EnclaveProvider","params: idOSClientConfiguration","address: string","signer: Wallet","idOSClientIdle: idOSClientIdle","kwilSigner: KwilSigner","walletIdentifier: string","userId: string","idOSClientWithUserSigner: idOSClientWithUserSigner","user: idOSUser","params: DelegatedWriteGrant","id: string","credential: ShareableCredential","attribute: idOSUserAttribute","consumerRecipientEncryptionPublicKey: string","consumerAddress: string","lockedUntil: number","params: idOSDAGSignatureParams","params: GetGrantsParams","params: AddWalletParams[]","grantId: string","params: AddWalletParams","ids: string[]","requirements: {\n acceptedIssuers: {\n authPublicKey: string;\n }[];\n publicNotesFieldFilters?: {\n pick: Record<string, unknown[]>;\n omit: Record<string, unknown[]>;\n };\n privateFieldFilters?: {\n pick: Record<string, unknown[]>;\n omit: Record<string, unknown[]>;\n };\n }","credentialId: string","params: {\n nodeUrl: string;\n enclaveOptions: Omit<EnclaveOptions, \"mode\">;\n}"],"sources":["../../@core/src/kwil-actions/schema.ts","../../@core/src/kwil-infra/create-kwil-client.ts","../../@core/src/store/index.ts","../../@core/src/types/index.ts","../../@core/src/kwil-actions/credentials.ts","../../@core/src/kwil-actions/grants.ts","../../@core/src/kwil-actions/wallets.ts","../src/enclave/types.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;cAEaA,iBAAiB,KAAA,CAAM;UAEnB,gBAAA;;eAEF,QAAA,CAAS,cAAc,QAAA,CAAS,cAAc,QAAA,CAAS;AAJtE;AAEiB,cAKJC,YALI,EAKU,MALV,CAAA,MAAA,EAKyB,gBALzB,EAAA,CAAA;;;;AAAjB,KCSK,WAAA,GDTY,OCSS,YDTT;KCUZ,UAAA,GDVY,MCUO,WDVP;KCYZ,iBAAA,GDVmB,WCWb,UDXa,GAAA;EAAA,IAAA,ECYd,IDZ4B;EAAS;EAAuB,MAAA,ECc1D,MDd0D,CCcnD,WDdmD,CCcvC,IDduC,CAAA,CAAA,MAAA,CAAA,CAAA,MAAA,CAAA,EAAA,GAAA,CAAA;AAGtE,CAAA,EAAA;KCeK,2BAAA,GAA8B,iBDfO,CCeW,UDfX,CAAA;KCiBrC,oBAAA,GDjBqC,WCkB/B,UDlB+B,GCkBlB,iBDlBkB,CCkBA,IDlBA,CAAA,GAAA;EAAA,WAAf,EAAA,MAAA;AAAA,CAAA,EAAA;KC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