@enbox/protocols 0.1.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.
- package/dist/esm/connect.js +36 -0
- package/dist/esm/connect.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lists.js +7 -7
- package/dist/esm/lists.js.map +1 -1
- package/dist/esm/preferences.js +5 -5
- package/dist/esm/preferences.js.map +1 -1
- package/dist/esm/profile.js +17 -7
- package/dist/esm/profile.js.map +1 -1
- package/dist/esm/social-graph.js +5 -5
- package/dist/esm/social-graph.js.map +1 -1
- package/dist/esm/status.js +4 -4
- package/dist/esm/status.js.map +1 -1
- package/dist/types/connect.d.ts +56 -0
- package/dist/types/connect.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lists.d.ts +14 -14
- package/dist/types/preferences.d.ts +10 -10
- package/dist/types/profile.d.ts +41 -12
- package/dist/types/profile.d.ts.map +1 -1
- package/dist/types/social-graph.d.ts +10 -10
- package/dist/types/status.d.ts +8 -8
- package/package.json +3 -3
- package/src/connect.ts +64 -0
- package/src/index.ts +1 -0
- package/src/lists.ts +7 -7
- package/src/preferences.ts +5 -5
- package/src/profile.ts +22 -7
- package/src/social-graph.ts +5 -5
- package/src/status.ts +4 -4
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connect Protocol — wallet and app discovery information.
|
|
3
|
+
*
|
|
4
|
+
* Stores metadata about which wallet applications and services a DID
|
|
5
|
+
* is associated with. Published so that other apps can discover how
|
|
6
|
+
* to connect to this identity.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { defineProtocol } from '@enbox/api';
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// Protocol definition
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
export const ConnectDefinition = {
|
|
15
|
+
protocol: 'https://identity.foundation/protocols/connect',
|
|
16
|
+
published: true,
|
|
17
|
+
types: {
|
|
18
|
+
wallet: {
|
|
19
|
+
schema: 'https://identity.foundation/schemas/connect/wallet',
|
|
20
|
+
dataFormats: ['application/json'],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
structure: {
|
|
24
|
+
wallet: {
|
|
25
|
+
$actions: [
|
|
26
|
+
{ who: 'anyone', can: ['read'] },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
// Typed protocol export
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
/** Typed Connect protocol for use with `dwn.using()`. */
|
|
35
|
+
export const ConnectProtocol = defineProtocol(ConnectDefinition, {});
|
|
36
|
+
//# sourceMappingURL=connect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAqB5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAI,+CAA+C;IAC3D,SAAS,EAAG,IAAI;IAChB,KAAK,EAAO;QACV,MAAM,EAAE;YACN,MAAM,EAAQ,oDAAoD;YAClE,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;KACF;IACD,SAAS,EAAE;QACT,MAAM,EAAE;YACN,QAAQ,EAAE;gBACR,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE;aACjC;SACF;KACF;CACoC,CAAC;AAExC,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAC3C,iBAAiB,EACjB,EAAsB,CACvB,CAAC"}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
|
package/dist/esm/lists.js
CHANGED
|
@@ -15,30 +15,30 @@ import { defineProtocol } from '@enbox/api';
|
|
|
15
15
|
// Protocol definition
|
|
16
16
|
// ---------------------------------------------------------------------------
|
|
17
17
|
export const ListsDefinition = {
|
|
18
|
-
protocol: 'https://
|
|
18
|
+
protocol: 'https://identity.foundation/protocols/lists',
|
|
19
19
|
published: false,
|
|
20
20
|
uses: {
|
|
21
|
-
social: 'https://
|
|
21
|
+
social: 'https://identity.foundation/protocols/social-graph',
|
|
22
22
|
},
|
|
23
23
|
types: {
|
|
24
24
|
list: {
|
|
25
|
-
schema: 'https://
|
|
25
|
+
schema: 'https://identity.foundation/schemas/lists/list',
|
|
26
26
|
dataFormats: ['application/json'],
|
|
27
27
|
},
|
|
28
28
|
item: {
|
|
29
|
-
schema: 'https://
|
|
29
|
+
schema: 'https://identity.foundation/schemas/lists/item',
|
|
30
30
|
dataFormats: ['application/json'],
|
|
31
31
|
},
|
|
32
32
|
folder: {
|
|
33
|
-
schema: 'https://
|
|
33
|
+
schema: 'https://identity.foundation/schemas/lists/folder',
|
|
34
34
|
dataFormats: ['application/json'],
|
|
35
35
|
},
|
|
36
36
|
collaborator: {
|
|
37
|
-
schema: 'https://
|
|
37
|
+
schema: 'https://identity.foundation/schemas/lists/collaborator',
|
|
38
38
|
dataFormats: ['application/json'],
|
|
39
39
|
},
|
|
40
40
|
comment: {
|
|
41
|
-
schema: 'https://
|
|
41
|
+
schema: 'https://identity.foundation/schemas/lists/comment',
|
|
42
42
|
dataFormats: ['application/json'],
|
|
43
43
|
},
|
|
44
44
|
},
|
package/dist/esm/lists.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists.js","sourceRoot":"","sources":["../../src/lists.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAsD5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAI,
|
|
1
|
+
{"version":3,"file":"lists.js","sourceRoot":"","sources":["../../src/lists.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAsD5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAI,6CAA6C;IACzD,SAAS,EAAG,KAAK;IACjB,IAAI,EAAQ;QACV,MAAM,EAAE,oDAAoD;KAC7D;IACD,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,MAAM,EAAQ,gDAAgD;YAC9D,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,IAAI,EAAE;YACJ,MAAM,EAAQ,gDAAgD;YAC9D,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,MAAM,EAAE;YACN,MAAM,EAAQ,kDAAkD;YAChE,WAAW,EAAG,CAAC,kBAAkB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,EAAG,KAAK;oBAC3B,GAAG,EAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE;iBACzC;aACF;SACF;QACD,MAAM,EAAE;YACN,QAAQ,EAAG,EAAE;YACb,KAAK,EAAM;gBACT,mBAAmB,EAAG,IAAI;gBAC1B,SAAS,EAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;aACzC;YACD,MAAM,EAAE;gBACN,QAAQ,EAAG,EAAE;gBACb,MAAM,EAAK;oBACT,QAAQ,EAAE,EAAE;iBACb;aACF;SACF;KACF;CACoC,CAAC;AAExC,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,uDAAuD;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CACzC,eAAe,EACf,EAAoB,CACrB,CAAC"}
|
package/dist/esm/preferences.js
CHANGED
|
@@ -12,24 +12,24 @@ import { defineProtocol } from '@enbox/api';
|
|
|
12
12
|
// Protocol definition
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
export const PreferencesDefinition = {
|
|
15
|
-
protocol: 'https://
|
|
15
|
+
protocol: 'https://identity.foundation/protocols/preferences',
|
|
16
16
|
published: false,
|
|
17
17
|
types: {
|
|
18
18
|
theme: {
|
|
19
|
-
schema: 'https://
|
|
19
|
+
schema: 'https://identity.foundation/schemas/preferences/theme',
|
|
20
20
|
dataFormats: ['application/json'],
|
|
21
21
|
},
|
|
22
22
|
locale: {
|
|
23
|
-
schema: 'https://
|
|
23
|
+
schema: 'https://identity.foundation/schemas/preferences/locale',
|
|
24
24
|
dataFormats: ['application/json'],
|
|
25
25
|
},
|
|
26
26
|
privacy: {
|
|
27
|
-
schema: 'https://
|
|
27
|
+
schema: 'https://identity.foundation/schemas/preferences/privacy',
|
|
28
28
|
dataFormats: ['application/json'],
|
|
29
29
|
encryptionRequired: true,
|
|
30
30
|
},
|
|
31
31
|
notification: {
|
|
32
|
-
schema: 'https://
|
|
32
|
+
schema: 'https://identity.foundation/schemas/preferences/notification',
|
|
33
33
|
dataFormats: ['application/json'],
|
|
34
34
|
},
|
|
35
35
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../../src/preferences.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAoD5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ,EAAI,
|
|
1
|
+
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../../src/preferences.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAoD5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ,EAAI,mDAAmD;IAC/D,SAAS,EAAG,KAAK;IACjB,KAAK,EAAO;QACV,KAAK,EAAE;YACL,MAAM,EAAQ,uDAAuD;YACrE,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,MAAM,EAAE;YACN,MAAM,EAAQ,wDAAwD;YACtE,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,OAAO,EAAE;YACP,MAAM,EAAe,yDAAyD;YAC9E,WAAW,EAAU,CAAC,kBAAkB,CAAC;YACzC,kBAAkB,EAAG,IAAI;SAC1B;QACD,YAAY,EAAE;YACZ,MAAM,EAAQ,8DAA8D;YAC5E,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;KACF;IACD,SAAS,EAAE;QACT,KAAK,EAAE;YACL,QAAQ,EAAE,EAAE;SACb;QACD,MAAM,EAAE;YACN,QAAQ,EAAE,EAAE;SACb;QACD,OAAO,EAAE;YACP,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAG,EAAE;YACb,KAAK,EAAM;gBACT,aAAa,EAAS,CAAC,SAAS,CAAC;gBACjC,mBAAmB,EAAG,KAAK;gBAC3B,OAAO,EAAe,EAAE,IAAI,EAAE,QAAQ,EAAE;aACzC;SACF;KACF;CACoC,CAAC;AAExC,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,6DAA6D;AAC7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAC/C,qBAAqB,EACrB,EAA0B,CAC3B,CAAC"}
|
package/dist/esm/profile.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Profile Protocol — public and semi-private identity information.
|
|
3
3
|
*
|
|
4
|
-
* Supports a published profile record, avatar (binary),
|
|
5
|
-
* private notes visible only to friends (via Social Graph
|
|
4
|
+
* Supports a published profile record, avatar and hero images (binary),
|
|
5
|
+
* links, and private notes visible only to friends (via Social Graph
|
|
6
|
+
* composition).
|
|
6
7
|
*
|
|
7
8
|
* @module
|
|
8
9
|
*/
|
|
@@ -11,25 +12,28 @@ import { defineProtocol } from '@enbox/api';
|
|
|
11
12
|
// Protocol definition
|
|
12
13
|
// ---------------------------------------------------------------------------
|
|
13
14
|
export const ProfileDefinition = {
|
|
14
|
-
protocol: 'https://
|
|
15
|
+
protocol: 'https://identity.foundation/protocols/profile',
|
|
15
16
|
published: true,
|
|
16
17
|
uses: {
|
|
17
|
-
social: 'https://
|
|
18
|
+
social: 'https://identity.foundation/protocols/social-graph',
|
|
18
19
|
},
|
|
19
20
|
types: {
|
|
20
21
|
profile: {
|
|
21
|
-
schema: 'https://
|
|
22
|
+
schema: 'https://identity.foundation/schemas/profile/profile',
|
|
22
23
|
dataFormats: ['application/json'],
|
|
23
24
|
},
|
|
24
25
|
avatar: {
|
|
25
26
|
dataFormats: ['image/png', 'image/jpeg', 'image/gif', 'image/webp'],
|
|
26
27
|
},
|
|
28
|
+
hero: {
|
|
29
|
+
dataFormats: ['image/png', 'image/jpeg', 'image/gif', 'image/webp'],
|
|
30
|
+
},
|
|
27
31
|
link: {
|
|
28
|
-
schema: 'https://
|
|
32
|
+
schema: 'https://identity.foundation/schemas/profile/link',
|
|
29
33
|
dataFormats: ['application/json'],
|
|
30
34
|
},
|
|
31
35
|
privateNote: {
|
|
32
|
-
schema: 'https://
|
|
36
|
+
schema: 'https://identity.foundation/schemas/profile/private-note',
|
|
33
37
|
dataFormats: ['application/json'],
|
|
34
38
|
},
|
|
35
39
|
},
|
|
@@ -45,6 +49,12 @@ export const ProfileDefinition = {
|
|
|
45
49
|
{ who: 'anyone', can: ['read'] },
|
|
46
50
|
],
|
|
47
51
|
},
|
|
52
|
+
hero: {
|
|
53
|
+
$size: { max: 2097152 },
|
|
54
|
+
$actions: [
|
|
55
|
+
{ who: 'anyone', can: ['read'] },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
48
58
|
link: {
|
|
49
59
|
$actions: [
|
|
50
60
|
{ who: 'anyone', can: ['read'] },
|
package/dist/esm/profile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/profile.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAgD5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAI,+CAA+C;IAC3D,SAAS,EAAG,IAAI;IAChB,IAAI,EAAQ;QACV,MAAM,EAAE,oDAAoD;KAC7D;IACD,KAAK,EAAE;QACL,OAAO,EAAE;YACP,MAAM,EAAQ,qDAAqD;YACnE,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,MAAM,EAAE;YACN,WAAW,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC;SACpE;Q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GED
|
@@ -12,23 +12,23 @@ import { defineProtocol } from '@enbox/api';
|
|
|
12
12
|
// Protocol definition
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
export const SocialGraphDefinition = {
|
|
15
|
-
protocol: 'https://
|
|
15
|
+
protocol: 'https://identity.foundation/protocols/social-graph',
|
|
16
16
|
published: true,
|
|
17
17
|
types: {
|
|
18
18
|
friend: {
|
|
19
|
-
schema: 'https://
|
|
19
|
+
schema: 'https://identity.foundation/schemas/social-graph/friend',
|
|
20
20
|
dataFormats: ['application/json'],
|
|
21
21
|
},
|
|
22
22
|
block: {
|
|
23
|
-
schema: 'https://
|
|
23
|
+
schema: 'https://identity.foundation/schemas/social-graph/block',
|
|
24
24
|
dataFormats: ['application/json'],
|
|
25
25
|
},
|
|
26
26
|
group: {
|
|
27
|
-
schema: 'https://
|
|
27
|
+
schema: 'https://identity.foundation/schemas/social-graph/group',
|
|
28
28
|
dataFormats: ['application/json'],
|
|
29
29
|
},
|
|
30
30
|
member: {
|
|
31
|
-
schema: 'https://
|
|
31
|
+
schema: 'https://identity.foundation/schemas/social-graph/member',
|
|
32
32
|
dataFormats: ['application/json'],
|
|
33
33
|
},
|
|
34
34
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"social-graph.js","sourceRoot":"","sources":["../../src/social-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA4C5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ,EAAI,
|
|
1
|
+
{"version":3,"file":"social-graph.js","sourceRoot":"","sources":["../../src/social-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA4C5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,C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,MAAM,EAAE;gBACN,QAAQ,EAAE;oBACR,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE;iBACjC;gBACD,KAAK,EAAE;oBACL,aAAa,EAAS,CAAC,KAAK,CAAC;oBAC7B,mBAAmB,EAAG,KAAK;oBAC3B,GAAG,EAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE;iBACzC;aACF;SACF;KACF;CACoC,CAAC;AAExC,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,8DAA8D;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAC/C,qBAAqB,EACrB,EAA0B,CAC3B,CAAC"}
|
package/dist/esm/status.js
CHANGED
|
@@ -12,18 +12,18 @@ import { defineProtocol } from '@enbox/api';
|
|
|
12
12
|
// Protocol definition
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
export const StatusDefinition = {
|
|
15
|
-
protocol: 'https://
|
|
15
|
+
protocol: 'https://identity.foundation/protocols/status',
|
|
16
16
|
published: true,
|
|
17
17
|
uses: {
|
|
18
|
-
social: 'https://
|
|
18
|
+
social: 'https://identity.foundation/protocols/social-graph',
|
|
19
19
|
},
|
|
20
20
|
types: {
|
|
21
21
|
status: {
|
|
22
|
-
schema: 'https://
|
|
22
|
+
schema: 'https://identity.foundation/schemas/status/status',
|
|
23
23
|
dataFormats: ['application/json'],
|
|
24
24
|
},
|
|
25
25
|
reaction: {
|
|
26
|
-
schema: 'https://
|
|
26
|
+
schema: 'https://identity.foundation/schemas/status/reaction',
|
|
27
27
|
dataFormats: ['application/json'],
|
|
28
28
|
},
|
|
29
29
|
},
|
package/dist/esm/status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA6B5C,8EAA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/**
|
|
2
|
+
* Connect Protocol — wallet and app discovery information.
|
|
3
|
+
*
|
|
4
|
+
* Stores metadata about which wallet applications and services a DID
|
|
5
|
+
* is associated with. Published so that other apps can discover how
|
|
6
|
+
* to connect to this identity.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
/** Data shape for wallet connection info. */
|
|
11
|
+
export type WalletData = {
|
|
12
|
+
/** URLs of web wallet applications associated with this DID. */
|
|
13
|
+
webWallets: string[];
|
|
14
|
+
};
|
|
15
|
+
/** Maps protocol type names to their TypeScript data shapes. */
|
|
16
|
+
export type ConnectSchemaMap = {
|
|
17
|
+
wallet: WalletData;
|
|
18
|
+
};
|
|
19
|
+
export declare const ConnectDefinition: {
|
|
20
|
+
readonly protocol: "https://identity.foundation/protocols/connect";
|
|
21
|
+
readonly published: true;
|
|
22
|
+
readonly types: {
|
|
23
|
+
readonly wallet: {
|
|
24
|
+
readonly schema: "https://identity.foundation/schemas/connect/wallet";
|
|
25
|
+
readonly dataFormats: ["application/json"];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
readonly structure: {
|
|
29
|
+
readonly wallet: {
|
|
30
|
+
readonly $actions: [{
|
|
31
|
+
readonly who: "anyone";
|
|
32
|
+
readonly can: ["read"];
|
|
33
|
+
}];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
/** Typed Connect protocol for use with `dwn.using()`. */
|
|
38
|
+
export declare const ConnectProtocol: import("@enbox/api").TypedProtocol<{
|
|
39
|
+
readonly protocol: "https://identity.foundation/protocols/connect";
|
|
40
|
+
readonly published: true;
|
|
41
|
+
readonly types: {
|
|
42
|
+
readonly wallet: {
|
|
43
|
+
readonly schema: "https://identity.foundation/schemas/connect/wallet";
|
|
44
|
+
readonly dataFormats: ["application/json"];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly structure: {
|
|
48
|
+
readonly wallet: {
|
|
49
|
+
readonly $actions: [{
|
|
50
|
+
readonly who: "anyone";
|
|
51
|
+
readonly can: ["read"];
|
|
52
|
+
}];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}, ConnectSchemaMap>;
|
|
56
|
+
//# sourceMappingURL=connect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAAG;IACvB,gEAAgE;IAChE,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAMF,gEAAgE;AAChE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC;AAMF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAgBS,CAAC;AAMxC,yDAAyD;AACzD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;oBAG3B,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
|
package/dist/types/lists.d.ts
CHANGED
|
@@ -49,30 +49,30 @@ export type ListsSchemaMap = {
|
|
|
49
49
|
comment: CommentData;
|
|
50
50
|
};
|
|
51
51
|
export declare const ListsDefinition: {
|
|
52
|
-
readonly protocol: "https://
|
|
52
|
+
readonly protocol: "https://identity.foundation/protocols/lists";
|
|
53
53
|
readonly published: false;
|
|
54
54
|
readonly uses: {
|
|
55
|
-
readonly social: "https://
|
|
55
|
+
readonly social: "https://identity.foundation/protocols/social-graph";
|
|
56
56
|
};
|
|
57
57
|
readonly types: {
|
|
58
58
|
readonly list: {
|
|
59
|
-
readonly schema: "https://
|
|
59
|
+
readonly schema: "https://identity.foundation/schemas/lists/list";
|
|
60
60
|
readonly dataFormats: ["application/json"];
|
|
61
61
|
};
|
|
62
62
|
readonly item: {
|
|
63
|
-
readonly schema: "https://
|
|
63
|
+
readonly schema: "https://identity.foundation/schemas/lists/item";
|
|
64
64
|
readonly dataFormats: ["application/json"];
|
|
65
65
|
};
|
|
66
66
|
readonly folder: {
|
|
67
|
-
readonly schema: "https://
|
|
67
|
+
readonly schema: "https://identity.foundation/schemas/lists/folder";
|
|
68
68
|
readonly dataFormats: ["application/json"];
|
|
69
69
|
};
|
|
70
70
|
readonly collaborator: {
|
|
71
|
-
readonly schema: "https://
|
|
71
|
+
readonly schema: "https://identity.foundation/schemas/lists/collaborator";
|
|
72
72
|
readonly dataFormats: ["application/json"];
|
|
73
73
|
};
|
|
74
74
|
readonly comment: {
|
|
75
|
-
readonly schema: "https://
|
|
75
|
+
readonly schema: "https://identity.foundation/schemas/lists/comment";
|
|
76
76
|
readonly dataFormats: ["application/json"];
|
|
77
77
|
};
|
|
78
78
|
};
|
|
@@ -145,30 +145,30 @@ export declare const ListsDefinition: {
|
|
|
145
145
|
};
|
|
146
146
|
/** Typed Lists protocol for use with `dwn.using()`. */
|
|
147
147
|
export declare const ListsProtocol: import("@enbox/api").TypedProtocol<{
|
|
148
|
-
readonly protocol: "https://
|
|
148
|
+
readonly protocol: "https://identity.foundation/protocols/lists";
|
|
149
149
|
readonly published: false;
|
|
150
150
|
readonly uses: {
|
|
151
|
-
readonly social: "https://
|
|
151
|
+
readonly social: "https://identity.foundation/protocols/social-graph";
|
|
152
152
|
};
|
|
153
153
|
readonly types: {
|
|
154
154
|
readonly list: {
|
|
155
|
-
readonly schema: "https://
|
|
155
|
+
readonly schema: "https://identity.foundation/schemas/lists/list";
|
|
156
156
|
readonly dataFormats: ["application/json"];
|
|
157
157
|
};
|
|
158
158
|
readonly item: {
|
|
159
|
-
readonly schema: "https://
|
|
159
|
+
readonly schema: "https://identity.foundation/schemas/lists/item";
|
|
160
160
|
readonly dataFormats: ["application/json"];
|
|
161
161
|
};
|
|
162
162
|
readonly folder: {
|
|
163
|
-
readonly schema: "https://
|
|
163
|
+
readonly schema: "https://identity.foundation/schemas/lists/folder";
|
|
164
164
|
readonly dataFormats: ["application/json"];
|
|
165
165
|
};
|
|
166
166
|
readonly collaborator: {
|
|
167
|
-
readonly schema: "https://
|
|
167
|
+
readonly schema: "https://identity.foundation/schemas/lists/collaborator";
|
|
168
168
|
readonly dataFormats: ["application/json"];
|
|
169
169
|
};
|
|
170
170
|
readonly comment: {
|
|
171
|
-
readonly schema: "https://
|
|
171
|
+
readonly schema: "https://identity.foundation/schemas/lists/comment";
|
|
172
172
|
readonly dataFormats: ["application/json"];
|
|
173
173
|
};
|
|
174
174
|
};
|
|
@@ -45,24 +45,24 @@ export type PreferencesSchemaMap = {
|
|
|
45
45
|
notification: NotificationData;
|
|
46
46
|
};
|
|
47
47
|
export declare const PreferencesDefinition: {
|
|
48
|
-
readonly protocol: "https://
|
|
48
|
+
readonly protocol: "https://identity.foundation/protocols/preferences";
|
|
49
49
|
readonly published: false;
|
|
50
50
|
readonly types: {
|
|
51
51
|
readonly theme: {
|
|
52
|
-
readonly schema: "https://
|
|
52
|
+
readonly schema: "https://identity.foundation/schemas/preferences/theme";
|
|
53
53
|
readonly dataFormats: ["application/json"];
|
|
54
54
|
};
|
|
55
55
|
readonly locale: {
|
|
56
|
-
readonly schema: "https://
|
|
56
|
+
readonly schema: "https://identity.foundation/schemas/preferences/locale";
|
|
57
57
|
readonly dataFormats: ["application/json"];
|
|
58
58
|
};
|
|
59
59
|
readonly privacy: {
|
|
60
|
-
readonly schema: "https://
|
|
60
|
+
readonly schema: "https://identity.foundation/schemas/preferences/privacy";
|
|
61
61
|
readonly dataFormats: ["application/json"];
|
|
62
62
|
readonly encryptionRequired: true;
|
|
63
63
|
};
|
|
64
64
|
readonly notification: {
|
|
65
|
-
readonly schema: "https://
|
|
65
|
+
readonly schema: "https://identity.foundation/schemas/preferences/notification";
|
|
66
66
|
readonly dataFormats: ["application/json"];
|
|
67
67
|
};
|
|
68
68
|
};
|
|
@@ -90,24 +90,24 @@ export declare const PreferencesDefinition: {
|
|
|
90
90
|
};
|
|
91
91
|
/** Typed Preferences protocol for use with `dwn.using()`. */
|
|
92
92
|
export declare const PreferencesProtocol: import("@enbox/api").TypedProtocol<{
|
|
93
|
-
readonly protocol: "https://
|
|
93
|
+
readonly protocol: "https://identity.foundation/protocols/preferences";
|
|
94
94
|
readonly published: false;
|
|
95
95
|
readonly types: {
|
|
96
96
|
readonly theme: {
|
|
97
|
-
readonly schema: "https://
|
|
97
|
+
readonly schema: "https://identity.foundation/schemas/preferences/theme";
|
|
98
98
|
readonly dataFormats: ["application/json"];
|
|
99
99
|
};
|
|
100
100
|
readonly locale: {
|
|
101
|
-
readonly schema: "https://
|
|
101
|
+
readonly schema: "https://identity.foundation/schemas/preferences/locale";
|
|
102
102
|
readonly dataFormats: ["application/json"];
|
|
103
103
|
};
|
|
104
104
|
readonly privacy: {
|
|
105
|
-
readonly schema: "https://
|
|
105
|
+
readonly schema: "https://identity.foundation/schemas/preferences/privacy";
|
|
106
106
|
readonly dataFormats: ["application/json"];
|
|
107
107
|
readonly encryptionRequired: true;
|
|
108
108
|
};
|
|
109
109
|
readonly notification: {
|
|
110
|
-
readonly schema: "https://
|
|
110
|
+
readonly schema: "https://identity.foundation/schemas/preferences/notification";
|
|
111
111
|
readonly dataFormats: ["application/json"];
|
|
112
112
|
};
|
|
113
113
|
};
|
package/dist/types/profile.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Profile Protocol — public and semi-private identity information.
|
|
3
3
|
*
|
|
4
|
-
* Supports a published profile record, avatar (binary),
|
|
5
|
-
* private notes visible only to friends (via Social Graph
|
|
4
|
+
* Supports a published profile record, avatar and hero images (binary),
|
|
5
|
+
* links, and private notes visible only to friends (via Social Graph
|
|
6
|
+
* composition).
|
|
6
7
|
*
|
|
7
8
|
* @module
|
|
8
9
|
*/
|
|
@@ -10,12 +11,15 @@
|
|
|
10
11
|
export type ProfileData = {
|
|
11
12
|
displayName: string;
|
|
12
13
|
bio?: string;
|
|
14
|
+
tagline?: string;
|
|
13
15
|
location?: string;
|
|
14
16
|
website?: string;
|
|
15
17
|
pronouns?: string;
|
|
16
18
|
};
|
|
17
19
|
/** Avatar is stored as binary data (Blob). */
|
|
18
20
|
export type AvatarData = Blob;
|
|
21
|
+
/** Hero banner is stored as binary data (Blob). */
|
|
22
|
+
export type HeroData = Blob;
|
|
19
23
|
/** Data shape for a link record (e.g. social links). */
|
|
20
24
|
export type LinkData = {
|
|
21
25
|
url: string;
|
|
@@ -31,29 +35,33 @@ export type PrivateNoteData = {
|
|
|
31
35
|
export type ProfileSchemaMap = {
|
|
32
36
|
profile: ProfileData;
|
|
33
37
|
avatar: AvatarData;
|
|
38
|
+
hero: HeroData;
|
|
34
39
|
link: LinkData;
|
|
35
40
|
privateNote: PrivateNoteData;
|
|
36
41
|
};
|
|
37
42
|
export declare const ProfileDefinition: {
|
|
38
|
-
readonly protocol: "https://
|
|
43
|
+
readonly protocol: "https://identity.foundation/protocols/profile";
|
|
39
44
|
readonly published: true;
|
|
40
45
|
readonly uses: {
|
|
41
|
-
readonly social: "https://
|
|
46
|
+
readonly social: "https://identity.foundation/protocols/social-graph";
|
|
42
47
|
};
|
|
43
48
|
readonly types: {
|
|
44
49
|
readonly profile: {
|
|
45
|
-
readonly schema: "https://
|
|
50
|
+
readonly schema: "https://identity.foundation/schemas/profile/profile";
|
|
46
51
|
readonly dataFormats: ["application/json"];
|
|
47
52
|
};
|
|
48
53
|
readonly avatar: {
|
|
49
54
|
readonly dataFormats: ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
50
55
|
};
|
|
56
|
+
readonly hero: {
|
|
57
|
+
readonly dataFormats: ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
58
|
+
};
|
|
51
59
|
readonly link: {
|
|
52
|
-
readonly schema: "https://
|
|
60
|
+
readonly schema: "https://identity.foundation/schemas/profile/link";
|
|
53
61
|
readonly dataFormats: ["application/json"];
|
|
54
62
|
};
|
|
55
63
|
readonly privateNote: {
|
|
56
|
-
readonly schema: "https://
|
|
64
|
+
readonly schema: "https://identity.foundation/schemas/profile/private-note";
|
|
57
65
|
readonly dataFormats: ["application/json"];
|
|
58
66
|
};
|
|
59
67
|
};
|
|
@@ -75,6 +83,15 @@ export declare const ProfileDefinition: {
|
|
|
75
83
|
readonly can: ["read"];
|
|
76
84
|
}];
|
|
77
85
|
};
|
|
86
|
+
readonly hero: {
|
|
87
|
+
readonly $size: {
|
|
88
|
+
readonly max: 2097152;
|
|
89
|
+
};
|
|
90
|
+
readonly $actions: [{
|
|
91
|
+
readonly who: "anyone";
|
|
92
|
+
readonly can: ["read"];
|
|
93
|
+
}];
|
|
94
|
+
};
|
|
78
95
|
readonly link: {
|
|
79
96
|
readonly $actions: [{
|
|
80
97
|
readonly who: "anyone";
|
|
@@ -92,25 +109,28 @@ export declare const ProfileDefinition: {
|
|
|
92
109
|
};
|
|
93
110
|
/** Typed Profile protocol for use with `dwn.using()`. */
|
|
94
111
|
export declare const ProfileProtocol: import("@enbox/api").TypedProtocol<{
|
|
95
|
-
readonly protocol: "https://
|
|
112
|
+
readonly protocol: "https://identity.foundation/protocols/profile";
|
|
96
113
|
readonly published: true;
|
|
97
114
|
readonly uses: {
|
|
98
|
-
readonly social: "https://
|
|
115
|
+
readonly social: "https://identity.foundation/protocols/social-graph";
|
|
99
116
|
};
|
|
100
117
|
readonly types: {
|
|
101
118
|
readonly profile: {
|
|
102
|
-
readonly schema: "https://
|
|
119
|
+
readonly schema: "https://identity.foundation/schemas/profile/profile";
|
|
103
120
|
readonly dataFormats: ["application/json"];
|
|
104
121
|
};
|
|
105
122
|
readonly avatar: {
|
|
106
123
|
readonly dataFormats: ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
107
124
|
};
|
|
125
|
+
readonly hero: {
|
|
126
|
+
readonly dataFormats: ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
127
|
+
};
|
|
108
128
|
readonly link: {
|
|
109
|
-
readonly schema: "https://
|
|
129
|
+
readonly schema: "https://identity.foundation/schemas/profile/link";
|
|
110
130
|
readonly dataFormats: ["application/json"];
|
|
111
131
|
};
|
|
112
132
|
readonly privateNote: {
|
|
113
|
-
readonly schema: "https://
|
|
133
|
+
readonly schema: "https://identity.foundation/schemas/profile/private-note";
|
|
114
134
|
readonly dataFormats: ["application/json"];
|
|
115
135
|
};
|
|
116
136
|
};
|
|
@@ -132,6 +152,15 @@ export declare const ProfileProtocol: import("@enbox/api").TypedProtocol<{
|
|
|
132
152
|
readonly can: ["read"];
|
|
133
153
|
}];
|
|
134
154
|
};
|
|
155
|
+
readonly hero: {
|
|
156
|
+
readonly $size: {
|
|
157
|
+
readonly max: 2097152;
|
|
158
|
+
};
|
|
159
|
+
readonly $actions: [{
|
|
160
|
+
readonly who: "anyone";
|
|
161
|
+
readonly can: ["read"];
|
|
162
|
+
}];
|
|
163
|
+
};
|
|
135
164
|
readonly link: {
|
|
136
165
|
readonly $actions: [{
|
|
137
166
|
readonly who: "anyone";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/profile.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;G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are const SocialGraphDefinition: {
|
|
40
|
-
readonly protocol: "https://
|
|
40
|
+
readonly protocol: "https://identity.foundation/protocols/social-graph";
|
|
41
41
|
readonly published: true;
|
|
42
42
|
readonly types: {
|
|
43
43
|
readonly friend: {
|
|
44
|
-
readonly schema: "https://
|
|
44
|
+
readonly schema: "https://identity.foundation/schemas/social-graph/friend";
|
|
45
45
|
readonly dataFormats: ["application/json"];
|
|
46
46
|
};
|
|
47
47
|
readonly block: {
|
|
48
|
-
readonly schema: "https://
|
|
48
|
+
readonly schema: "https://identity.foundation/schemas/social-graph/block";
|
|
49
49
|
readonly dataFormats: ["application/json"];
|
|
50
50
|
};
|
|
51
51
|
readonly group: {
|
|
52
|
-
readonly schema: "https://
|
|
52
|
+
readonly schema: "https://identity.foundation/schemas/social-graph/group";
|
|
53
53
|
readonly dataFormats: ["application/json"];
|
|
54
54
|
};
|
|
55
55
|
readonly member: {
|
|
56
|
-
readonly schema: "https://
|
|
56
|
+
readonly schema: "https://identity.foundation/schemas/social-graph/member";
|
|
57
57
|
readonly dataFormats: ["application/json"];
|
|
58
58
|
};
|
|
59
59
|
};
|
|
@@ -112,23 +112,23 @@ export declare const SocialGraphDefinition: {
|
|
|
112
112
|
};
|
|
113
113
|
/** Typed Social Graph protocol for use with `dwn.using()`. */
|
|
114
114
|
export declare const SocialGraphProtocol: import("@enbox/api").TypedProtocol<{
|
|
115
|
-
readonly protocol: "https://
|
|
115
|
+
readonly protocol: "https://identity.foundation/protocols/social-graph";
|
|
116
116
|
readonly published: true;
|
|
117
117
|
readonly types: {
|
|
118
118
|
readonly friend: {
|
|
119
|
-
readonly schema: "https://
|
|
119
|
+
readonly schema: "https://identity.foundation/schemas/social-graph/friend";
|
|
120
120
|
readonly dataFormats: ["application/json"];
|
|
121
121
|
};
|
|
122
122
|
readonly block: {
|
|
123
|
-
readonly schema: "https://
|
|
123
|
+
readonly schema: "https://identity.foundation/schemas/social-graph/block";
|
|
124
124
|
readonly dataFormats: ["application/json"];
|
|
125
125
|
};
|
|
126
126
|
readonly group: {
|
|
127
|
-
readonly schema: "https://
|
|
127
|
+
readonly schema: "https://identity.foundation/schemas/social-graph/group";
|
|
128
128
|
readonly dataFormats: ["application/json"];
|
|
129
129
|
};
|
|
130
130
|
readonly member: {
|
|
131
|
-
readonly schema: "https://
|
|
131
|
+
readonly schema: "https://identity.foundation/schemas/social-graph/member";
|
|
132
132
|
readonly dataFormats: ["application/json"];
|
|
133
133
|
};
|
|
134
134
|
};
|
package/dist/types/status.d.ts
CHANGED
|
@@ -24,18 +24,18 @@ export type StatusSchemaMap = {
|
|
|
24
24
|
reaction: ReactionData;
|
|
25
25
|
};
|
|
26
26
|
export declare const StatusDefinition: {
|
|
27
|
-
readonly protocol: "https://
|
|
27
|
+
readonly protocol: "https://identity.foundation/protocols/status";
|
|
28
28
|
readonly published: true;
|
|
29
29
|
readonly uses: {
|
|
30
|
-
readonly social: "https://
|
|
30
|
+
readonly social: "https://identity.foundation/protocols/social-graph";
|
|
31
31
|
};
|
|
32
32
|
readonly types: {
|
|
33
33
|
readonly status: {
|
|
34
|
-
readonly schema: "https://
|
|
34
|
+
readonly schema: "https://identity.foundation/schemas/status/status";
|
|
35
35
|
readonly dataFormats: ["application/json"];
|
|
36
36
|
};
|
|
37
37
|
readonly reaction: {
|
|
38
|
-
readonly schema: "https://
|
|
38
|
+
readonly schema: "https://identity.foundation/schemas/status/reaction";
|
|
39
39
|
readonly dataFormats: ["application/json"];
|
|
40
40
|
};
|
|
41
41
|
};
|
|
@@ -62,18 +62,18 @@ export declare const StatusDefinition: {
|
|
|
62
62
|
};
|
|
63
63
|
/** Typed Status protocol for use with `dwn.using()`. */
|
|
64
64
|
export declare const StatusProtocol: import("@enbox/api").TypedProtocol<{
|
|
65
|
-
readonly protocol: "https://
|
|
65
|
+
readonly protocol: "https://identity.foundation/protocols/status";
|
|
66
66
|
readonly published: true;
|
|
67
67
|
readonly uses: {
|
|
68
|
-
readonly social: "https://
|
|
68
|
+
readonly social: "https://identity.foundation/protocols/social-graph";
|
|
69
69
|
};
|
|
70
70
|
readonly types: {
|
|
71
71
|
readonly status: {
|
|
72
|
-
readonly schema: "https://
|
|
72
|
+
readonly schema: "https://identity.foundation/schemas/status/status";
|
|
73
73
|
readonly dataFormats: ["application/json"];
|
|
74
74
|
};
|
|
75
75
|
readonly reaction: {
|
|
76
|
-
readonly schema: "https://
|
|
76
|
+
readonly schema: "https://identity.foundation/schemas/status/reaction";
|
|
77
77
|
readonly dataFormats: ["application/json"];
|
|
78
78
|
};
|
|
79
79
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enbox/protocols",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Standard reusable DWN protocol definitions for the Enbox ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/index.js",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"bun": ">=1.0.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@enbox/api": "0.
|
|
50
|
-
"@enbox/dwn-sdk-js": "0.0.
|
|
49
|
+
"@enbox/api": "0.2.0",
|
|
50
|
+
"@enbox/dwn-sdk-js": "0.0.7"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@typescript-eslint/eslint-plugin": "8.32.1",
|
package/src/connect.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connect Protocol — wallet and app discovery information.
|
|
3
|
+
*
|
|
4
|
+
* Stores metadata about which wallet applications and services a DID
|
|
5
|
+
* is associated with. Published so that other apps can discover how
|
|
6
|
+
* to connect to this identity.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { ProtocolDefinition } from '@enbox/dwn-sdk-js';
|
|
12
|
+
|
|
13
|
+
import { defineProtocol } from '@enbox/api';
|
|
14
|
+
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// Data types
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
/** Data shape for wallet connection info. */
|
|
20
|
+
export type WalletData = {
|
|
21
|
+
/** URLs of web wallet applications associated with this DID. */
|
|
22
|
+
webWallets: string[];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
// Schema map
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
/** Maps protocol type names to their TypeScript data shapes. */
|
|
30
|
+
export type ConnectSchemaMap = {
|
|
31
|
+
wallet: WalletData;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// Protocol definition
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
export const ConnectDefinition = {
|
|
39
|
+
protocol : 'https://identity.foundation/protocols/connect',
|
|
40
|
+
published : true,
|
|
41
|
+
types : {
|
|
42
|
+
wallet: {
|
|
43
|
+
schema : 'https://identity.foundation/schemas/connect/wallet',
|
|
44
|
+
dataFormats : ['application/json'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
structure: {
|
|
48
|
+
wallet: {
|
|
49
|
+
$actions: [
|
|
50
|
+
{ who: 'anyone', can: ['read'] },
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
} as const satisfies ProtocolDefinition;
|
|
55
|
+
|
|
56
|
+
// ---------------------------------------------------------------------------
|
|
57
|
+
// Typed protocol export
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
|
|
60
|
+
/** Typed Connect protocol for use with `dwn.using()`. */
|
|
61
|
+
export const ConnectProtocol = defineProtocol(
|
|
62
|
+
ConnectDefinition,
|
|
63
|
+
{} as ConnectSchemaMap,
|
|
64
|
+
);
|
package/src/index.ts
CHANGED
package/src/lists.ts
CHANGED
|
@@ -72,30 +72,30 @@ export type ListsSchemaMap = {
|
|
|
72
72
|
// ---------------------------------------------------------------------------
|
|
73
73
|
|
|
74
74
|
export const ListsDefinition = {
|
|
75
|
-
protocol : 'https://
|
|
75
|
+
protocol : 'https://identity.foundation/protocols/lists',
|
|
76
76
|
published : false,
|
|
77
77
|
uses : {
|
|
78
|
-
social: 'https://
|
|
78
|
+
social: 'https://identity.foundation/protocols/social-graph',
|
|
79
79
|
},
|
|
80
80
|
types: {
|
|
81
81
|
list: {
|
|
82
|
-
schema : 'https://
|
|
82
|
+
schema : 'https://identity.foundation/schemas/lists/list',
|
|
83
83
|
dataFormats : ['application/json'],
|
|
84
84
|
},
|
|
85
85
|
item: {
|
|
86
|
-
schema : 'https://
|
|
86
|
+
schema : 'https://identity.foundation/schemas/lists/item',
|
|
87
87
|
dataFormats : ['application/json'],
|
|
88
88
|
},
|
|
89
89
|
folder: {
|
|
90
|
-
schema : 'https://
|
|
90
|
+
schema : 'https://identity.foundation/schemas/lists/folder',
|
|
91
91
|
dataFormats : ['application/json'],
|
|
92
92
|
},
|
|
93
93
|
collaborator: {
|
|
94
|
-
schema : 'https://
|
|
94
|
+
schema : 'https://identity.foundation/schemas/lists/collaborator',
|
|
95
95
|
dataFormats : ['application/json'],
|
|
96
96
|
},
|
|
97
97
|
comment: {
|
|
98
|
-
schema : 'https://
|
|
98
|
+
schema : 'https://identity.foundation/schemas/lists/comment',
|
|
99
99
|
dataFormats : ['application/json'],
|
|
100
100
|
},
|
|
101
101
|
},
|
package/src/preferences.ts
CHANGED
|
@@ -67,24 +67,24 @@ export type PreferencesSchemaMap = {
|
|
|
67
67
|
// ---------------------------------------------------------------------------
|
|
68
68
|
|
|
69
69
|
export const PreferencesDefinition = {
|
|
70
|
-
protocol : 'https://
|
|
70
|
+
protocol : 'https://identity.foundation/protocols/preferences',
|
|
71
71
|
published : false,
|
|
72
72
|
types : {
|
|
73
73
|
theme: {
|
|
74
|
-
schema : 'https://
|
|
74
|
+
schema : 'https://identity.foundation/schemas/preferences/theme',
|
|
75
75
|
dataFormats : ['application/json'],
|
|
76
76
|
},
|
|
77
77
|
locale: {
|
|
78
|
-
schema : 'https://
|
|
78
|
+
schema : 'https://identity.foundation/schemas/preferences/locale',
|
|
79
79
|
dataFormats : ['application/json'],
|
|
80
80
|
},
|
|
81
81
|
privacy: {
|
|
82
|
-
schema : 'https://
|
|
82
|
+
schema : 'https://identity.foundation/schemas/preferences/privacy',
|
|
83
83
|
dataFormats : ['application/json'],
|
|
84
84
|
encryptionRequired : true,
|
|
85
85
|
},
|
|
86
86
|
notification: {
|
|
87
|
-
schema : 'https://
|
|
87
|
+
schema : 'https://identity.foundation/schemas/preferences/notification',
|
|
88
88
|
dataFormats : ['application/json'],
|
|
89
89
|
},
|
|
90
90
|
},
|
package/src/profile.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Profile Protocol — public and semi-private identity information.
|
|
3
3
|
*
|
|
4
|
-
* Supports a published profile record, avatar (binary),
|
|
5
|
-
* private notes visible only to friends (via Social Graph
|
|
4
|
+
* Supports a published profile record, avatar and hero images (binary),
|
|
5
|
+
* links, and private notes visible only to friends (via Social Graph
|
|
6
|
+
* composition).
|
|
6
7
|
*
|
|
7
8
|
* @module
|
|
8
9
|
*/
|
|
@@ -19,6 +20,7 @@ import { defineProtocol } from '@enbox/api';
|
|
|
19
20
|
export type ProfileData = {
|
|
20
21
|
displayName: string;
|
|
21
22
|
bio?: string;
|
|
23
|
+
tagline?: string;
|
|
22
24
|
location?: string;
|
|
23
25
|
website?: string;
|
|
24
26
|
pronouns?: string;
|
|
@@ -27,6 +29,9 @@ export type ProfileData = {
|
|
|
27
29
|
/** Avatar is stored as binary data (Blob). */
|
|
28
30
|
export type AvatarData = Blob;
|
|
29
31
|
|
|
32
|
+
/** Hero banner is stored as binary data (Blob). */
|
|
33
|
+
export type HeroData = Blob;
|
|
34
|
+
|
|
30
35
|
/** Data shape for a link record (e.g. social links). */
|
|
31
36
|
export type LinkData = {
|
|
32
37
|
url: string;
|
|
@@ -48,6 +53,7 @@ export type PrivateNoteData = {
|
|
|
48
53
|
export type ProfileSchemaMap = {
|
|
49
54
|
profile: ProfileData;
|
|
50
55
|
avatar: AvatarData;
|
|
56
|
+
hero: HeroData;
|
|
51
57
|
link: LinkData;
|
|
52
58
|
privateNote: PrivateNoteData;
|
|
53
59
|
};
|
|
@@ -57,25 +63,28 @@ export type ProfileSchemaMap = {
|
|
|
57
63
|
// ---------------------------------------------------------------------------
|
|
58
64
|
|
|
59
65
|
export const ProfileDefinition = {
|
|
60
|
-
protocol : 'https://
|
|
66
|
+
protocol : 'https://identity.foundation/protocols/profile',
|
|
61
67
|
published : true,
|
|
62
68
|
uses : {
|
|
63
|
-
social: 'https://
|
|
69
|
+
social: 'https://identity.foundation/protocols/social-graph',
|
|
64
70
|
},
|
|
65
71
|
types: {
|
|
66
72
|
profile: {
|
|
67
|
-
schema : 'https://
|
|
73
|
+
schema : 'https://identity.foundation/schemas/profile/profile',
|
|
68
74
|
dataFormats : ['application/json'],
|
|
69
75
|
},
|
|
70
76
|
avatar: {
|
|
71
77
|
dataFormats: ['image/png', 'image/jpeg', 'image/gif', 'image/webp'],
|
|
72
78
|
},
|
|
79
|
+
hero: {
|
|
80
|
+
dataFormats: ['image/png', 'image/jpeg', 'image/gif', 'image/webp'],
|
|
81
|
+
},
|
|
73
82
|
link: {
|
|
74
|
-
schema : 'https://
|
|
83
|
+
schema : 'https://identity.foundation/schemas/profile/link',
|
|
75
84
|
dataFormats : ['application/json'],
|
|
76
85
|
},
|
|
77
86
|
privateNote: {
|
|
78
|
-
schema : 'https://
|
|
87
|
+
schema : 'https://identity.foundation/schemas/profile/private-note',
|
|
79
88
|
dataFormats : ['application/json'],
|
|
80
89
|
},
|
|
81
90
|
},
|
|
@@ -91,6 +100,12 @@ export const ProfileDefinition = {
|
|
|
91
100
|
{ who: 'anyone', can: ['read'] },
|
|
92
101
|
],
|
|
93
102
|
},
|
|
103
|
+
hero: {
|
|
104
|
+
$size : { max: 2097152 },
|
|
105
|
+
$actions : [
|
|
106
|
+
{ who: 'anyone', can: ['read'] },
|
|
107
|
+
],
|
|
108
|
+
},
|
|
94
109
|
link: {
|
|
95
110
|
$actions: [
|
|
96
111
|
{ who: 'anyone', can: ['read'] },
|
package/src/social-graph.ts
CHANGED
|
@@ -59,23 +59,23 @@ export type SocialGraphSchemaMap = {
|
|
|
59
59
|
// ---------------------------------------------------------------------------
|
|
60
60
|
|
|
61
61
|
export const SocialGraphDefinition = {
|
|
62
|
-
protocol : 'https://
|
|
62
|
+
protocol : 'https://identity.foundation/protocols/social-graph',
|
|
63
63
|
published : true,
|
|
64
64
|
types : {
|
|
65
65
|
friend: {
|
|
66
|
-
schema : 'https://
|
|
66
|
+
schema : 'https://identity.foundation/schemas/social-graph/friend',
|
|
67
67
|
dataFormats : ['application/json'],
|
|
68
68
|
},
|
|
69
69
|
block: {
|
|
70
|
-
schema : 'https://
|
|
70
|
+
schema : 'https://identity.foundation/schemas/social-graph/block',
|
|
71
71
|
dataFormats : ['application/json'],
|
|
72
72
|
},
|
|
73
73
|
group: {
|
|
74
|
-
schema : 'https://
|
|
74
|
+
schema : 'https://identity.foundation/schemas/social-graph/group',
|
|
75
75
|
dataFormats : ['application/json'],
|
|
76
76
|
},
|
|
77
77
|
member: {
|
|
78
|
-
schema : 'https://
|
|
78
|
+
schema : 'https://identity.foundation/schemas/social-graph/member',
|
|
79
79
|
dataFormats : ['application/json'],
|
|
80
80
|
},
|
|
81
81
|
},
|
package/src/status.ts
CHANGED
|
@@ -44,18 +44,18 @@ export type StatusSchemaMap = {
|
|
|
44
44
|
// ---------------------------------------------------------------------------
|
|
45
45
|
|
|
46
46
|
export const StatusDefinition = {
|
|
47
|
-
protocol : 'https://
|
|
47
|
+
protocol : 'https://identity.foundation/protocols/status',
|
|
48
48
|
published : true,
|
|
49
49
|
uses : {
|
|
50
|
-
social: 'https://
|
|
50
|
+
social: 'https://identity.foundation/protocols/social-graph',
|
|
51
51
|
},
|
|
52
52
|
types: {
|
|
53
53
|
status: {
|
|
54
|
-
schema : 'https://
|
|
54
|
+
schema : 'https://identity.foundation/schemas/status/status',
|
|
55
55
|
dataFormats : ['application/json'],
|
|
56
56
|
},
|
|
57
57
|
reaction: {
|
|
58
|
-
schema : 'https://
|
|
58
|
+
schema : 'https://identity.foundation/schemas/status/reaction',
|
|
59
59
|
dataFormats : ['application/json'],
|
|
60
60
|
},
|
|
61
61
|
},
|