@coasys/ad4m 0.13.1-staging.6 → 0.13.1-staging.7

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 (174) hide show
  1. package/lib/index.cjs +1130 -650
  2. package/lib/index.js +1130 -651
  3. package/lib/src/Ad4mClient.d.ts +3 -0
  4. package/lib/src/Ad4mClient.js +9 -2
  5. package/lib/src/agent/Agent.d.ts +5 -1
  6. package/lib/src/agent/Agent.js +3 -0
  7. package/lib/src/agent/AgentClient.d.ts +3 -0
  8. package/lib/src/agent/AgentClient.js +3 -0
  9. package/lib/src/agent/AgentStatus.d.ts +2 -0
  10. package/lib/src/agent/AgentStatus.js +2 -0
  11. package/lib/src/apiClient.d.ts +41 -0
  12. package/lib/src/apiClient.js +138 -1
  13. package/lib/src/generated/api/AgentStatus.d.ts +5 -0
  14. package/lib/src/generated/api/AgentWithIdentity.d.ts +14 -0
  15. package/lib/src/generated/api/AgentWithIdentity.js +1 -0
  16. package/lib/src/generated/api/BotView.d.ts +7 -0
  17. package/lib/src/generated/api/BotView.js +2 -0
  18. package/lib/src/generated/api/ClaimOfferParams.d.ts +13 -0
  19. package/lib/src/generated/api/ClaimOfferParams.js +2 -0
  20. package/lib/src/generated/api/ClaimOfferResult.d.ts +14 -0
  21. package/lib/src/generated/api/ClaimOfferResult.js +1 -0
  22. package/lib/src/generated/api/ClaimView.d.ts +11 -0
  23. package/lib/src/generated/api/ClaimView.js +2 -0
  24. package/lib/src/generated/api/CosignInceptParams.d.ts +10 -0
  25. package/lib/src/generated/api/CosignInceptParams.js +1 -0
  26. package/lib/src/generated/api/DeviceView.d.ts +17 -0
  27. package/lib/src/generated/api/DeviceView.js +1 -0
  28. package/lib/src/generated/api/DidBotScope.d.ts +7 -0
  29. package/lib/src/generated/api/DidBotScope.js +2 -0
  30. package/lib/src/generated/api/DidDocument.d.ts +16 -0
  31. package/lib/src/generated/api/DidDocument.js +1 -0
  32. package/lib/src/generated/api/DidDocumentMetadata.d.ts +18 -0
  33. package/lib/src/generated/api/DidDocumentMetadata.js +2 -0
  34. package/lib/src/generated/api/DidResolutionMetadata.d.ts +51 -0
  35. package/lib/src/generated/api/DidResolutionMetadata.js +1 -0
  36. package/lib/src/generated/api/DidResolutionResult.d.ts +16 -0
  37. package/lib/src/generated/api/DidResolutionResult.js +1 -0
  38. package/lib/src/generated/api/DidVerificationMethod.d.ts +17 -0
  39. package/lib/src/generated/api/DidVerificationMethod.js +1 -0
  40. package/lib/src/generated/api/Events.d.ts +2 -0
  41. package/lib/src/generated/api/ForkRecord.d.ts +11 -0
  42. package/lib/src/generated/api/ForkRecord.js +2 -0
  43. package/lib/src/generated/api/IdentityForkEvent.d.ts +10 -0
  44. package/lib/src/generated/api/IdentityForkEvent.js +2 -0
  45. package/lib/src/generated/api/IdentityLog.d.ts +18 -0
  46. package/lib/src/generated/api/IdentityLog.js +1 -0
  47. package/lib/src/generated/api/IdentityStatus.d.ts +48 -0
  48. package/lib/src/generated/api/IdentityStatus.js +1 -0
  49. package/lib/src/generated/api/JoinStatus.d.ts +10 -0
  50. package/lib/src/generated/api/JoinStatus.js +2 -0
  51. package/lib/src/generated/api/JoinStatusParams.d.ts +6 -0
  52. package/lib/src/generated/api/JoinStatusParams.js +2 -0
  53. package/lib/src/generated/api/LogParams.d.ts +17 -0
  54. package/lib/src/generated/api/LogParams.js +2 -0
  55. package/lib/src/generated/api/Offer.d.ts +14 -0
  56. package/lib/src/generated/api/Offer.js +1 -0
  57. package/lib/src/generated/api/OfferKind.d.ts +4 -0
  58. package/lib/src/generated/api/OfferKind.js +2 -0
  59. package/lib/src/generated/api/OfferListing.d.ts +9 -0
  60. package/lib/src/generated/api/OfferListing.js +1 -0
  61. package/lib/src/generated/api/OfferOpened.d.ts +6 -0
  62. package/lib/src/generated/api/OfferOpened.js +2 -0
  63. package/lib/src/generated/api/OfferState.d.ts +21 -0
  64. package/lib/src/generated/api/OfferState.js +1 -0
  65. package/lib/src/generated/api/OffersParams.d.ts +11 -0
  66. package/lib/src/generated/api/OffersParams.js +1 -0
  67. package/lib/src/generated/api/OpenOfferParams.d.ts +7 -0
  68. package/lib/src/generated/api/OpenOfferParams.js +1 -0
  69. package/lib/src/generated/api/PublishParams.d.ts +11 -0
  70. package/lib/src/generated/api/PublishParams.js +1 -0
  71. package/lib/src/generated/api/RequestBody.d.ts +15 -0
  72. package/lib/src/generated/api/RequestBody.js +2 -0
  73. package/lib/src/generated/api/ResetLogParams.d.ts +9 -0
  74. package/lib/src/generated/api/ResetLogParams.js +2 -0
  75. package/lib/src/generated/api/ResolveParams.d.ts +18 -0
  76. package/lib/src/generated/api/ResolveParams.js +2 -0
  77. package/lib/src/generated/api/RpcMethods.d.ts +68 -1
  78. package/lib/src/generated/api/RpcMethods.js +6 -0
  79. package/lib/src/generated/api/SignedBy.d.ts +8 -0
  80. package/lib/src/generated/api/SignedBy.js +2 -0
  81. package/lib/src/generated/api/SignedHead.d.ts +14 -0
  82. package/lib/src/generated/api/SignedHead.js +2 -0
  83. package/lib/src/generated/api/SignedOffer.d.ts +10 -0
  84. package/lib/src/generated/api/SignedOffer.js +1 -0
  85. package/lib/src/generated/api/SignedRequest.d.ts +8 -0
  86. package/lib/src/generated/api/SignedRequest.js +1 -0
  87. package/lib/src/generated/api/SkippedSource.d.ts +7 -0
  88. package/lib/src/generated/api/SkippedSource.js +2 -0
  89. package/lib/src/generated/api/StoreBehind.d.ts +13 -0
  90. package/lib/src/generated/api/StoreBehind.js +2 -0
  91. package/lib/src/generated/api/StoreInfo.d.ts +15 -0
  92. package/lib/src/generated/api/StoreInfo.js +2 -0
  93. package/lib/src/generated/api/index.d.ts +38 -0
  94. package/lib/src/identity/IdentityClient.d.ts +70 -0
  95. package/lib/src/identity/IdentityClient.js +97 -0
  96. package/lib/src/index.d.ts +1 -0
  97. package/lib/src/index.js +1 -0
  98. package/lib/src/model/Ad4mModel.d.ts +4 -0
  99. package/lib/src/model/Ad4mModel.js +12 -1
  100. package/lib/src/neighbourhood/MeshManager.d.ts +24 -0
  101. package/lib/src/neighbourhood/MeshManager.js +42 -1
  102. package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +10 -0
  103. package/lib/src/neighbourhood/NeighbourhoodClient.js +16 -0
  104. package/lib/src/neighbourhood/Session.js +2 -0
  105. package/lib/src/neighbourhood/SfuManager.d.ts +30 -3
  106. package/lib/src/neighbourhood/SfuManager.js +78 -41
  107. package/lib/src/perspectives/FlowInstance.js +6 -4
  108. package/lib/src/shacl/SHACLFlow.d.ts +5 -3
  109. package/lib/src/shacl/SHACLFlow.js +121 -5
  110. package/package.json +2 -2
  111. package/src/Ad4mClient.test.ts +64 -4
  112. package/src/Ad4mClient.ts +8 -0
  113. package/src/agent/Agent.ts +9 -1
  114. package/src/agent/AgentClient.ts +5 -1
  115. package/src/agent/AgentStatus.ts +4 -0
  116. package/src/apiClient.test.ts +302 -0
  117. package/src/apiClient.ts +136 -1
  118. package/src/generated/api/AgentStatus.ts +6 -1
  119. package/src/generated/api/AgentWithIdentity.ts +12 -0
  120. package/src/generated/api/BotView.ts +6 -0
  121. package/src/generated/api/ClaimOfferParams.ts +14 -0
  122. package/src/generated/api/ClaimOfferResult.ts +11 -0
  123. package/src/generated/api/ClaimView.ts +6 -0
  124. package/src/generated/api/CosignInceptParams.ts +11 -0
  125. package/src/generated/api/DeviceView.ts +12 -0
  126. package/src/generated/api/DidBotScope.ts +6 -0
  127. package/src/generated/api/DidDocument.ts +8 -0
  128. package/src/generated/api/DidDocumentMetadata.ts +19 -0
  129. package/src/generated/api/DidResolutionMetadata.ts +52 -0
  130. package/src/generated/api/DidResolutionResult.ts +13 -0
  131. package/src/generated/api/DidVerificationMethod.ts +15 -0
  132. package/src/generated/api/Events.ts +2 -0
  133. package/src/generated/api/ForkRecord.ts +9 -0
  134. package/src/generated/api/IdentityForkEvent.ts +7 -0
  135. package/src/generated/api/IdentityLog.ts +17 -0
  136. package/src/generated/api/IdentityStatus.ts +49 -0
  137. package/src/generated/api/JoinStatus.ts +7 -0
  138. package/src/generated/api/JoinStatusParams.ts +6 -0
  139. package/src/generated/api/LogParams.ts +18 -0
  140. package/src/generated/api/Offer.ts +8 -0
  141. package/src/generated/api/OfferKind.ts +6 -0
  142. package/src/generated/api/OfferListing.ts +8 -0
  143. package/src/generated/api/OfferOpened.ts +6 -0
  144. package/src/generated/api/OfferState.ts +7 -0
  145. package/src/generated/api/OffersParams.ts +11 -0
  146. package/src/generated/api/OpenOfferParams.ts +7 -0
  147. package/src/generated/api/PublishParams.ts +12 -0
  148. package/src/generated/api/RequestBody.ts +7 -0
  149. package/src/generated/api/ResetLogParams.ts +10 -0
  150. package/src/generated/api/ResolveParams.ts +19 -0
  151. package/src/generated/api/RpcMethods.ts +38 -1
  152. package/src/generated/api/SignedBy.ts +6 -0
  153. package/src/generated/api/SignedHead.ts +10 -0
  154. package/src/generated/api/SignedOffer.ts +8 -0
  155. package/src/generated/api/SignedRequest.ts +7 -0
  156. package/src/generated/api/SkippedSource.ts +6 -0
  157. package/src/generated/api/StoreBehind.ts +14 -0
  158. package/src/generated/api/StoreInfo.ts +16 -0
  159. package/src/generated/api/index.ts +39 -0
  160. package/src/identity/IdentityClient.ts +111 -0
  161. package/src/index.ts +1 -0
  162. package/src/model/Ad4mModel.ts +11 -1
  163. package/src/model/write-round-trips.test.ts +111 -2
  164. package/src/neighbourhood/MeshManager.test.ts +87 -0
  165. package/src/neighbourhood/MeshManager.ts +50 -1
  166. package/src/neighbourhood/NeighbourhoodClient.test.ts +27 -0
  167. package/src/neighbourhood/NeighbourhoodClient.ts +19 -0
  168. package/src/neighbourhood/Session.test.ts +5 -0
  169. package/src/neighbourhood/Session.ts +2 -0
  170. package/src/neighbourhood/SfuManager.test.ts +293 -0
  171. package/src/neighbourhood/SfuManager.ts +92 -45
  172. package/src/perspectives/FlowInstance.ts +6 -4
  173. package/src/shacl/SHACLFlow.test.ts +221 -0
  174. package/src/shacl/SHACLFlow.ts +121 -5
