@oxy.so/contracts 1.2.0 → 1.4.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.
Files changed (62) hide show
  1. package/LICENSE +675 -201
  2. package/NOTICE +7 -2
  3. package/dist/cjs/.tsbuildinfo +1 -1
  4. package/dist/cjs/identity.js +3 -2
  5. package/dist/cjs/identityMove.js +111 -40
  6. package/dist/cjs/identityProof.js +164 -0
  7. package/dist/cjs/identityRecovery.js +51 -0
  8. package/dist/cjs/index.js +52 -21
  9. package/dist/cjs/inference/catalogue.js +23 -1
  10. package/dist/cjs/inference/identifiers.js +3 -1
  11. package/dist/cjs/inference/providerConnection.js +1 -1
  12. package/dist/cjs/inference/request.js +27 -1
  13. package/dist/cjs/inference/streamEvents.js +24 -2
  14. package/dist/cjs/inference/version.js +1 -1
  15. package/dist/cjs/username.js +70 -2
  16. package/dist/cjs/webIdentityCarrier.js +112 -53
  17. package/dist/cjs/webauthn.js +14 -0
  18. package/dist/esm/.tsbuildinfo +1 -1
  19. package/dist/esm/identity.js +3 -2
  20. package/dist/esm/identityMove.js +105 -39
  21. package/dist/esm/identityProof.js +159 -0
  22. package/dist/esm/identityRecovery.js +48 -0
  23. package/dist/esm/index.js +12 -9
  24. package/dist/esm/inference/catalogue.js +22 -0
  25. package/dist/esm/inference/identifiers.js +2 -0
  26. package/dist/esm/inference/providerConnection.js +2 -2
  27. package/dist/esm/inference/request.js +27 -1
  28. package/dist/esm/inference/streamEvents.js +24 -2
  29. package/dist/esm/inference/version.js +1 -1
  30. package/dist/esm/username.js +69 -1
  31. package/dist/esm/webIdentityCarrier.js +111 -52
  32. package/dist/esm/webauthn.js +14 -0
  33. package/dist/types/.tsbuildinfo +1 -1
  34. package/dist/types/accountGraph.d.ts +7 -7
  35. package/dist/types/agency.d.ts +24 -24
  36. package/dist/types/browserHub.d.ts +16 -16
  37. package/dist/types/deviceDirectory.d.ts +28 -28
  38. package/dist/types/externalIdentity.d.ts +7 -7
  39. package/dist/types/identity.d.ts +3 -2
  40. package/dist/types/identityMove.d.ts +119 -43
  41. package/dist/types/identityProof.d.ts +156 -0
  42. package/dist/types/identityRecovery.d.ts +246 -0
  43. package/dist/types/index.d.ts +15 -13
  44. package/dist/types/inference/catalogue.d.ts +51 -0
  45. package/dist/types/inference/identifiers.d.ts +2 -0
  46. package/dist/types/inference/modelDocumentation.d.ts +12 -0
  47. package/dist/types/inference/providerConnection.d.ts +40 -40
  48. package/dist/types/inference/request.d.ts +119 -36
  49. package/dist/types/inference/streamEvents.d.ts +57 -1
  50. package/dist/types/inference/version.d.ts +1 -1
  51. package/dist/types/keyRotation.d.ts +2 -2
  52. package/dist/types/oauth.d.ts +30 -30
  53. package/dist/types/sessionStatus.d.ts +6 -6
  54. package/dist/types/transparency.d.ts +10 -10
  55. package/dist/types/userResponse.d.ts +18 -18
  56. package/dist/types/username.d.ts +25 -2
  57. package/dist/types/webIdentityCarrier.d.ts +767 -159
  58. package/dist/types/webauthn.d.ts +208 -0
  59. package/package.json +2 -2
  60. package/dist/cjs/devicePairing.js +0 -138
  61. package/dist/esm/devicePairing.js +0 -135
  62. package/dist/types/devicePairing.d.ts +0 -130
