@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,51 @@
1
+ import type { ForkRecord } from "./ForkRecord";
2
+ import type { SkippedSource } from "./SkippedSource";
3
+ /**
4
+ * DID resolution metadata, with the executor's `coasys:` members.
5
+ */
6
+ export type DidResolutionMetadata = {
7
+ /**
8
+ * `application/did+ld+json` on success.
9
+ */
10
+ contentType?: string;
11
+ /**
12
+ * The DID Core error: `invalidDid`, `invalidDidUrl`, `methodNotSupported`, `notFound`,
13
+ * `representationNotSupported`, `internalError`.
14
+ */
15
+ error?: string;
16
+ /**
17
+ * Why, in words, with an error.
18
+ */
19
+ "coasys:message"?: string;
20
+ /**
21
+ * The host that answered the log (`host[:port][/path]`), or `cache`.
22
+ */
23
+ "coasys:source"?: string;
24
+ /**
25
+ * The log's head is one the cache accepted signed by a key of `identity.storeKeys`.
26
+ */
27
+ "coasys:headTrusted"?: boolean;
28
+ /**
29
+ * The first fork the cache recorded for the log; the document is from the log it held
30
+ * first.
31
+ */
32
+ "coasys:fork"?: ForkRecord;
33
+ /**
34
+ * For a `did:key`: the key's id in its person's log (`d2`).
35
+ */
36
+ "coasys:keyId"?: string;
37
+ /**
38
+ * For a `did:key`: the key is valid at the head (a revoked key still resolves to its
39
+ * person, with `false`).
40
+ */
41
+ "coasys:keyValid"?: boolean;
42
+ /**
43
+ * For a `did:key`: the key index named an identity whose log does not list the key.
44
+ */
45
+ "coasys:keyIndexMismatch"?: boolean;
46
+ /**
47
+ * Sources the resolver did not use, with why (refused address, unsupported scheme, a
48
+ * failed fetch).
49
+ */
50
+ "coasys:skipped"?: Array<SkippedSource>;
51
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { DidDocument } from "./DidDocument";
2
+ import type { DidDocumentMetadata } from "./DidDocumentMetadata";
3
+ import type { DidResolutionMetadata } from "./DidResolutionMetadata";
4
+ import type { DidVerificationMethod } from "./DidVerificationMethod";
5
+ /**
6
+ * `identity.resolve`: a W3C DID Core resolution result. `didDocument` is the JSON-LD the
7
+ * identity core writes (`ad4m_identity_core::did_document`); with a fragment (`#d1`) it is
8
+ * `null` and `verificationMethod` holds that one method, its `id` made absolute
9
+ * (`<did>#d1`). On an error both are `null` and `didResolutionMetadata.error` names it.
10
+ */
11
+ export type DidResolutionResult = {
12
+ didDocument: DidDocument | null;
13
+ didDocumentMetadata: DidDocumentMetadata;
14
+ didResolutionMetadata: DidResolutionMetadata;
15
+ verificationMethod?: DidVerificationMethod;
16
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { DidBotScope } from "./DidBotScope";
2
+ /**
3
+ * A verification method of a [`DidDocument`].
4
+ */
5
+ export type DidVerificationMethod = {
6
+ /**
7
+ * `#d1` in a document; `<did>#d1` when dereferenced alone.
8
+ */
9
+ id: string;
10
+ type: string;
11
+ controller: string;
12
+ publicKeyMultibase: string;
13
+ /**
14
+ * A bot key's scope at the document's seq.
15
+ */
16
+ "coasys:bot"?: DidBotScope;
17
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -7,6 +7,7 @@ import type { AutoProcessorNeighbourhoodState } from "./AutoProcessorNeighbourho
7
7
  import type { ExceptionOccurredEvent } from "./ExceptionOccurredEvent";
8
8
  import type { FlowStateChangedEvent } from "./FlowStateChangedEvent";
9
9
  import type { HostingUserInfo } from "./HostingUserInfo";
10
+ import type { IdentityForkEvent } from "./IdentityForkEvent";
10
11
  import type { NeighbourhoodSignalFilter } from "./NeighbourhoodSignalFilter";
11
12
  import type { NotificationTriggeredEvent } from "./NotificationTriggeredEvent";
12
13
  import type { PerspectiveEvent } from "./PerspectiveEvent";
@@ -46,6 +47,7 @@ export interface EventMap {
46
47
  "sfu-data": SfuDataMessage;
47
48
  "sfu-room-roster": SfuRoomRoster;
48
49
  "flow-state-changed": FlowStateChangedEvent;
50
+ "identity-fork": IdentityForkEvent;
49
51
  }
50
52
  export type EventName = keyof EventMap;
51
53
  /** Events about one perspective: they carry `perspectiveUuid`. */
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Two different events at one seq of a log, as the cache recorded them: `ours` the hash of the
3
+ * cached event at `seq`, `theirs` the hash of the other one, which holds on the log before
4
+ * `seq`. A store that answers a shorter log records none (it is behind, or an unverified
5
+ * conflict).
6
+ */
7
+ export type ForkRecord = {
8
+ seq: number;
9
+ ours: string;
10
+ theirs: string;
11
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * `identity-fork`: the cache found two different valid events at one seq of a log. It kept its
3
+ * history and appended nothing. A store that answers a shorter log raises none.
4
+ */
5
+ export type IdentityForkEvent = {
6
+ did: string;
7
+ seq: number;
8
+ ours: string;
9
+ theirs: string;
10
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { ForkRecord } from "./ForkRecord";
2
+ import type { SignedHead } from "./SignedHead";
3
+ import type { JsonValue } from "./serde_json/JsonValue";
4
+ /**
5
+ * `identity.log`: a log as the cache holds it. Every event passed `fold` here.
6
+ */
7
+ export type IdentityLog = {
8
+ did: string;
9
+ /**
10
+ * The events from `from` on, in seq order, as JSON.
11
+ */
12
+ events: Array<JsonValue>;
13
+ /**
14
+ * The last head of the log the cache accepted from the agent language.
15
+ */
16
+ head: SignedHead | null;
17
+ fork: ForkRecord | null;
18
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,48 @@
1
+ import type { ForkRecord } from "./ForkRecord";
2
+ import type { SignedHead } from "./SignedHead";
3
+ import type { StoreBehind } from "./StoreBehind";
4
+ import type { StoreInfo } from "./StoreInfo";
5
+ /**
6
+ * `identity.status`: what this agent's device key speaks for.
7
+ */
8
+ export type IdentityStatus = {
9
+ /**
10
+ * The `did:scid` this agent speaks for, or `null` (a device-only identity).
11
+ */
12
+ did: string | null;
13
+ /**
14
+ * The agent's device key, a multikey (`z6Mk…`): its `did:key` without the prefix.
15
+ */
16
+ deviceKey: string;
17
+ /**
18
+ * The X25519 key `did_key` derives from the device key (`z6LS…`), the `enc` an `incept`
19
+ * or `add` lists for it.
20
+ */
21
+ deviceEnc: string;
22
+ /**
23
+ * The device key's id in the log (`d1`), once the log lists it.
24
+ */
25
+ keyId: string | null;
26
+ /**
27
+ * The seq of the event that revoked the device key, if one did.
28
+ */
29
+ revoked: number | null;
30
+ /**
31
+ * The last head of the log the cache accepted.
32
+ */
33
+ head: SignedHead | null;
34
+ /**
35
+ * The first fork the cache recorded for the log.
36
+ */
37
+ fork: ForkRecord | null;
38
+ /**
39
+ * Set while the configured store answers the log behind the cache (a store restored from
40
+ * a backup, or not caught up): the cached log answers meanwhile. `null` once it catches up.
41
+ */
42
+ storeBehind: StoreBehind | null;
43
+ /**
44
+ * The identity store this executor uses (the config's, else its network seed's), and
45
+ * whether it trusts a key for it; `null` when it has none (a network without a store).
46
+ */
47
+ store: StoreInfo | null;
48
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * `identity.joinStatus`: the offer's state for this executor's key. On `spent` the log lists
3
+ * the key and the agent speaks for `did`.
4
+ */
5
+ export type JoinStatus = {
6
+ state: string;
7
+ did: string | null;
8
+ keyId: string | null;
9
+ seq: number | null;
10
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `identity.joinStatus` params.
3
+ */
4
+ export type JoinStatusParams = {
5
+ offerId: string;
6
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `identity.log` params.
3
+ */
4
+ export type LogParams = {
5
+ /**
6
+ * A `did:scid:coasys:1:…`.
7
+ */
8
+ did: string;
9
+ /**
10
+ * The first seq to return (default 0).
11
+ */
12
+ from?: number;
13
+ /**
14
+ * Refresh from the agent language before answering.
15
+ */
16
+ fresh?: boolean;
17
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { OfferKind } from "./OfferKind";
2
+ import type { JsonValue } from "./serde_json/JsonValue";
3
+ /**
4
+ * An offer. Absent fields are left out: the signature covers the JCS form.
5
+ */
6
+ export type Offer = {
7
+ scid: string;
8
+ offerId: string;
9
+ kind: OfferKind;
10
+ commit: string;
11
+ expires: number;
12
+ deviceKey?: string;
13
+ bot?: JsonValue;
14
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * What an offer is for: `node` is an executor.
3
+ */
4
+ export type OfferKind = "device" | "node" | "bot";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { OfferState } from "./OfferState";
2
+ import type { SignedOffer } from "./SignedOffer";
3
+ /**
4
+ * One open or claimed offer of the identity.
5
+ */
6
+ export type OfferListing = {
7
+ offer: SignedOffer;
8
+ state: OfferState;
9
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `identity.openOffer`.
3
+ */
4
+ export type OfferOpened = {
5
+ offerId: string;
6
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { ClaimView } from "./ClaimView";
2
+ /**
3
+ * An offer's state.
4
+ */
5
+ export type OfferState = {
6
+ "state": "open";
7
+ } | {
8
+ "state": "claimed";
9
+ claim: ClaimView;
10
+ } | {
11
+ "state": "spent";
12
+ seq: number;
13
+ } | {
14
+ "state": "expired";
15
+ } | {
16
+ "state": "cancelled";
17
+ } | {
18
+ "state": "contested";
19
+ } | {
20
+ "state": "superseded";
21
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { SignedRequest } from "./SignedRequest";
2
+ /**
3
+ * `identity.offers` params: a list request signed by the current master key.
4
+ */
5
+ export type OffersParams = {
6
+ request: SignedRequest;
7
+ /**
8
+ * Seconds to wait for a change (0–8).
9
+ */
10
+ wait?: number;
11
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { SignedOffer } from "./SignedOffer";
2
+ /**
3
+ * `identity.openOffer` params.
4
+ */
5
+ export type OpenOfferParams = {
6
+ signedOffer: SignedOffer;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { JsonValue } from "./serde_json/JsonValue";
2
+ /**
3
+ * `identity.publish` params. No vouching token or proof of work: the store has no brake yet
4
+ * and admits a new log without one.
5
+ */
6
+ export type PublishParams = {
7
+ /**
8
+ * Signed events that continue the log's head (or start a log), as JSON.
9
+ */
10
+ events: Array<JsonValue>;
11
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ export type RequestBody = {
2
+ did: string;
3
+ /**
4
+ * The `did:key` of the store the request is for; another store refuses it.
5
+ */
6
+ store: string;
7
+ keyId: string;
8
+ kelSeq: number;
9
+ kelHash: string;
10
+ method: string;
11
+ path: string;
12
+ bodyHash: string;
13
+ nonce: string;
14
+ expires: number;
15
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * `identity.resetLog` params.
3
+ */
4
+ export type ResetLogParams = {
5
+ /**
6
+ * The `did:scid:coasys:1:…` whose cached log, accepted head and forks this executor drops.
7
+ */
8
+ did: string;
9
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * `identity.resolve` params.
3
+ */
4
+ export type ResolveParams = {
5
+ /**
6
+ * A `did:scid:coasys:1:<scid>` DID URL (`?src=`, `?versionId=`, `#d1`), or a bare device
7
+ * `did:key:z6Mk…`.
8
+ */
9
+ didUrl: string;
10
+ /**
11
+ * Read the log from its sources even when the cache holds it.
12
+ */
13
+ fresh?: boolean;
14
+ /**
15
+ * The representation asked for; only `application/did+ld+json` (the default).
16
+ */
17
+ accept?: string;
18
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -9,6 +9,7 @@ import type { AgentReply } from "./AgentReply";
9
9
  import type { AgentRevokeTokenParams } from "./AgentRevokeTokenParams";
10
10
  import type { AgentSignature } from "./AgentSignature";
11
11
  import type { AgentStatus } from "./AgentStatus";
12
+ import type { AgentWithIdentity } from "./AgentWithIdentity";
12
13
  import type { AgentsByDidsRequest } from "./AgentsByDidsRequest";
13
14
  import type { AiAddModelParams } from "./AiAddModelParams";
14
15
  import type { AiAddTaskParams } from "./AiAddTaskParams";
@@ -24,12 +25,17 @@ import type { AiUpdateTaskParams } from "./AiUpdateTaskParams";
24
25
  import type { ApplyTemplateRequest } from "./ApplyTemplateRequest";
25
26
  import type { Apps } from "./Apps";
26
27
  import type { CallSessionInfo } from "./CallSessionInfo";
28
+ import type { ClaimOfferParams } from "./ClaimOfferParams";
29
+ import type { ClaimOfferResult } from "./ClaimOfferResult";
27
30
  import type { ComputeLogEntry } from "./ComputeLogEntry";
31
+ import type { CosignInceptParams } from "./CosignInceptParams";
28
32
  import type { CreateExpressionRequest } from "./CreateExpressionRequest";
29
33
  import type { CreatePerspectiveRequest } from "./CreatePerspectiveRequest";
30
34
  import type { CreateUserRequest } from "./CreateUserRequest";
31
35
  import type { DecoratedLinkExpression } from "./DecoratedLinkExpression";
32
36
  import type { DecoratedPerspective } from "./DecoratedPerspective";
37
+ import type { DeviceView } from "./DeviceView";
38
+ import type { DidResolutionResult } from "./DidResolutionResult";
33
39
  import type { EmbedRequest } from "./EmbedRequest";
34
40
  import type { EntanglementProof } from "./EntanglementProof";
35
41
  import type { EntanglementProofPreflightRequest } from "./EntanglementProofPreflightRequest";
@@ -49,10 +55,14 @@ import type { HostRate } from "./HostRate";
49
55
  import type { HostingInfoResult } from "./HostingInfoResult";
50
56
  import type { HostingRequestPaymentResult } from "./HostingRequestPaymentResult";
51
57
  import type { HostingWalletResult } from "./HostingWalletResult";
58
+ import type { IdentityLog } from "./IdentityLog";
59
+ import type { IdentityStatus } from "./IdentityStatus";
52
60
  import type { ImportAgentRequest } from "./ImportAgentRequest";
53
61
  import type { ImportRequest } from "./ImportRequest";
54
62
  import type { InteractionMeta } from "./InteractionMeta";
55
63
  import type { JoinNeighbourhoodRequest } from "./JoinNeighbourhoodRequest";
64
+ import type { JoinStatus } from "./JoinStatus";
65
+ import type { JoinStatusParams } from "./JoinStatusParams";
56
66
  import type { JsonValue } from "./serde_json/JsonValue";
57
67
  import type { LanguageAddressParams } from "./LanguageAddressParams";
58
68
  import type { LanguageHandle } from "./LanguageHandle";
@@ -62,6 +72,7 @@ import type { LanguageRef } from "./LanguageRef";
62
72
  import type { LanguageWriteSettingsParams } from "./LanguageWriteSettingsParams";
63
73
  import type { LinkLanguageTemplatesRequest } from "./LinkLanguageTemplatesRequest";
64
74
  import type { LockAgentRequest } from "./LockAgentRequest";
75
+ import type { LogParams } from "./LogParams";
65
76
  import type { Model } from "./Model";
66
77
  import type { NeighbourhoodBroadcastParams } from "./NeighbourhoodBroadcastParams";
67
78
  import type { NeighbourhoodOnlineStatusParams } from "./NeighbourhoodOnlineStatusParams";
@@ -69,8 +80,12 @@ import type { NeighbourhoodSignalParams } from "./NeighbourhoodSignalParams";
69
80
  import type { NeighbourhoodUuidParams } from "./NeighbourhoodUuidParams";
70
81
  import type { Notification } from "./Notification";
71
82
  import type { NotificationInput } from "./NotificationInput";
83
+ import type { OfferListing } from "./OfferListing";
84
+ import type { OfferOpened } from "./OfferOpened";
85
+ import type { OffersParams } from "./OffersParams";
72
86
  import type { OnlineAgent } from "./OnlineAgent";
73
87
  import type { OpenLinkRequest } from "./OpenLinkRequest";
88
+ import type { OpenOfferParams } from "./OpenOfferParams";
74
89
  import type { OverlayView } from "./OverlayView";
75
90
  import type { PermitCapabilityRequest } from "./PermitCapabilityRequest";
76
91
  import type { PerspectiveAddAutoProcessorParams } from "./PerspectiveAddAutoProcessorParams";
@@ -124,8 +139,11 @@ import type { PromptRequest } from "./PromptRequest";
124
139
  import type { ProposeOutcome } from "./ProposeOutcome";
125
140
  import type { PublishLanguageRequest } from "./PublishLanguageRequest";
126
141
  import type { PublishNeighbourhoodRequest } from "./PublishNeighbourhoodRequest";
142
+ import type { PublishParams } from "./PublishParams";
127
143
  import type { RequestCapabilityRequest } from "./RequestCapabilityRequest";
128
144
  import type { RequestPaymentRequest } from "./RequestPaymentRequest";
145
+ import type { ResetLogParams } from "./ResetLogParams";
146
+ import type { ResolveParams } from "./ResolveParams";
129
147
  import type { RunAgentRequest } from "./RunAgentRequest";
130
148
  import type { RunInterpretationRequest } from "./RunInterpretationRequest";
131
149
  import type { RunInterpretationWithHarnessRequest } from "./RunInterpretationWithHarnessRequest";
@@ -163,6 +181,7 @@ import type { SfuSendDataParams } from "./SfuSendDataParams";
163
181
  import type { SfuSetConfigParams } from "./SfuSetConfigParams";
164
182
  import type { SfuStatus } from "./SfuStatus";
165
183
  import type { SignMessageRequest } from "./SignMessageRequest";
184
+ import type { SignedHead } from "./SignedHead";
166
185
  import type { TrustedAgentsWrapper } from "./TrustedAgentsWrapper";
167
186
  import type { UnlockAgentRequest } from "./UnlockAgentRequest";
168
187
  import type { UnytVersionInfo } from "./UnytVersionInfo";
@@ -220,7 +239,7 @@ export interface RpcMethods {
220
239
  };
221
240
  "agent.get": {
222
241
  params: Record<string, never>;
223
- result: Agent;
242
+ result: AgentWithIdentity;
224
243
  };
225
244
  "agent.getApps": {
226
245
  params: Record<string, never>;
@@ -394,6 +413,50 @@ export interface RpcMethods {
394
413
  params: Record<string, never>;
395
414
  result: JsonValue;
396
415
  };
416
+ "identity.claimOffer": {
417
+ params: ClaimOfferParams;
418
+ result: ClaimOfferResult;
419
+ };
420
+ "identity.cosignIncept": {
421
+ params: CosignInceptParams;
422
+ result: JsonValue;
423
+ };
424
+ "identity.devices": {
425
+ params: Record<string, never>;
426
+ result: Array<DeviceView>;
427
+ };
428
+ "identity.joinStatus": {
429
+ params: JoinStatusParams;
430
+ result: JoinStatus;
431
+ };
432
+ "identity.log": {
433
+ params: LogParams;
434
+ result: IdentityLog;
435
+ };
436
+ "identity.offers": {
437
+ params: OffersParams;
438
+ result: Array<OfferListing>;
439
+ };
440
+ "identity.openOffer": {
441
+ params: OpenOfferParams;
442
+ result: OfferOpened;
443
+ };
444
+ "identity.publish": {
445
+ params: PublishParams;
446
+ result: SignedHead;
447
+ };
448
+ "identity.resetLog": {
449
+ params: ResetLogParams;
450
+ result: boolean;
451
+ };
452
+ "identity.resolve": {
453
+ params: ResolveParams;
454
+ result: DidResolutionResult;
455
+ };
456
+ "identity.status": {
457
+ params: Record<string, never>;
458
+ result: IdentityStatus;
459
+ };
397
460
  "language.all": {
398
461
  params: LanguageListParams;
399
462
  result: Array<LanguageHandle>;
@@ -860,6 +923,10 @@ export interface RpcMethods {
860
923
  params: SfuRoomParams;
861
924
  result: boolean;
862
925
  };
926
+ "sfu.callRestartIce": {
927
+ params: SfuRoomParams;
928
+ result: boolean;
929
+ };
863
930
  "sfu.callSetQualityPreference": {
864
931
  params: SfuQualityPreferenceParams;
865
932
  result: boolean;
@@ -23,6 +23,12 @@ export const READ_METHODS = new Set([
23
23
  "hosting.info",
24
24
  "hosting.wallet",
25
25
  "hosting.walletHistory",
26
+ "identity.devices",
27
+ "identity.joinStatus",
28
+ "identity.log",
29
+ "identity.offers",
30
+ "identity.resolve",
31
+ "identity.status",
26
32
  "language.all",
27
33
  "language.get",
28
34
  "language.meta",
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The log position of the key that signed.
3
+ */
4
+ export type SignedBy = {
5
+ keyId: string;
6
+ kelSeq: number;
7
+ kelHash: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The store's signature over a log's head (`coasys:head`).
3
+ */
4
+ export type SignedHead = {
5
+ scid: string;
6
+ seq: number;
7
+ hash: string;
8
+ time: number;
9
+ /**
10
+ * The store's `did:key`.
11
+ */
12
+ store: string;
13
+ sig: string;
14
+ };