import { PaiFinder } from "https://deno.land/x/willow@0.2.1/src/wgps/pai/pai_finder.ts";
Given ReadAuthorisation
s, emits intersected
Constructors
new
PaiFinder(opts: PaiFinderOpts<ReadCapability, PsiGroup, PsiScalar, NamespaceId, SubspaceId>)Properties
Queue of: a fragment group to bind, and whether it was derived from a secondary fragment.
private
fragmentsInfo: Map<bigint, LocalFragmentInfo<ReadCapability, SubspaceReadCapability, NamespaceId, SubspaceId>>private
intersectionHandlesOurs: HandleStore<Intersection<PsiGroup>>private
intersectionHandlesTheirs: HandleStore<Intersection<PsiGroup>>private
intersectionQueue: FIFO<[NamespaceId, ReadAuthorisation<ReadCapability, SubspaceReadCapability>, bigint]>Queue of: a read capability to bind, and a handle of our own intersection this is related to, and the outer area to encode against.
private
namespaceScheme: NamespaceScheme<NamespaceId>private
paiScheme: PaiScheme<ReadCapability, PsiGroup, PsiScalar, NamespaceId, SubspaceId>Queue of: the fragment group being replied to, and the multiplied result
private
scalar: PsiScalarprivate
subspaceCapReplyQueue: FIFO<[bigint, SubspaceReadCapability]>Queue of: the handle of the intersection being rseponded to, and the subspace cap.
private
subspaceCapRequestQueue: FIFO<bigint>Queue of: the handle of the intersecting handle we would like a subspace cap for.
Methods
private
checkForIntersections(handle: bigint, ours: boolean)private
getHandleOuterArea(handle: bigint): Area<SubspaceId>getIntersectionPrivy(handle: bigint, ours: boolean): ReadCapPrivy<NamespaceId, SubspaceId>
receivedBind(groupMember: PsiGroup, isSecondary: boolean)
receivedReadCapForIntersection(theirIntersectionHandle: bigint)
receivedReply(handle: bigint, groupMember: PsiGroup)
receivedSubspaceCapRequest(handle: bigint)
receivedVerifiedSubspaceCapReply(handle: bigint, namespace: NamespaceId)
submitAuthorisation(authorisation: ReadAuthorisation<ReadCapability, SubspaceReadCapability>)
Submit a ReadAuthorisation for private set intersection.