@@ -0,0 +1,52 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ForkRecord } from "./ForkRecord";
3
+ import type { SkippedSource } from "./SkippedSource";
4
+
5
+ /**
6
+ * DID resolution metadata, with the executor's `coasys:` members.
7
+ */
8
+ export type DidResolutionMetadata = {
9
+ /**
10
+ * `application/did+ld+json` on success.
11
+ */
12
+ contentType?: string,
13
+ /**
14
+ * The DID Core error: `invalidDid`, `invalidDidUrl`, `methodNotSupported`, `notFound`,
15
+ * `representationNotSupported`, `internalError`.
16
+ */
17
+ error?: string,
18
+ /**
19
+ * Why, in words, with an error.
20
+ */
21
+ "coasys:message"?: string,
22
+ /**
23
+ * The host that answered the log (`host[:port][/path]`), or `cache`.
24
+ */
25
+ "coasys:source"?: string,
26
+ /**
27
+ * The log's head is one the cache accepted signed by a key of `identity.storeKeys`.
28
+ */
29
+ "coasys:headTrusted"?: boolean,
30
+ /**
31
+ * The first fork the cache recorded for the log; the document is from the log it held
32
+ * first.
33
+ */
34
+ "coasys:fork"?: ForkRecord,
35
+ /**
36
+ * For a `did:key`: the key's id in its person's log (`d2`).
37
+ */
38
+ "coasys:keyId"?: string,
39
+ /**
40
+ * For a `did:key`: the key is valid at the head (a revoked key still resolves to its
41
+ * person, with `false`).
42
+ */
43
+ "coasys:keyValid"?: boolean,
44
+ /**
45
+ * For a `did:key`: the key index named an identity whose log does not list the key.
46
+ */
47
+ "coasys:keyIndexMismatch"?: boolean,
48
+ /**
49
+ * Sources the resolver did not use, with why (refused address, unsupported scheme, a
50
+ * failed fetch).
51
+ */
52
+ "coasys:skipped"?: Array<SkippedSource>, };
@@ -0,0 +1,13 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DidDocument } from "./DidDocument";
3
+ import type { DidDocumentMetadata } from "./DidDocumentMetadata";
4
+ import type { DidResolutionMetadata } from "./DidResolutionMetadata";
5
+ import type { DidVerificationMethod } from "./DidVerificationMethod";
6
+
7
+ /**
8
+ * `identity.resolve`: a W3C DID Core resolution result. `didDocument` is the JSON-LD the
9
+ * identity core writes (`ad4m_identity_core::did_document`); with a fragment (`#d1`) it is
10
+ * `null` and `verificationMethod` holds that one method, its `id` made absolute
11
+ * (`<did>#d1`). On an error both are `null` and `didResolutionMetadata.error` names it.
12
+ */
13
+ export type DidResolutionResult = { didDocument: DidDocument | null, didDocumentMetadata: DidDocumentMetadata, didResolutionMetadata: DidResolutionMetadata, verificationMethod?: DidVerificationMethod, };
@@ -0,0 +1,15 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { DidBotScope } from "./DidBotScope";
3
+
4
+ /**
5
+ * A verification method of a [`DidDocument`].
6
+ */
7
+ export type DidVerificationMethod = {
8
+ /**
9
+ * `#d1` in a document; `<did>#d1` when dereferenced alone.
10
+ */
11
+ id: string, type: string, controller: string, publicKeyMultibase: string,
12
+ /**
13
+ * A bot key's scope at the document's seq.
14
+ */
15
+ "coasys:bot"?: DidBotScope, };
@@ -10,6 +10,7 @@ import type { AutoProcessorNeighbourhoodState } from "./AutoProcessorNeighbourho
10
10
  import type { ExceptionOccurredEvent } from "./ExceptionOccurredEvent";
