@keyringnetwork/keyring-connect-sdk 0.0.1 → 0.0.2
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/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/env.js +1 -1
- package/dist/types.d.ts +68 -16
- package/package.json +2 -2
package/dist/constants.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const EXTENSION_ID = "
|
|
1
|
+
export declare const EXTENSION_ID = "pninfjlkopblipjddjdannflkbdkcmpi";
|
package/dist/constants.js
CHANGED
package/dist/env.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -4,22 +4,34 @@ export declare enum EVENT_ACTIONS {
|
|
|
4
4
|
KEYRING_CONNECT_STATUS = "KEYRING_CONNECT_STATUS"
|
|
5
5
|
}
|
|
6
6
|
export type LaunchKeyringConnectData = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
client: {
|
|
8
|
+
/**
|
|
9
|
+
* The name of the client.
|
|
10
|
+
*/
|
|
11
|
+
client_name: string;
|
|
12
|
+
/**
|
|
13
|
+
* The URL of the client app which the chrome extension will communicate with.
|
|
14
|
+
*/
|
|
15
|
+
client_app_url: string;
|
|
16
|
+
/**
|
|
17
|
+
* The URL of the client logo.
|
|
18
|
+
*/
|
|
19
|
+
client_logo_url: string;
|
|
20
|
+
/**
|
|
21
|
+
* The policy ID of the client.
|
|
22
|
+
*/
|
|
23
|
+
client_policy_id: number;
|
|
24
|
+
};
|
|
25
|
+
proof_config?: {
|
|
26
|
+
/**
|
|
27
|
+
* The data source to be used for the proof.
|
|
28
|
+
*/
|
|
29
|
+
datasource: DataSource;
|
|
30
|
+
/**
|
|
31
|
+
* The entity type to be used for the proof.
|
|
32
|
+
*/
|
|
33
|
+
entity_type: string;
|
|
34
|
+
};
|
|
23
35
|
};
|
|
24
36
|
export type ExtensionStatus = 'idle' | 'mounted' | 'proving' | 'prove_success' | 'error';
|
|
25
37
|
export type AttestationStatus = 'onboarding_required' | 'onboarding_pending' | 'attestation_ready' | 'non_compliant';
|
|
@@ -52,3 +64,43 @@ export interface ExtensionStatusData {
|
|
|
52
64
|
error?: string;
|
|
53
65
|
user?: UserState;
|
|
54
66
|
}
|
|
67
|
+
export interface DataSource {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
label: string;
|
|
71
|
+
user_actions?: string[];
|
|
72
|
+
link: string;
|
|
73
|
+
login_url: string;
|
|
74
|
+
target_url: string | null;
|
|
75
|
+
image: string;
|
|
76
|
+
proof_sources: ProofSource[];
|
|
77
|
+
}
|
|
78
|
+
export interface ProofSource {
|
|
79
|
+
id: string;
|
|
80
|
+
endpoint: TlsnEndpoint;
|
|
81
|
+
claims: Claim[];
|
|
82
|
+
label?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface TlsnEndpoint {
|
|
85
|
+
url: string;
|
|
86
|
+
method: string;
|
|
87
|
+
headers: string[];
|
|
88
|
+
disclosable_fields: DisclosableField[];
|
|
89
|
+
required_cookies?: string[] | null;
|
|
90
|
+
data_bounds?: DataBounds | null;
|
|
91
|
+
body?: string | null;
|
|
92
|
+
}
|
|
93
|
+
export interface Claim {
|
|
94
|
+
id: string;
|
|
95
|
+
label: string;
|
|
96
|
+
rule_id: string;
|
|
97
|
+
entity_type: string;
|
|
98
|
+
}
|
|
99
|
+
export interface DataBounds {
|
|
100
|
+
max_sent_data: number;
|
|
101
|
+
max_recv_data: number;
|
|
102
|
+
}
|
|
103
|
+
export interface DisclosableField {
|
|
104
|
+
label: string;
|
|
105
|
+
path: string;
|
|
106
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keyringnetwork/keyring-connect-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "An SDK for interacting with Keyring Connect browser extension",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
"ts-node": "^10.9.2",
|
|
19
19
|
"typescript": "^5.6.3"
|
|
20
20
|
}
|
|
21
|
-
}
|
|
21
|
+
}
|