@libid/contracts 0.8.0 → 0.9.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.
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
* error that says why.
|
|
20
20
|
*
|
|
21
21
|
* Changing a value here changes what a deployed verifier accepts. That is a
|
|
22
|
-
* new ceremonyVersion, not an edit
|
|
23
|
-
* against the last release and refuses a changed profile that kept its
|
|
24
|
-
* version.
|
|
22
|
+
* new ceremonyVersion, not an edit.
|
|
25
23
|
*/
|
|
26
24
|
/** Which shape a platform's immutable identifier takes in its response. */
|
|
27
25
|
export type IdShape = 'jsonString' | 'jsonInteger';
|
|
@@ -37,6 +35,12 @@ export interface TokenSession {
|
|
|
37
35
|
readonly session: Session;
|
|
38
36
|
/** The body field committed rather than revealed, or null. */
|
|
39
37
|
readonly secretField: string | null;
|
|
38
|
+
/** Every header this request sends, lowercased, in no particular order.
|
|
39
|
+
* `content-length` is absent: the HTTP client appends it. */
|
|
40
|
+
readonly requestHeaders: readonly string[];
|
|
41
|
+
/** The same lines joined by CRLF, which a Platform Verifier splits and
|
|
42
|
+
* matches as a set. */
|
|
43
|
+
readonly requestHeaderBlock: string;
|
|
40
44
|
}
|
|
41
45
|
export interface IdentitySession {
|
|
42
46
|
readonly session: Session;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/ceremony/profiles.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/ceremony/profiles.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,2EAA2E;AAC3E,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG,aAAa,CAAA;AAElD,MAAM,WAAW,OAAO;IACtB,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,MAAM,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AO,EAAE,OAAO,GAAG,MAAM,CAEzD;AAED,sDAAsD;AACtD,eAAO,MAAM,mCAAmC,MAAM,CAAA;AACtD,eAAO,MAAM,wBAAwB,OAAO,CAAA;AAC5C,eAAO,MAAM,6BAA6B,OAAO,CAAA"}
|
|
@@ -26,6 +26,13 @@ export const X = {
|
|
|
26
26
|
requestLine: 'POST /2/oauth2/token ',
|
|
27
27
|
},
|
|
28
28
|
secretField: null,
|
|
29
|
+
requestHeaders: [
|
|
30
|
+
'host: api.x.com',
|
|
31
|
+
'content-type: application/x-www-form-urlencoded',
|
|
32
|
+
'accept: application/json',
|
|
33
|
+
'connection: close',
|
|
34
|
+
],
|
|
35
|
+
requestHeaderBlock: 'host: api.x.com\r\ncontent-type: application/x-www-form-urlencoded\r\naccept: application/json\r\nconnection: close',
|
|
29
36
|
},
|
|
30
37
|
identity: {
|
|
31
38
|
session: {
|
|
@@ -56,6 +63,13 @@ export const GITHUB = {
|
|
|
56
63
|
requestLine: 'POST /login/oauth/access_token ',
|
|
57
64
|
},
|
|
58
65
|
secretField: 'client_secret',
|
|
66
|
+
requestHeaders: [
|
|
67
|
+
'host: github.com',
|
|
68
|
+
'content-type: application/x-www-form-urlencoded',
|
|
69
|
+
'accept: application/json',
|
|
70
|
+
'connection: close',
|
|
71
|
+
],
|
|
72
|
+
requestHeaderBlock: 'host: github.com\r\ncontent-type: application/x-www-form-urlencoded\r\naccept: application/json\r\nconnection: close',
|
|
59
73
|
},
|
|
60
74
|
identity: {
|
|
61
75
|
session: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/ceremony/profiles.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oEAAoE;
|
|
1
|
+
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/ceremony/profiles.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oEAAoE;AAiEpE;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,G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B;QACD,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,aAAa;QACtB,WAAW,EAAE,OAAO;KACrB;CACF,CAAA;AAED,8BAA8B;AAC9B,MAAM,CAAC,MAAM,MAAM,GAAuB,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAA;AAE7D,4DAA4D;AAC5D,MAAM,UAAU,MAAM,CAAC,QAAgB;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAA;AACpD,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7D,CAAC;AAED,sDAAsD;AACtD,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAG,CAAA;AACtD,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAA;AAC5C,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libid/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Typed viem-ready ABIs and call builders for the libid contracts, plus the identity helper layer (handle normalization, name resolution).",
|
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
|
6
6
|
"repository": {
|
package/src/ceremony/profiles.ts
CHANGED
|
@@ -22,9 +22,7 @@
|
|
|
22
22
|
* error that says why.
|
|
23
23
|
*
|
|
24
24
|
* Changing a value here changes what a deployed verifier accepts. That is a
|
|
25
|
-
* new ceremonyVersion, not an edit
|
|
26
|
-
* against the last release and refuses a changed profile that kept its
|
|
27
|
-
* version.
|
|
25
|
+
* new ceremonyVersion, not an edit.
|
|
28
26
|
*/
|
|
29
27
|
|
|
30
28
|
/** Which shape a platform's immutable identifier takes in its response. */
|
|
@@ -43,6 +41,12 @@ export interface TokenSession {
|
|
|
43
41
|
readonly session: Session
|
|
44
42
|
/** The body field committed rather than revealed, or null. */
|
|
45
43
|
readonly secretField: string | null
|
|
44
|
+
/** Every header this request sends, lowercased, in no particular order.
|
|
45
|
+
* `content-length` is absent: the HTTP client appends it. */
|
|
46
|
+
readonly requestHeaders: readonly string[]
|
|
47
|
+
/** The same lines joined by CRLF, which a Platform Verifier splits and
|
|
48
|
+
* matches as a set. */
|
|
49
|
+
readonly requestHeaderBlock: string
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
export interface IdentitySession {
|
|
@@ -87,6 +91,14 @@ export const X: Profile = {
|
|
|
87
91
|
requestLine: 'POST /2/oauth2/token ',
|
|
88
92
|
},
|
|
89
93
|
secretField: null,
|
|
94
|
+
requestHeaders: [
|
|
95
|
+
'host: api.x.com',
|
|
96
|
+
'content-type: application/x-www-form-urlencoded',
|
|
97
|
+
'accept: application/json',
|
|
98
|
+
'connection: close',
|
|
99
|
+
],
|
|
100
|
+
requestHeaderBlock:
|
|
101
|
+
'host: api.x.com\r\ncontent-type: application/x-www-form-urlencoded\r\naccept: application/json\r\nconnection: close',
|
|
90
102
|
},
|
|
91
103
|
identity: {
|
|
92
104
|
session: {
|
|
@@ -118,6 +130,14 @@ export const GITHUB: Profile = {
|
|
|
118
130
|
requestLine: 'POST /login/oauth/access_token ',
|
|
119
131
|
},
|
|
120
132
|
secretField: 'client_secret',
|
|
133
|
+
requestHeaders: [
|
|
134
|
+
'host: github.com',
|
|
135
|
+
'content-type: application/x-www-form-urlencoded',
|
|
136
|
+
'accept: application/json',
|
|
137
|
+
'connection: close',
|
|
138
|
+
],
|
|
139
|
+
requestHeaderBlock:
|
|
140
|
+
'host: github.com\r\ncontent-type: application/x-www-form-urlencoded\r\naccept: application/json\r\nconnection: close',
|
|
121
141
|
},
|
|
122
142
|
identity: {
|
|
123
143
|
session: {
|