11
11
  import type { FlowStateChangedEvent } from "./FlowStateChangedEvent";
12
12
  import type { HostingUserInfo } from "./HostingUserInfo";
13
+ import type { IdentityForkEvent } from "./IdentityForkEvent";
13
14
  import type { NeighbourhoodSignalFilter } from "./NeighbourhoodSignalFilter";
14
15
  import type { NotificationTriggeredEvent } from "./NotificationTriggeredEvent";
15
16
  import type { PerspectiveEvent } from "./PerspectiveEvent";
@@ -50,6 +51,7 @@ export interface EventMap {
50
51
  "sfu-data": SfuDataMessage;
51
52
  "sfu-room-roster": SfuRoomRoster;
52
53
  "flow-state-changed": FlowStateChangedEvent;
54
+ "identity-fork": IdentityForkEvent;
53
55
  }
54
56
 
55
57
  export type EventName = keyof EventMap;
@@ -0,0 +1,9 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * Two different events at one seq of a log, as the cache recorded them: `ours` the hash of the
5
+ * cached event at `seq`, `theirs` the hash of the other one, which holds on the log before
6
+ * `seq`. A store that answers a shorter log records none (it is behind, or an unverified
7
+ * conflict).
8
+ */
9
+ export type ForkRecord = { seq: number, ours: string, theirs: string, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `identity-fork`: the cache found two different valid events at one seq of a log. It kept its
5
+ * history and appended nothing. A store that answers a shorter log raises none.
6
+ */
7
+ export type IdentityForkEvent = { did: string, seq: number, ours: string, theirs: string, };
@@ -0,0 +1,17 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ForkRecord } from "./ForkRecord";
3
+ import type { SignedHead } from "./SignedHead";
4
+ import type { JsonValue } from "./serde_json/JsonValue";
5
+
6
+ /**
7
+ * `identity.log`: a log as the cache holds it. Every event passed `fold` here.
8
+ */
9
+ export type IdentityLog = { did: string,
10
+ /**
11
+ * The events from `from` on, in seq order, as JSON.
12
+ */
13
+ events: Array<JsonValue>,
14
+ /**
15
+ * The last head of the log the cache accepted from the agent language.
16
+ */
17
+ head: SignedHead | null, fork: ForkRecord | null, };
@@ -0,0 +1,49 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ForkRecord } from "./ForkRecord";
3
+ import type { SignedHead } from "./SignedHead";
4
+ import type { StoreBehind } from "./StoreBehind";
5
+ import type { StoreInfo } from "./StoreInfo";
6
+
7
+ /**
8
+ * `identity.status`: what this agent's device key speaks for.
9
+ */
10
+ export type IdentityStatus = {
11
+ /**
12
+ * The `did:scid` this agent speaks for, or `null` (a device-only identity).
13
+ */
14
+ did: string | null,
15
+ /**
16
+ * The agent's device key, a multikey (`z6Mk…`): its `did:key` without the prefix.
17
+ */
18
+ deviceKey: string,
19
+ /**
20
+ * The X25519 key `did_key` derives from the device key (`z6LS…`), the `enc` an `incept`
21
+ * or `add` lists for it.
22
+ */
23
+ deviceEnc: string,
24
+ /**
25
+ * The device key's id in the log (`d1`), once the log lists it.
26
+ */
27
+ keyId: string | null,
28
+ /**
29
+ * The seq of the event that revoked the device key, if one did.
30
+ */
31
+ revoked: number | null,
32
+ /**
33
+ * The last head of the log the cache accepted.
34
+ */
35
+ head: SignedHead | null,
36
+ /**
37
+ * The first fork the cache recorded for the log.
38
+ */
39
+ fork: ForkRecord | null,
40
+ /**
41
+ * Set while the configured store answers the log behind the cache (a store restored from
42
+ * a backup, or not caught up): the cached log answers meanwhile. `null` once it catches up.
43
+ */
44
+ storeBehind: StoreBehind | null,
45
+ /**
46
+ * The identity store this executor uses (the config's, else its network seed's), and
47
+ * whether it trusts a key for it; `null` when it has none (a network without a store).
48
+ */
49
+ store: StoreInfo | null, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `identity.joinStatus`: the offer's state for this executor's key. On `spent` the log lists
5
+ * the key and the agent speaks for `did`.
6
+ */
7
+ export type JoinStatus = { state: string, did: string | null, keyId: string | null, seq: number | null, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `identity.joinStatus` params.
5
+ */
6
+ export type JoinStatusParams = { offerId: string, };
@@ -0,0 +1,18 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `identity.log` params.
5
+ */
6
+ export type LogParams = {
7
+ /**
8
+ * A `did:scid:coasys:1:…`.
9
+ */
10
+ did: string,
11
+ /**
12
+ * The first seq to return (default 0).
13
+ */
14
+ from?: number,
15
+ /**
16
+ * Refresh from the agent language before answering.
17
+ */
18
+ fresh?: boolean, };
@@ -0,0 +1,8 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { OfferKind } from "./OfferKind";
3
+ import type { JsonValue } from "./serde_json/JsonValue";
4
+
5
+ /**
6
+ * An offer. Absent fields are left out: the signature covers the JCS form.
7
+ */
8
+ export type Offer = { scid: string, offerId: string, kind: OfferKind, commit: string, expires: number, deviceKey?: string, bot?: JsonValue, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * What an offer is for: `node` is an executor.
5
+ */
6
+ export type OfferKind = "device" | "node" | "bot";
@@ -0,0 +1,8 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { OfferState } from "./OfferState";
3
+ import type { SignedOffer } from "./SignedOffer";
4
+
5
+ /**
6
+ * One open or claimed offer of the identity.
7
+ */
8
+ export type OfferListing = { offer: SignedOffer, state: OfferState, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `identity.openOffer`.
5
+ */
6
+ export type OfferOpened = { offerId: string, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ClaimView } from "./ClaimView";
3
+
4
+ /**
5
+ * An offer's state.
6
+ */
7
+ export type OfferState = { "state": "open" } | { "state": "claimed", claim: ClaimView, } | { "state": "spent", seq: number, } | { "state": "expired" } | { "state": "cancelled" } | { "state": "contested" } | { "state": "superseded" };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { SignedRequest } from "./SignedRequest";
3
+
4
+ /**
5
+ * `identity.offers` params: a list request signed by the current master key.
6
+ */
7
+ export type OffersParams = { request: SignedRequest,
8
+ /**
9
+ * Seconds to wait for a change (0–8).
10
+ */
11
+ wait?: number, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { SignedOffer } from "./SignedOffer";
3
+
4
+ /**
5
+ * `identity.openOffer` params.
6
+ */
7
+ export type OpenOfferParams = { signedOffer: SignedOffer, };
@@ -0,0 +1,12 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { JsonValue } from "./serde_json/JsonValue";
3
+
4
+ /**
5
+ * `identity.publish` params. No vouching token or proof of work: the store has no brake yet
6
+ * and admits a new log without one.
7
+ */
8
+ export type PublishParams = {
9
+ /**
10
+ * Signed events that continue the log's head (or start a log), as JSON.
11
+ */
12
+ events: Array<JsonValue>, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type RequestBody = { did: string,
4
+ /**
5
+ * The `did:key` of the store the request is for; another store refuses it.
6
+ */
7
+ store: string, keyId: string, kelSeq: number, kelHash: string, method: string, path: string, bodyHash: string, nonce: string, expires: number, };
@@ -0,0 +1,10 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `identity.resetLog` params.
5
+ */
6
+ export type ResetLogParams = {
7
+ /**
8
+ * The `did:scid:coasys:1:…` whose cached log, accepted head and forks this executor drops.
9
+ */
10
+ did: string, };
@@ -0,0 +1,19 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `identity.resolve` params.
5
+ */
6
+ export type ResolveParams = {
7
+ /**
8
+ * A `did:scid:coasys:1:<scid>` DID URL (`?src=`, `?versionId=`, `#d1`), or a bare device
9
+ * `did:key:z6Mk…`.
10
+ */
11
+ didUrl: string,
12
+ /**
13
+ * Read the log from its sources even when the cache holds it.
14
+ */
15
+ fresh?: boolean,
16
+ /**
17
+ * The representation asked for; only `application/did+ld+json` (the default).
18
+ */
19
+ accept?: string, };
@@ -12,6 +12,7 @@ import type { AgentReply } from "./AgentReply";
12
12
  import type { AgentRevokeTokenParams } from "./AgentRevokeTokenParams";
13
13
  import type { AgentSignature } from "./AgentSignature";
14
14
  import type { AgentStatus } from "./AgentStatus";
15
+ import type { AgentWithIdentity } from "./AgentWithIdentity";
15
16
  import type { AgentsByDidsRequest } from "./AgentsByDidsRequest";
16
17
  import type { AiAddModelParams } from "./AiAddModelParams";
17
18
  import type { AiAddTaskParams } from "./AiAddTaskParams";
@@ -27,12 +28,17 @@ import type { AiUpdateTaskParams } from "./AiUpdateTaskParams";
27
28
  import type { ApplyTemplateRequest } from "./ApplyTemplateRequest";
28
29
  import type { Apps } from "./Apps";
29
30
  import type { CallSessionInfo } from "./CallSessionInfo";
31
+ import type { ClaimOfferParams } from "./ClaimOfferParams";
32
+ import type { ClaimOfferResult } from "./ClaimOfferResult";
30
33
  import type { ComputeLogEntry } from "./ComputeLogEntry";
34
+ import type { CosignInceptParams } from "./CosignInceptParams";
31
35
  import type { CreateExpressionRequest } from "./CreateExpressionRequest";
32
36
  import type { CreatePerspectiveRequest } from "./CreatePerspectiveRequest";
33
37
  import type { CreateUserRequest } from "./CreateUserRequest";
34
38
  import type { DecoratedLinkExpression } from "./DecoratedLinkExpression";
35
39
  import type { DecoratedPerspective } from "./DecoratedPerspective";
40
+ import type { DeviceView } from "./DeviceView";
41
+ import type { DidResolutionResult } from "./DidResolutionResult";
36
42
  import type { EmbedRequest } from "./EmbedRequest";
37
43
  import type { EntanglementProof } from "./EntanglementProof";
38
44
  import type { EntanglementProofPreflightRequest } from "./EntanglementProofPreflightRequest";
@@ -52,10 +58,14 @@ import type { HostRate } from "./HostRate";
52
58
  import type { HostingInfoResult } from "./HostingInfoResult";
53
59
  import type { HostingRequestPaymentResult } from "./HostingRequestPaymentResult";
54
60
  import type { HostingWalletResult } from "./HostingWalletResult";
61
+ import type { IdentityLog } from "./IdentityLog";
62
+ import type { IdentityStatus } from "./IdentityStatus";
55
63
  import type { ImportAgentRequest } from "./ImportAgentRequest";
56
64
  import type { ImportRequest } from "./ImportRequest";
57
65
  import type { InteractionMeta } from "./InteractionMeta";
58
66
  import type { JoinNeighbourhoodRequest } from "./JoinNeighbourhoodRequest";
67
+ import type { JoinStatus } from "./JoinStatus";
68
+ import type { JoinStatusParams } from "./JoinStatusParams";
59
69
  import type { JsonValue } from "./serde_json/JsonValue";
60
70
  import type { LanguageAddressParams } from "./LanguageAddressParams";
61
71
  import type { LanguageHandle } from "./LanguageHandle";
@@ -65,6 +75,7 @@ import type { LanguageRef } from "./LanguageRef";
65
75
  import type { LanguageWriteSettingsParams } from "./LanguageWriteSettingsParams";
66
76
  import type { LinkLanguageTemplatesRequest } from "./LinkLanguageTemplatesRequest";
67
77
  import type { LockAgentRequest } from "./LockAgentRequest";
78
+ import type { LogParams } from "./LogParams";
68
79
  import type { Model } from "./Model";
69
80
  import type { NeighbourhoodBroadcastParams } from "./NeighbourhoodBroadcastParams";
70
81
  import type { NeighbourhoodOnlineStatusParams } from "./NeighbourhoodOnlineStatusParams";
@@ -72,8 +83,12 @@ import type { NeighbourhoodSignalParams } from "./NeighbourhoodSignalParams";
72
83
  import type { NeighbourhoodUuidParams } from "./NeighbourhoodUuidParams";
73
84
  import type { Notification } from "./Notification";
74
85
  import type { NotificationInput } from "./NotificationInput";
86
+ import type { OfferListing } from "./OfferListing";
87
+ import type { OfferOpened } from "./OfferOpened";
88
+ import type { OffersParams } from "./OffersParams";
75
89
  import type { OnlineAgent } from "./OnlineAgent";
76
90
  import type { OpenLinkRequest } from "./OpenLinkRequest";
91
+ import type { OpenOfferParams } from "./OpenOfferParams";
77
92
  import type { OverlayView } from "./OverlayView";
78
93
  import type { PermitCapabilityRequest } from "./PermitCapabilityRequest";
79
94
  import type { PerspectiveAddAutoProcessorParams } from "./PerspectiveAddAutoProcessorParams";
@@ -127,8 +142,11 @@ import type { PromptRequest } from "./PromptRequest";
127
142
  import type { ProposeOutcome } from "./ProposeOutcome";
128
143
  import type { PublishLanguageRequest } from "./PublishLanguageRequest";
129
144
  import type { PublishNeighbourhoodRequest } from "./PublishNeighbourhoodRequest";
145
+ import type { PublishParams } from "./PublishParams";
130
146
  import type { RequestCapabilityRequest } from "./RequestCapabilityRequest";
131
147
  import type { RequestPaymentRequest } from "./RequestPaymentRequest";
148
+ import type { ResetLogParams } from "./ResetLogParams";
149
+ import type { ResolveParams } from "./ResolveParams";
132
150
  import type { RunAgentRequest } from "./RunAgentRequest";
133
151
  import type { RunInterpretationRequest } from "./RunInterpretationRequest";
134
152
  import type { RunInterpretationWithHarnessRequest } from "./RunInterpretationWithHarnessRequest";
@@ -166,6 +184,7 @@ import type { SfuSendDataParams } from "./SfuSendDataParams";
166
184
  import type { SfuSetConfigParams } from "./SfuSetConfigParams";
167
185
  import type { SfuStatus } from "./SfuStatus";
168
186
  import type { SignMessageRequest } from "./SignMessageRequest";
187
+ import type { SignedHead } from "./SignedHead";
169
188
  import type { TrustedAgentsWrapper } from "./TrustedAgentsWrapper";
170
189
  import type { UnlockAgentRequest } from "./UnlockAgentRequest";
171
190
  import type { UnytVersionInfo } from "./UnytVersionInfo";
@@ -195,7 +214,7 @@ export interface RpcMethods {
195
214
  "agent.entanglementProofPreflight": { params: EntanglementProofPreflightRequest; result: EntanglementProof };
196
215
  "agent.generate": { params: GenerateAgentRequest; result: AgentStatus };
197
216
  "agent.generateJwt": { params: GenerateJwtRequest; result: string };
198
- "agent.get": { params: Record<string, never>; result: Agent };
217
+ "agent.get": { params: Record<string, never>; result: AgentWithIdentity };
199
218
  "agent.getApps": { params: Record<string, never>; result: Array<Apps> };
200
219
  "agent.getEntanglementProofs": { params: Record<string, never>; result: Array<EntanglementProof> };
201
220
  "agent.getTrustedAgents": { params: Record<string, never>; result: Array<string> };
@@ -239,6 +258,17 @@ export interface RpcMethods {
239
258
  "hosting.setHotWallet": { params: SetHotWalletAddressRequest; result: boolean };
240
259
  "hosting.wallet": { params: Record<string, never>; result: HostingWalletResult };
241
260
  "hosting.walletHistory": { params: Record<string, never>; result: JsonValue };
261
+ "identity.claimOffer": { params: ClaimOfferParams; result: ClaimOfferResult };
262
+ "identity.cosignIncept": { params: CosignInceptParams; result: JsonValue };
263
+ "identity.devices": { params: Record<string, never>; result: Array<DeviceView> };
264
+ "identity.joinStatus": { params: JoinStatusParams; result: JoinStatus };
265
+ "identity.log": { params: LogParams; result: IdentityLog };
266
+ "identity.offers": { params: OffersParams; result: Array<OfferListing> };
267
+ "identity.openOffer": { params: OpenOfferParams; result: OfferOpened };
268
+ "identity.publish": { params: PublishParams; result: SignedHead };
269
+ "identity.resetLog": { params: ResetLogParams; result: boolean };
270
+ "identity.resolve": { params: ResolveParams; result: DidResolutionResult };
271
+ "identity.status": { params: Record<string, never>; result: IdentityStatus };
242
272
  "language.all": { params: LanguageListParams; result: Array<LanguageHandle> };
243
273
  "language.applyTemplate": { params: ApplyTemplateRequest; result: LanguageRef };
244
274
  "language.get": { params: LanguageAddressParams; result: LanguageHandle };
@@ -355,6 +385,7 @@ export interface RpcMethods {
355
385
  "sfu.callAnswerServerOffer": { params: SfuAnswerServerOfferParams; result: boolean };
356
386
  "sfu.callJoin": { params: SfuCallJoinParams; result: CallSessionInfo };
357
387
  "sfu.callLeave": { params: SfuRoomParams; result: boolean };
388
+ "sfu.callRestartIce": { params: SfuRoomParams; result: boolean };
358
389
  "sfu.callSetQualityPreference": { params: SfuQualityPreferenceParams; result: boolean };
359
390
  "sfu.cascadeStatus": { params: Record<string, never>; result: SfuCascadeStatus };
360
391
  "sfu.ensureMembership": { params: SfuEnsureMembershipParams; result: boolean };
@@ -409,6 +440,12 @@ export const READ_METHODS: ReadonlySet<RpcMethod> = new Set<RpcMethod>([
409
440
  "hosting.info",
410
441
  "hosting.wallet",
411
442
  "hosting.walletHistory",
443
+ "identity.devices",
444
+ "identity.joinStatus",
445
+ "identity.log",
446
+ "identity.offers",
447
+ "identity.resolve",
448
+ "identity.status",
412
449
  "language.all",
413
450
  "language.get",
414
451
  "language.meta",
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The log position of the key that signed.
5
+ */
6
+ export type SignedBy = { keyId: string, kelSeq: number, kelHash: string, };
@@ -0,0 +1,10 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The store's signature over a log's head (`coasys:head`).
5
+ */
6
+ export type SignedHead = { scid: string, seq: number, hash: string, time: number,
7
+ /**
8
+ * The store's `did:key`.
9
+ */
10
+ store: string, sig: string, };
@@ -0,0 +1,8 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Offer } from "./Offer";
3
+ import type { SignedBy } from "./SignedBy";
4
+
5
+ /**
6
+ * An offer signed by the identity's current master key (`coasys:offer`).
7
+ */
8
+ export type SignedOffer = { offer: Offer, by: SignedBy, sig: string, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RequestBody } from "./RequestBody";
3
+
4
+ /**
5
+ * A request signed by a key of the identity (`X-Coasys-Request`).
6
+ */
7
+ export type SignedRequest = { req: RequestBody, sig: string, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * A source of a resolution the resolver did not read from.
5
+ */
6
+ export type SkippedSource = { src: string, reason: string, };
@@ -0,0 +1,14 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The configured store answering a log behind this executor's cache (`identity.status`).
5
+ */
6
+ export type StoreBehind = {
7
+ /**
8
+ * When the executor first saw it behind (unix seconds; in this run of the executor).
9
+ */
10
+ since: number,
11
+ /**
12
+ * The seq of the store's head at its last answer; `null` when it answered no log.
13
+ */
14
+ seq: number | null, };
@@ -0,0 +1,16 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The identity store an executor uses (`identity.status`).
5
+ */
6
+ export type StoreInfo = {
7
+ /**
8
+ * The store's base URL, as the agent language reaches it.
9
+ */
10
+ url: string,
11
+ /**
12
+ * Whether the executor trusts a key for the store (`identity.storeKeys`, or the seed's
13
+ * keys). Without one it accepts no head from it, so no `did:scid` record verifies, and
14
+ * `identity.publish` and `identity.claimOffer` refuse `no-store-keys`.
15
+ */
16
+ trusted: boolean, };
@@ -60,6 +60,45 @@ export type { UpdateLinkRequest } from "./UpdateLinkRequest";
60
60
  export type { UpdatePerspectiveRequest } from "./UpdatePerspectiveRequest";
61
61
  export type { VerifySignatureRequest } from "./VerifySignatureRequest";
62
62
  export type { WriteSettingsRequest } from "./WriteSettingsRequest";
63
+ // The identity calls (identity.*) and agent.get's answer.
64
+ export type { AgentWithIdentity } from "./AgentWithIdentity";
65
+ export type { BotView } from "./BotView";
66
+ export type { ClaimOfferParams } from "./ClaimOfferParams";
67
+ export type { ClaimOfferResult } from "./ClaimOfferResult";
68
+ export type { ClaimView } from "./ClaimView";
69
+ export type { CosignInceptParams } from "./CosignInceptParams";
70
+ export type { DeviceView } from "./DeviceView";
71
+ export type { DidBotScope } from "./DidBotScope";
72
+ export type { DidDocument } from "./DidDocument";
73
+ export type { DidDocumentMetadata } from "./DidDocumentMetadata";
74
+ export type { DidResolutionMetadata } from "./DidResolutionMetadata";
75
+ export type { DidResolutionResult } from "./DidResolutionResult";
76
+ export type { DidVerificationMethod } from "./DidVerificationMethod";
77
+ export type { ForkRecord } from "./ForkRecord";
78
+ export type { IdentityForkEvent } from "./IdentityForkEvent";
79
+ export type { IdentityLog } from "./IdentityLog";
80
+ export type { IdentityStatus } from "./IdentityStatus";
81
+ export type { JoinStatus } from "./JoinStatus";
82
+ export type { JoinStatusParams } from "./JoinStatusParams";
83
+ export type { LogParams } from "./LogParams";
84
+ export type { Offer } from "./Offer";
85
+ export type { OfferKind } from "./OfferKind";
86
+ export type { OfferListing } from "./OfferListing";
87
+ export type { OfferOpened } from "./OfferOpened";
88
+ export type { OfferState } from "./OfferState";
89
+ export type { OffersParams } from "./OffersParams";
90
+ export type { OpenOfferParams } from "./OpenOfferParams";
91
+ export type { PublishParams } from "./PublishParams";
92
+ export type { RequestBody } from "./RequestBody";
93
+ export type { ResetLogParams } from "./ResetLogParams";
94
+ export type { ResolveParams } from "./ResolveParams";
95
+ export type { SignedBy } from "./SignedBy";
96
+ export type { SignedHead } from "./SignedHead";
97
+ export type { SignedOffer } from "./SignedOffer";
98
+ export type { SignedRequest } from "./SignedRequest";
99
+ export type { SkippedSource } from "./SkippedSource";
100
+ export type { StoreBehind } from "./StoreBehind";
101
+ export type { StoreInfo } from "./StoreInfo";
63
102
  export { READ_METHODS, LONG_METHODS } from "./RpcMethods";
64
103
  export type { RpcMethods, RpcMethod } from "./RpcMethods";
65
104
  export { SCOPED_EVENTS } from "./Events";