@@ -132,7 +132,7 @@ export declare const deviceAccountContextSchema: z.ZodObject<{
132
132
  kind: "bot" | "personal" | "organization" | "project" | "channel";
133
133
  accountId: string;
134
134
  id: string;
135
- relationship: "self" | "owner" | "member";
135
+ relationship: "owner" | "self" | "member";
136
136
  account: {
137
137
  username: string;
138
138
  id: string;
@@ -148,7 +148,7 @@ export declare const deviceAccountContextSchema: z.ZodObject<{
148
148
  kind: "bot" | "personal" | "organization" | "project" | "channel";
149
149
  accountId: string;
150
150
  id: string;
151
- relationship: "self" | "owner" | "member";
151
+ relationship: "owner" | "self" | "member";
152
152
  account: {
153
153
  username: string;
154
154
  id: string;
@@ -234,7 +234,7 @@ export declare const devicePrincipalSchema: z.ZodObject<{
234
234
  kind: "bot" | "personal" | "organization" | "project" | "channel";
235
235
  accountId: string;
236
236
  id: string;
237
- relationship: "self" | "owner" | "member";
237
+ relationship: "owner" | "self" | "member";
238
238
  account: {
239
239
  username: string;
240
240
  id: string;
@@ -250,7 +250,7 @@ export declare const devicePrincipalSchema: z.ZodObject<{
250
250
  kind: "bot" | "personal" | "organization" | "project" | "channel";
251
251
  accountId: string;
252
252
  id: string;
253
- relationship: "self" | "owner" | "member";
253
+ relationship: "owner" | "self" | "member";
254
254
  account: {
255
255
  username: string;
256
256
  id: string;
@@ -278,7 +278,7 @@ export declare const devicePrincipalSchema: z.ZodObject<{
278
278
  kind: "bot" | "personal" | "organization" | "project" | "channel";
279
279
  accountId: string;
280
280
  id: string;
281
- relationship: "self" | "owner" | "member";
281
+ relationship: "owner" | "self" | "member";
282
282
  account: {
283
283
  username: string;
284
284
  id: string;
@@ -306,7 +306,7 @@ export declare const devicePrincipalSchema: z.ZodObject<{
306
306
  kind: "bot" | "personal" | "organization" | "project" | "channel";
307
307
  accountId: string;
308
308
  id: string;
309
- relationship: "self" | "owner" | "member";
309
+ relationship: "owner" | "self" | "member";
310
310
  account: {
311
311
  username: string;
312
312
  id: string;
@@ -397,7 +397,7 @@ export declare const deviceDirectorySchema: z.ZodObject<{
397
397
  kind: "bot" | "personal" | "organization" | "project" | "channel";
398
398
  accountId: string;
399
399
  id: string;
400
- relationship: "self" | "owner" | "member";
400
+ relationship: "owner" | "self" | "member";
401
401
  account: {
402
402
  username: string;
403
403
  id: string;
@@ -413,7 +413,7 @@ export declare const deviceDirectorySchema: z.ZodObject<{
413
413
  kind: "bot" | "personal" | "organization" | "project" | "channel";
414
414
  accountId: string;
415
415
  id: string;
416
- relationship: "self" | "owner" | "member";
416
+ relationship: "owner" | "self" | "member";
417
417
  account: {
418
418
  username: string;
419
419
  id: string;
@@ -441,7 +441,7 @@ export declare const deviceDirectorySchema: z.ZodObject<{
441
441
  kind: "bot" | "personal" | "organization" | "project" | "channel";
442
442
  accountId: string;
443
443
  id: string;
444
- relationship: "self" | "owner" | "member";
444
+ relationship: "owner" | "self" | "member";
445
445
  account: {
446
446
  username: string;
447
447
  id: string;
@@ -469,7 +469,7 @@ export declare const deviceDirectorySchema: z.ZodObject<{
469
469
  kind: "bot" | "personal" | "organization" | "project" | "channel";
470
470
  accountId: string;
471
471
  id: string;
472
- relationship: "self" | "owner" | "member";
472
+ relationship: "owner" | "self" | "member";
473
473
  account: {
474
474
  username: string;
475
475
  id: string;
@@ -504,7 +504,7 @@ export declare const deviceDirectorySchema: z.ZodObject<{
504
504
  kind: "bot" | "personal" | "organization" | "project" | "channel";
505
505
  accountId: string;
506
506
  id: string;
507
- relationship: "self" | "owner" | "member";
507
+ relationship: "owner" | "self" | "member";
508
508
  account: {
509
509
  username: string;
510
510
  id: string;
@@ -538,7 +538,7 @@ export declare const deviceDirectorySchema: z.ZodObject<{
538
538
  kind: "bot" | "personal" | "organization" | "project" | "channel";
539
539
  accountId: string;
540
540
  id: string;
541
- relationship: "self" | "owner" | "member";
541
+ relationship: "owner" | "self" | "member";
542
542
  account: {
543
543
  username: string;
544
544
  id: string;
@@ -651,7 +651,7 @@ export declare const deviceActivateResponseSchema: z.ZodObject<{
651
651
  kind: "bot" | "personal" | "organization" | "project" | "channel";
652
652
  accountId: string;
653
653
  id: string;
654
- relationship: "self" | "owner" | "member";
654
+ relationship: "owner" | "self" | "member";
655
655
  account: {
656
656
  username: string;
657
657
  id: string;
@@ -667,7 +667,7 @@ export declare const deviceActivateResponseSchema: z.ZodObject<{
667
667
  kind: "bot" | "personal" | "organization" | "project" | "channel";
668
668
  accountId: string;
669
669
  id: string;
670
- relationship: "self" | "owner" | "member";
670
+ relationship: "owner" | "self" | "member";
671
671
  account: {
672
672
  username: string;
673
673
  id: string;
@@ -695,7 +695,7 @@ export declare const deviceActivateResponseSchema: z.ZodObject<{
695
695
  kind: "bot" | "personal" | "organization" | "project" | "channel";
696
696
  accountId: string;
697
697
  id: string;
698
- relationship: "self" | "owner" | "member";
698
+ relationship: "owner" | "self" | "member";
699
699
  account: {
700
700
  username: string;
701
701
  id: string;
@@ -723,7 +723,7 @@ export declare const deviceActivateResponseSchema: z.ZodObject<{
723
723
  kind: "bot" | "personal" | "organization" | "project" | "channel";
724
724
  accountId: string;
725
725
  id: string;
726
- relationship: "self" | "owner" | "member";
726
+ relationship: "owner" | "self" | "member";
727
727
  account: {
728
728
  username: string;
729
729
  id: string;
@@ -758,7 +758,7 @@ export declare const deviceActivateResponseSchema: z.ZodObject<{
758
758
  kind: "bot" | "personal" | "organization" | "project" | "channel";
759
759
  accountId: string;
760
760
  id: string;
761
- relationship: "self" | "owner" | "member";
761
+ relationship: "owner" | "self" | "member";
762
762
  account: {
763
763
  username: string;
764
764
  id: string;
@@ -792,7 +792,7 @@ export declare const deviceActivateResponseSchema: z.ZodObject<{
792
792
  kind: "bot" | "personal" | "organization" | "project" | "channel";
793
793
  accountId: string;
794
794
  id: string;
795
- relationship: "self" | "owner" | "member";
795
+ relationship: "owner" | "self" | "member";
796
796
  account: {
797
797
  username: string;
798
798
  id: string;
@@ -842,7 +842,7 @@ export declare const deviceActivateResponseSchema: z.ZodObject<{
842
842
  kind: "bot" | "personal" | "organization" | "project" | "channel";
843
843
  accountId: string;
844
844
  id: string;
845
- relationship: "self" | "owner" | "member";
845
+ relationship: "owner" | "self" | "member";
846
846
  account: {
847
847
  username: string;
848
848
  id: string;
@@ -882,7 +882,7 @@ export declare const deviceActivateResponseSchema: z.ZodObject<{
882
882
  kind: "bot" | "personal" | "organization" | "project" | "channel";
883
883
  accountId: string;
884
884
  id: string;
885
- relationship: "self" | "owner" | "member";
885
+ relationship: "owner" | "self" | "member";
886
886
  account: {
887
887
  username: string;
888
888
  id: string;
@@ -992,7 +992,7 @@ export declare const deviceDirectorySyncSchema: z.ZodObject<{
992
992
  kind: "bot" | "personal" | "organization" | "project" | "channel";
993
993
  accountId: string;
994
994
  id: string;
995
- relationship: "self" | "owner" | "member";
995
+ relationship: "owner" | "self" | "member";
996
996
  account: {
997
997
  username: string;
998
998
  id: string;
@@ -1008,7 +1008,7 @@ export declare const deviceDirectorySyncSchema: z.ZodObject<{
1008
1008
  kind: "bot" | "personal" | "organization" | "project" | "channel";
1009
1009
  accountId: string;
1010
1010
  id: string;
1011
- relationship: "self" | "owner" | "member";
1011
+ relationship: "owner" | "self" | "member";
1012
1012
  account: {
1013
1013
  username: string;
1014
1014
  id: string;
@@ -1036,7 +1036,7 @@ export declare const deviceDirectorySyncSchema: z.ZodObject<{
1036
1036
  kind: "bot" | "personal" | "organization" | "project" | "channel";
1037
1037
  accountId: string;
1038
1038
  id: string;
1039
- relationship: "self" | "owner" | "member";
1039
+ relationship: "owner" | "self" | "member";
1040
1040
  account: {
1041
1041
  username: string;
1042
1042
  id: string;
@@ -1064,7 +1064,7 @@ export declare const deviceDirectorySyncSchema: z.ZodObject<{
1064
1064
  kind: "bot" | "personal" | "organization" | "project" | "channel";
1065
1065
  accountId: string;
1066
1066
  id: string;
1067
- relationship: "self" | "owner" | "member";
1067
+ relationship: "owner" | "self" | "member";
1068
1068
  account: {
1069
1069
  username: string;
1070
1070
  id: string;
@@ -1099,7 +1099,7 @@ export declare const deviceDirectorySyncSchema: z.ZodObject<{
1099
1099
  kind: "bot" | "personal" | "organization" | "project" | "channel";
1100
1100
  accountId: string;
1101
1101
  id: string;
1102
- relationship: "self" | "owner" | "member";
1102
+ relationship: "owner" | "self" | "member";
1103
1103
  account: {
1104
1104
  username: string;
1105
1105
  id: string;
@@ -1133,7 +1133,7 @@ export declare const deviceDirectorySyncSchema: z.ZodObject<{
1133
1133
  kind: "bot" | "personal" | "organization" | "project" | "channel";
1134
1134
  accountId: string;
1135
1135
  id: string;
1136
- relationship: "self" | "owner" | "member";
1136
+ relationship: "owner" | "self" | "member";
1137
1137
  account: {
1138
1138
  username: string;
1139
1139
  id: string;
@@ -1239,7 +1239,7 @@ export declare const deviceDirectorySyncSchema: z.ZodObject<{
1239
1239
  kind: "bot" | "personal" | "organization" | "project" | "channel";
1240
1240
  accountId: string;
1241
1241
  id: string;
1242
- relationship: "self" | "owner" | "member";
1242
+ relationship: "owner" | "self" | "member";
1243
1243
  account: {
1244
1244
  username: string;
1245
1245
  id: string;
@@ -1291,7 +1291,7 @@ export declare const deviceDirectorySyncSchema: z.ZodObject<{
1291
1291
  kind: "bot" | "personal" | "organization" | "project" | "channel";
1292
1292
  accountId: string;
1293
1293
  id: string;
1294
- relationship: "self" | "owner" | "member";
1294
+ relationship: "owner" | "self" | "member";
1295
1295
  account: {
1296
1296
  username: string;
1297
1297
  id: string;
@@ -65,7 +65,7 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
65
65
  did: z.ZodOptional<z.ZodString>;
66
66
  verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
67
67
  kind: z.ZodOptional<z.ZodEnum<["personal", "organization", "project", "bot", "channel"]>>;
68
- accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[], ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[]>>;
68
+ accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[], ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[]>>;
69
69
  relationship: z.ZodOptional<z.ZodType<import("./userResponse").UserRelationship, z.ZodTypeDef, import("./userResponse").UserRelationship>>;
70
70
  themePreference: z.ZodOptional<z.ZodType<import("./userResponse").ThemePreference, z.ZodTypeDef, import("./userResponse").ThemePreference>>;
71
71
  } & {
@@ -112,7 +112,7 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
112
112
  did: z.ZodOptional<z.ZodString>;
113
113
  verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
114
114
  kind: z.ZodOptional<z.ZodEnum<["personal", "organization", "project", "bot", "channel"]>>;
115
- accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[], ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[]>>;
115
+ accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[], ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[]>>;
116
116
  relationship: z.ZodOptional<z.ZodType<import("./userResponse").UserRelationship, z.ZodTypeDef, import("./userResponse").UserRelationship>>;
117
117
  themePreference: z.ZodOptional<z.ZodType<import("./userResponse").ThemePreference, z.ZodTypeDef, import("./userResponse").ThemePreference>>;
118
118
  } & {
@@ -159,7 +159,7 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
159
159
  did: z.ZodOptional<z.ZodString>;
160
160
  verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
161
161
  kind: z.ZodOptional<z.ZodEnum<["personal", "organization", "project", "bot", "channel"]>>;
162
- accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[], ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[]>>;
162
+ accountCategories: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["news", "politics", "business", "startup", "finance", "crypto", "marketplace", "retail", "real_estate", "agency", "landlord", "cooperative", "architecture", "technology", "software", "ai", "security", "automation", "science", "education", "books", "health", "fitness", "sports", "gaming", "music", "film", "podcast", "art", "photography", "comedy", "food", "travel", "fashion", "home_garden", "diy", "automotive", "animals", "family", "nonprofit", "government", "community", "activism", "environment", "religion", "other"]>, "many">, ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[], ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[]>>;
163
163
  relationship: z.ZodOptional<z.ZodType<import("./userResponse").UserRelationship, z.ZodTypeDef, import("./userResponse").UserRelationship>>;
164
164
  themePreference: z.ZodOptional<z.ZodType<import("./userResponse").ThemePreference, z.ZodTypeDef, import("./userResponse").ThemePreference>>;
165
165
  } & {
@@ -257,7 +257,7 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
257
257
  bio?: string | undefined;
258
258
  avatar?: string | null | undefined;
259
259
  color?: string | null | undefined;
260
- accountCategories?: ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
260
+ accountCategories?: ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
261
261
  publicKey?: string | undefined;
262
262
  verified?: boolean | undefined;
263
263
  did?: string | undefined;
@@ -311,7 +311,7 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
311
311
  bio?: string | undefined;
312
312
  avatar?: string | null | undefined;
313
313
  color?: string | null | undefined;
314
- accountCategories?: ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
314
+ accountCategories?: ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
315
315
  publicKey?: string | undefined;
316
316
  verified?: boolean | undefined;
317
317
  did?: string | undefined;
@@ -365,7 +365,7 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
365
365
  bio?: string | undefined;
366
366
  avatar?: string | null | undefined;
367
367
  color?: string | null | undefined;
368
- accountCategories?: ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
368
+ accountCategories?: ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
369
369
  publicKey?: string | undefined;
370
370
  verified?: boolean | undefined;
371
371
  did?: string | undefined;
@@ -419,7 +419,7 @@ export declare const resolveExternalIdentityResponseSchema: z.ZodEffects<z.ZodOb
419
419
  bio?: string | undefined;
420
420
  avatar?: string | null | undefined;
421
421
  color?: string | null | undefined;
422
- accountCategories?: ("news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "security" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
422
+ accountCategories?: ("security" | "news" | "politics" | "business" | "startup" | "finance" | "crypto" | "marketplace" | "retail" | "real_estate" | "agency" | "landlord" | "cooperative" | "architecture" | "technology" | "software" | "ai" | "automation" | "science" | "education" | "books" | "health" | "fitness" | "sports" | "gaming" | "music" | "film" | "podcast" | "art" | "photography" | "comedy" | "food" | "travel" | "fashion" | "home_garden" | "diy" | "automotive" | "animals" | "family" | "nonprofit" | "government" | "community" | "activism" | "environment" | "religion" | "other")[] | undefined;
423
423
  publicKey?: string | undefined;
424
424
  verified?: boolean | undefined;
425
425
  did?: string | undefined;
@@ -14,8 +14,9 @@
14
14
  * - DID = `did:web:oxy.so:u:<userId>` — anchored on the stable account id, NOT
15
15
  * the keypair. The keypair is a *verification method* that maps 1:1 to the
16
16
  * existing `authMethods[]`. Custodial (password-only) users get a DID
17
- * controlled solely by Oxy (`OXY_DID`); creating a Commons key upgrades them
18
- * to self-sovereign (`controller = [userDid, OXY_DID]`); fully reversible.
17
+ * controlled solely by Oxy (`OXY_DID`); linking a root makes them
18
+ * self-sovereign (`controller = [userDid]`, ADR 0024 D9). A root is never
19
+ * unlinked back into a custodial account.
19
20
  * - Verification methods use the secp256k1 `EcdsaSecp256k1VerificationKey2019`
20
21
  * type with `publicKeyHex` for now (a `Multikey`/`publicKeyMultibase` form may
21
22
  * be added later — see the plan's open risks).
@@ -1,30 +1,33 @@
1
1
  /**
2
- * Identity move contract — take a web identity INTO Commons (a MOVE, not a copy).
2
+ * Identity move contract — give a web root to Commons (add it, or keep it only in
3
+ * Commons; ADR 0024 D6).
3
4
  *
4
- * Design: `docs/superpowers/specs/2026-09-15-one-identity-two-carriers-design.md` §5.
5
+ * The web (holding the root) shows a QR carrying only a move id; Commons scans.
6
+ * The relay in between must not be able to take the root, so:
5
7
  *
6
- * Flow (the web — the OLD carrier — shows the QR; Commons — the NEW carrier —
7
- * scans it):
8
- * 1. `id.oxy.so` generates an ephemeral secp256k1 pair and calls
9
- * `POST /identity/move { initiatorEphemeralPublicKey }` (bearer) →
10
- * `{ moveId, expiresAt }`. The QR carries `moveId` only.
11
- * 2. Commons scans, generates its own ephemeral pair, and calls
12
- * `POST /identity/move/:moveId/join { responderEphemeralPublicKey }` (no
13
- * bearer — Commons has no identity yet).
14
- * 3. Both sides derive the same 6-digit SAS from the move id and BOTH ephemeral
15
- * keys and show it. The person confirms on the web that they match. A relay
16
- * that substituted either key produces two different codes.
17
- * 4. The web seals the BIP-39 entropy under
18
- * `HKDF(ECDH(initiatorEph, responderEph), moveId, 'oxy-identity-move-v1')` and
19
- * calls `POST /identity/move/:moveId/seal` (bearer + identity-key proof).
20
- * 5. Commons decrypts, imports the identity, and posts a RECEIPT: a signature by
21
- * the identity key over `{ action:'identity_move_received', moveId, timestamp }`
22
- * (`POST /identity/move/:moveId/receipt`). The server checks it against the
23
- * account's key; the WEB verifies it again locally before destroying its copy,
24
- * so not even the server can fake a completed move.
8
+ * 1. `POST /identity/move { initiatorCommitment }` — the web publishes only
9
+ * `H(initiatorKey, nonce)`, never the key.
10
+ * 2. `POST /identity/move/:moveId/join { responderEphemeralPublicKey }` —
11
+ * Commons, having read the commitment first, joins with its own key.
12
+ * 3. `POST /identity/move/:moveId/reveal` — only then does the web reveal its
13
+ * key and nonce; Commons checks them against the commitment it read.
14
+ * 4. Both screens show a 6-digit code over `(moveId, both keys, commitment)`;
15
+ * the person confirms on the web that they match.
16
+ * 5. `POST /identity/move/:moveId/seal` — the web seals the phrase entropy under
17
+ * `HKDF(ECDH(both keys), moveId)`, authorized by a one-use root proof over the
18
+ * exact sealed bytes.
19
+ * 6. `POST /identity/move/:moveId/receipt` — Commons stores the root, reads it
20
+ * back from its keychain, and signs a receipt over the move, the root, both
21
+ * keys and the digest of the ciphertext it opened. The server verifies it; the
22
+ * web verifies it again from what IT sealed before removing anything.
25
23
  *
26
- * The server holds two ephemeral public keys, an opaque ciphertext, and a
27
- * receipt. It never holds anything that decrypts the ciphertext.
24
+ * Why the commitment: without it the relay sees both keys before committing to
25
+ * anything and can grind a substituted key until the two codes agree (~10⁶
26
+ * tries, seconds). With it, the relay must fix the key it shows Commons before
27
+ * learning Commons' key, and the key it shows the web before the web reveals.
28
+ *
29
+ * The server holds a commitment, two ephemeral public keys, an opaque ciphertext
30
+ * and a receipt — nothing that decrypts the ciphertext.
28
31
  *
29
32
  * Platform-agnostic — zod only, ESM-safe (no `require()`).
30
33
  */
@@ -40,11 +43,12 @@ export type IdentityMoveStatus = (typeof IDENTITY_MOVE_STATUSES)[number];
40
43
  /** The QR payload Commons scans. Carries the move id only. */
41
44
  export declare const IDENTITY_MOVE_QR_PREFIX = "oxycommons://move?id=";
42
45
  export declare const identityMoveCreateRequestSchema: z.ZodObject<{
43
- initiatorEphemeralPublicKey: z.ZodString;
44
- }, "strip", z.ZodTypeAny, {
45
- initiatorEphemeralPublicKey: string;
46
+ /** `H(initiator ephemeral key, nonce)` — the key itself is revealed only after Commons joins. */
47
+ initiatorCommitment: z.ZodString;
48
+ }, "strict", z.ZodTypeAny, {
49
+ initiatorCommitment: string;
46
50
  }, {
47
- initiatorEphemeralPublicKey: string;
51
+ initiatorCommitment: string;
48
52
  }>;
49
53
  export interface IdentityMoveCreateResponse {
50
54
  moveId: string;
@@ -58,52 +62,124 @@ export declare const identityMoveJoinRequestSchema: z.ZodObject<{
58
62
  }, {
59
63
  responderEphemeralPublicKey: string;
60
64
  }>;
65
+ /** After Commons joined: the committed key and its nonce. */
66
+ export declare const identityMoveRevealRequestSchema: z.ZodObject<{
67
+ initiatorEphemeralPublicKey: z.ZodString;
68
+ commitmentNonce: z.ZodString;
69
+ }, "strict", z.ZodTypeAny, {
70
+ initiatorEphemeralPublicKey: string;
71
+ commitmentNonce: string;
72
+ }, {
73
+ initiatorEphemeralPublicKey: string;
74
+ commitmentNonce: string;
75
+ }>;
61
76
  export declare const identityMoveSealRequestSchema: z.ZodObject<{
62
77
  /** 24-byte XChaCha20-Poly1305 nonce, hex. */
63
78
  nonce: z.ZodString;
64
- /** The 16-byte entropy, tag appended (32 bytes), hex. */
79
+ /** The 16–32-byte phrase entropy (12–24 words), tag appended, hex. */
65
80
  ciphertext: z.ZodString;
66
- /** Identity-key proof over `{ action:'identity_move_seal', moveId, timestamp }`. */
67
- signature: z.ZodString;
68
- timestamp: z.ZodNumber;
69
- }, "strip", z.ZodTypeAny, {
70
- signature: string;
81
+ /**
82
+ * Root proof (`identity_move_seal`), payload `{ moveId, nonce, ciphertext }`,
83
+ * over a one-use challenge from `POST /identity/proof-challenge`.
84
+ */
85
+ proof: z.ZodObject<{
86
+ v: z.ZodLiteral<2>;
87
+ challenge: z.ZodString;
88
+ expiresAt: z.ZodNumber;
89
+ signature: z.ZodString;
90
+ }, "strip", z.ZodTypeAny, {
91
+ expiresAt: number;
92
+ signature: string;
93
+ v: 2;
94
+ challenge: string;
95
+ }, {
96
+ expiresAt: number;
97
+ signature: string;
98
+ v: 2;
99
+ challenge: string;
100
+ }>;
101
+ }, "strict", z.ZodTypeAny, {
102
+ proof: {
103
+ expiresAt: number;
104
+ signature: string;
105
+ v: 2;
106
+ challenge: string;
107
+ };
71
108
  nonce: string;
72
109
  ciphertext: string;
73
- timestamp: number;
74
110
  }, {
75
- signature: string;
111
+ proof: {
112
+ expiresAt: number;
113
+ signature: string;
114
+ v: 2;
115
+ challenge: string;
116
+ };
76
117
  nonce: string;
77
118
  ciphertext: string;
78
- timestamp: number;
79
119
  }>;
80
120
  export declare const identityMoveReceiptRequestSchema: z.ZodObject<{
81
- /** Identity-key signature over `{ action:'identity_move_received', moveId, timestamp }`. */
121
+ /** Root signature over `buildMoveReceiptMessage(...)`. */
82
122
  signature: z.ZodString;
83
- timestamp: z.ZodNumber;
84
- }, "strip", z.ZodTypeAny, {
123
+ }, "strict", z.ZodTypeAny, {
85
124
  signature: string;
86
- timestamp: number;
87
125
  }, {
88
126
  signature: string;
89
- timestamp: number;
90
127
  }>;
91
128
  /** `GET /identity/move/:moveId` — everything either side needs, nothing that decrypts. */
92
129
  export interface IdentityMoveState {
93
130
  moveId: string;
94
131
  status: IdentityMoveStatus;
132
+ /** The commitment Commons must read before joining. */
133
+ initiatorCommitment: string;
134
+ /** The commitment's nonce, published with the key at reveal. */
135
+ initiatorCommitmentNonce: string | null;
95
136
  /** The identity being moved (so Commons can check the key it will import). */
96
137
  publicKey: string;
97
- initiatorEphemeralPublicKey: string;
138
+ /** `null` until the web reveals it, after Commons joined. */
139
+ initiatorEphemeralPublicKey: string | null;
98
140
  responderEphemeralPublicKey: string | null;
99
141
  nonce: string | null;
100
142
  ciphertext: string | null;
101
143
  receiptSignature: string | null;
102
- receiptTimestamp: number | null;
103
144
  expiresAt: string;
104
145
  }
105
146
  export declare const identityMoveStateSchema: z.ZodType<IdentityMoveState>;
106
147
  export type IdentityMoveCreateRequest = z.infer<typeof identityMoveCreateRequestSchema>;
107
148
  export type IdentityMoveJoinRequest = z.infer<typeof identityMoveJoinRequestSchema>;
149
+ export type IdentityMoveRevealRequest = z.infer<typeof identityMoveRevealRequestSchema>;
108
150
  export type IdentityMoveSealRequest = z.infer<typeof identityMoveSealRequestSchema>;
109
151
  export type IdentityMoveReceiptRequest = z.infer<typeof identityMoveReceiptRequestSchema>;
152
+ /**
153
+ * The initiator's commitment input, `canonicalJson({ v, purpose, key, nonce })`,
154
+ * which the caller hashes with SHA-256.
155
+ */
156
+ export declare function buildMoveCommitmentInput(initiatorEphemeralPublicKey: string, nonce: string): string;
157
+ /** The bytes both sides hash for the 6-digit code. */
158
+ export declare function buildMoveSasInput(input: {
159
+ moveId: string;
160
+ initiatorEphemeralPublicKey: string;
161
+ responderEphemeralPublicKey: string;
162
+ initiatorCommitment: string;
163
+ }): string;
164
+ /** The ciphertext digest input the receipt binds: `canonicalJson({ nonce, ciphertext })`. */
165
+ export declare function buildMoveCiphertextDigestInput(sealed: {
166
+ nonce: string;
167
+ ciphertext: string;
168
+ }): string;
169
+ /** The payload a seal proof digests. */
170
+ export declare function buildMoveSealPayload(moveId: string, sealed: {
171
+ nonce: string;
172
+ ciphertext: string;
173
+ }): {
174
+ moveId: string;
175
+ nonce: string;
176
+ ciphertext: string;
177
+ };
178
+ /** The exact bytes a receipt signs. */
179
+ export declare function buildMoveReceiptMessage(input: {
180
+ moveId: string;
181
+ rootPublicKey: string;
182
+ initiatorEphemeralPublicKey: string;
183
+ responderEphemeralPublicKey: string;
184
+ ciphertextDigest: string;
185
+ }): string;