@perspect3vism/ad4m / Exports

AD4M

The Agent-Centric Distributed Application Meta-ontology or just: *Agent-Centric DApp Meta-ontology*

  • A new meta-ontology for interoperable, decentralized application design
  • A spanning-layer to enable seamless integration between Holochain DNAs, blockchains, linked-data structures/ontologies and centralized back-ends
  • The basis for turning distinct, monolithic and siloed apps into a global, open and interoperable sense-making network

Ok, let's go...

To build an app/UI against Ad4m, you need to make sure that an ad4m-executor is running on the user's machine.

The easiest way to get that is to use ad4m-cli:

npm install -g @perspect3vism/ad4m-cli
ad4m executor run &

Then use Ad4mClient to connect to and work with the running ad4m-executor like this:

npm install --save @perspect3vism/ad4m
npm install --save-exact @apollo/[email protected]
npm install --save graphql-ws
npm install --save ws

In your code:

import { Ad4mClient } from '@perspect3vism/ad4m'
import { ApolloClient, InMemoryCache } from "@apollo/client/core";
import { GraphQLWsLink } from "@apollo/client/link/subscriptions";
import { createClient } from 'graphql-ws';
import Websocket from "ws";

const wsLink = new GraphQLWsLink(createClient({
    url: `ws://localhost:4000/graphql`,
    webSocketImpl: Websocket
}));

const apolloClient = new ApolloClient({
    link: wsLink,
    cache: new InMemoryCache(),
    defaultOptions: {
        watchQuery: {
            fetchPolicy: 'network-only',
            nextFetchPolicy: 'network-only'
        },
    }
});

ad4mClient = new Ad4mClient(apolloClient)

Unlocking / initializing the agent

You can't do much with the Ad4m runtime as long as the agent is not initialized. So first get the agent status to see if we either need to create new DID or unlock an existing keystore.

const { isInitialized, isUnlocked, did } = await ad4mClient.agent.status()

If isInitialized is false (and then did is empty) we need to create or import a DID and keys. generate() will create a new DID with method key and lock the keystore with the given passphrase.

const { did } = await ad4mClient.agent.generate("passphrase")

In following runs of the exectuor, ad4mClient.agent.status() will return a did and isInitialized true, but if isUnlocked is false, we need to unlock the keystore providing the passphrase:

const { isUnlocked, did } = await ad4mClient.agent.unlock("passphrase")

Languages

For creating an expression we need to select a language that we create an expression in:

const languages = await ad4mClient.languages.all()
const noteIpfsAddress = languages.find(l => l.name === 'note-ipfs').address

Creating an Expression

const exprAddress = await ad4mClient.expression.create("A new text note", noteIpfsAddress)

Creating a Perspective and linking that new Expression

const perspectiveHandle = await ad4mClient.perspective.add("A new perspective on apps...")
await ad4mClient.perspective.addLink(
    perspectiveHandle.uuid,
    new Link({
        source: 'root',
        target: exprAddress
    })
)

Publishing that local Perspective by turning it into a Neighbourhood

The back-bone of a Neighbourhood is a LinkLanguage - a Language that enables the sharing and thus synchronizing of links (see LinksAdapter in Language.ts). While there can and should be many different implementations with different trade-offs and features (like membranes etc.), there currently is one fully implemented and Holochain based LinkLanguage with the name Social Context.

It is deployed on the current test network (Language Language v0.0.5) under the address: QmZ1mkoY8nLvpxY3Mizx8UkUiwUzjxJxsqSTPPdH8sHxCQ.

Creating our unique LinkLanguage clone through templating

But we should not just use this publicly known Language as the back-bone for our new Neighbourhood, since we need a unique clone. So what we want is to use this existing Language as a template and create a new copy with the same code but different UUID and/name in order to create a fresh space for our new Neighbourhood.

What parameters can we adjust when using it as template? Let's have a look at the Language's meta information:

const socialContextMeta = await ad4mClient.languages.meta("QmZ1mkoY8nLvpxY3Mizx8UkUiwUzjxJxsqSTPPdH8sHxCQ") 

console.log(socialContextMeta)

Which should yield something like this:

 {
  name: 'social-context',
  address: 'QmZ1mkoY8nLvpxY3Mizx8UkUiwUzjxJxsqSTPPdH8sHxCQ',
  description: 'Holochain based LinkLanguage. First full implementation of a LinkLanguage, for collaborative Neighbourhoods where every agent can add links. No membrane. Basic template for all custom Neighbourhoods in this first iteration of the Perspect3vism test network.',
  author: 'did:key:zQ3shkkuZLvqeFgHdgZgFMUx8VGkgVWsLA83w2oekhZxoCW2n',
  templated: false,
  templateSourceLanguageAddress: null,
  templateAppliedParams: null,
  possibleTemplateParams: [ 'uuid', 'name', 'description' ],
  sourceCodeLink: 'https://github.com/juntofoundation/Social-Context'
}

The field possibleTemplateParams tells us that we can set a UUID and override name and description. Let's leave description but change the name. The function languages.applyTemplateAndPublish() takes an object as JSON as second parameter like so:

const uniqueLinkLanguage = await ad4mClient.languages.applyTemplateAndPublish("QmZ1mkoY8nLvpxY3Mizx8UkUiwUzjxJxsqSTPPdH8sHxCQ", JSON.stringify({"uuid": "84a329-77384c-1510fb", "name": "Social Context clone for demo Neighbourhood"}));

And then use this new LinkLanguage in our Neighbourhood:

const meta = new Perspective()
const neighbourhoodUrl = await ad4mClient.neighbourhood.publishFromPerspective(
    perspectiveHandle.uuid,
    uniqueLinkLanguage.address,
    meta
)
console.log(neighbourhoodUrl) // => neighbourhood://Qm123456789abcdef

Joining a Neighbourhood (on another node/agent)

Assume everything above happened on Alice's agent. Alice now shares the Neighbourhood's URL with Bob. This is what Bob does to join the Neigbourhood, access it as a (local) Perspective and retrieve the Expression Alice created and linked there:

const joinedNeighbourhood = await ad4mClient.neighbourhood.joinFromUrl(neighbourhoodUrl)
const links = await ad4mClient.perspective.queryLinks(joinedNeighbourhood.uuid, new LinkQuery({source: 'a'}))
links.forEach(async link => {
    const address = link.data.target
    const expression = await ad4mClient.expression.get(address)
    const data = JSON.parse(expression.data)
    console.log(data) //=> "A new text note"
})

Building from source

Run:

npm i && npm run build

Wait, what?!

The central claim of AD4M is that any single- but also specifically multi-user application can be bootstrapped out of a meta-ontology consisting of 3 quintessential ontological units:

  • Agents
  • Languages
  • and Perspectives

This is a meta-ontology since it doesn't make any assumptions about the specific ontologies implemented in those bootstrapped apps. But since apps bootstrapped from it share the same meta-ontology, they are mutualy interoperable.

Agents...

...represent humans with their devices, which is what the internet actually is. Technically represented as Decentralized Identifiers - DIDs.

Languages...

...encapsulate the actual technology used to communicate, like Holochain or IPFS, but what they provide to the high-level layers is this: Languages define Expressions, which are the atoms of what Agents communicate. Expressions are always created, and thus signed, by an agent. Expressions are referenced via a URL of the kind <language>://<language specific expression address>. That URL and the Expression itself is the only objective part in AD4M.

Perspectives...

...belong to a specific agent. They represent context and association between expressions. They consist of a list of RDF/semantic web like triplets (subject-predicate-object) called links because all three items are just URLs pointing to expressions. Perspectives are like Solid's pods, but they are agent-centric. There is no such thing as a Perspective that does not belong to an agent. It is like the canvas on which an agent perceives and onto which they create anything. To the next layer above (either the very general UI built in Perspectivism - or any other special purpose UI), they are like a database scope.


Bootstrapping

Any AD4M implementation will have to include at least 3 reflexive system Languages to enable the dynamic bootstrapping of apps and interconnected sense-making networks:

  • A Language of Agents, i.e. where the expressions represent agents, and which uses DIDs as the expression URLs.
  • A Language of Languages, i.e. a way to talk about Languages so Languages can be created by users and shared.
  • A Language of Perspectives which implies the concept of Shared Perspectives a.k.a. Neighbourhoods, i.e. a way to share an otherwise local and private Perspective with others which constitutes the basic building block of any collaboration context.

Having these Languages means Agents can author expressions that represent Agents, Languages and Perspectives. These expressions get linked from inside Perspectives. That way we can model primitives like friends-lists (Perspective including agent expressions), app-stores (Perspective including Languages) and more.

How do I build an app on/with AD4M?

Building an AD4M app actually means extending the AD4M ecosystem with the

  • Languages
  • and link-ontologies

needed for the app's domain - and then creating expressions from those Languages and linking them inside Perspectives.

The latter means creating RDF/semantic web style triplets that associate expressions in order to represent app specific semantics - not too different to how Solid style linked-data would work.

Classes

@perspect3vism/ad4m / Exports / Ad4mClient / Ad4mClient

Class: Ad4mClient

Ad4mClient.Ad4mClient

Client for the Ad4m interface wrapping GraphQL queryies for convenient use in user facing code.

Aggregates the six sub-clients: AgentClient, ExpressionClient, LanguageClient, NeighbourhoodClient, PerspectiveClient and RuntimeClient for the respective functionality.

Table of contents

Constructors

Properties

Accessors

Constructors

constructor

new Ad4mClient(client, subscribe?)

Parameters
Name Type Default value
client ApolloClient<any> undefined
subscribe boolean true
Defined in

Ad4mClient.ts:28

Properties

#agentClient

Private #agentClient: AgentClient

Defined in

Ad4mClient.ts:20


#apolloClient

Private #apolloClient: ApolloClient<any>

Defined in

Ad4mClient.ts:19


#expressionClient

Private #expressionClient: ExpressionClient

Defined in

Ad4mClient.ts:21


#languageClient

Private #languageClient: LanguageClient

Defined in

Ad4mClient.ts:22


#neighbourhoodClient

Private #neighbourhoodClient: NeighbourhoodClient

Defined in

Ad4mClient.ts:23


#perspectiveClient

Private #perspectiveClient: PerspectiveClient

Defined in

Ad4mClient.ts:24


#runtimeClient

Private #runtimeClient: RuntimeClient

Defined in

Ad4mClient.ts:25

Accessors

agent

get agent(): AgentClient

Returns

AgentClient

Defined in

Ad4mClient.ts:40


expression

get expression(): ExpressionClient

Returns

ExpressionClient

Defined in

Ad4mClient.ts:44


languages

get languages(): LanguageClient

Returns

LanguageClient

Defined in

Ad4mClient.ts:48


neighbourhood

get neighbourhood(): NeighbourhoodClient

Returns

NeighbourhoodClient

Defined in

Ad4mClient.ts:52


perspective

get perspective(): PerspectiveClient

Returns

PerspectiveClient

Defined in

Ad4mClient.ts:56


runtime

get runtime(): RuntimeClient

Returns

RuntimeClient

Defined in

Ad4mClient.ts:60

@perspect3vism/ad4m / Exports / Literal / Literal

Class: Literal

Literal.Literal

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Literal()

Properties

#literal

Private Optional #literal: any

Defined in

Literal.ts:10


#url

Private Optional #url: string

Defined in

Literal.ts:11

Methods

get

get(): any

Returns

any

Defined in

Literal.ts:49


toUrl

toUrl(): string

Returns

string

Defined in

Literal.ts:27


from

Static from(literal): Literal

Parameters
Name Type
literal any
Returns

Literal

Defined in

Literal.ts:21


fromUrl

Static fromUrl(url): Literal

Parameters
Name Type
url string
Returns

Literal

Defined in

Literal.ts:13

@perspect3vism/ad4m / Exports / SmartLiteral / SmartLiteral

Class: SmartLiteral

SmartLiteral.SmartLiteral

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new SmartLiteral(perspective, base)

Parameters
Name Type
perspective PerspectiveProxy
base string
Defined in

SmartLiteral.ts:23

Properties

#base

Private #base: string

Defined in

SmartLiteral.ts:21


#perspective

Private #perspective: PerspectiveProxy

Defined in

SmartLiteral.ts:20

Accessors

base

get base(): string

Returns

string

Defined in

SmartLiteral.ts:28

Methods

get

get(): Promise<any>

Returns

Promise<any>

Defined in

SmartLiteral.ts:54


set

set(content): Promise<void>

Parameters
Name Type
content any
Returns

Promise<void>

Defined in

SmartLiteral.ts:67


create

Static create(perspective, literal): Promise<SmartLiteral>

Parameters
Name Type
perspective PerspectiveProxy
literal any
Returns

Promise<SmartLiteral>

Defined in

SmartLiteral.ts:32


getAllSmartLiterals

Static getAllSmartLiterals(perspective): Promise<SmartLiteral[]>

Parameters
Name Type
perspective PerspectiveProxy
Returns

Promise<SmartLiteral[]>

Defined in

SmartLiteral.ts:47


isSmartLiteralBase

Static isSmartLiteralBase(perspective, base): Promise<boolean>

Parameters
Name Type
perspective PerspectiveProxy
base string
Returns

Promise<boolean>

Defined in

SmartLiteral.ts:39

@perspect3vism/ad4m / Exports / agent/Agent / Agent

Class: Agent

agent/Agent.Agent

AD4M's representation of an Agent

AD4M Agents are build around DIDs, which are used to identify and authenticate the Agent. Conceptually, an Agent is regarded as something that can speak and that can listen.

Agents speak by creating Expressions in AD4M Languages which are signed by the Agent's DID key, And they also speak (broadcast) by putting semantic statements into their public "Agent Perspective". They listen (can receive messages) through their "direct message Language".

These three aspects are represented by the three fields of this class.

This class is used as format for the Expressions in the Agent language. Since AD4M treats DID URIs as addresses for the Agent Language, DIDs are resolved to Expressions that are objects of this class. Thus, this is how agents see (other) agents.

Table of contents

Constructors

Properties

Constructors

constructor

new Agent(did, perspective?)

Parameters
Name Type
did string
perspective? Perspective
Defined in

agent/Agent.ts:42

Properties

did

did: string

The DID of the Agent All epxressions authored by them are signed with the keys mentioned in the DID document behind this DID URI.

Defined in

agent/Agent.ts:28


directMessageLanguage

Optional directMessageLanguage: string

Address of the Language by which the Agent will receive DMs

Defined in

agent/Agent.ts:40


perspective

Optional perspective: Perspective

The Perspective that holds the public-facing semantics/statements of the Agent Holds and shares a Perspective that links all information this agent wants to offer as public-facing semantics. This should be used for any kind of user profile information.

Defined in

agent/Agent.ts:36

@perspect3vism/ad4m / Exports / agent/Agent / AgentExpression

Class: AgentExpression

agent/Agent.AgentExpression

Hierarchy

  • any

    AgentExpression

Table of contents

Constructors

Constructors

constructor

new AgentExpression()

Inherited from

ExpressionGeneric(Agent).constructor

@perspect3vism/ad4m / Exports / agent/Agent / AgentSignature

Class: AgentSignature

agent/Agent.AgentSignature

Table of contents

Constructors

Properties

Constructors

constructor

new AgentSignature(signature, publicKey)

Parameters
Name Type
signature string
publicKey string
Defined in

agent/Agent.ts:123

Properties

publicKey

publicKey: string

Defined in

agent/Agent.ts:121


signature

signature: string

Defined in

agent/Agent.ts:118

@perspect3vism/ad4m / Exports / agent/Agent / Apps

Class: Apps

agent/Agent.Apps

Table of contents

Constructors

Properties

Constructors

constructor

new Apps(requestId, auth, token, revoked?)

Parameters
Name Type
requestId string
auth AuthInfo
token string
revoked? boolean
Defined in

agent/Agent.ts:194

Properties

auth

auth: AuthInfo

Defined in

agent/Agent.ts:192


requestId

requestId: string

Defined in

agent/Agent.ts:183


revoked

Optional revoked: boolean

Defined in

agent/Agent.ts:189


token

token: string

Defined in

agent/Agent.ts:186

@perspect3vism/ad4m / Exports / agent/Agent / AuthInfo

Class: AuthInfo

agent/Agent.AuthInfo

Table of contents

Constructors

Properties

Constructors

constructor

new AuthInfo(appName, appDesc, appUrl, capabilities)

Parameters
Name Type
appName string
appDesc string
appUrl string
capabilities Capability[]
Defined in

agent/Agent.ts:172

Properties

appDesc

appDesc: string

Defined in

agent/Agent.ts:164


appName

appName: string

Defined in

agent/Agent.ts:161


appUrl

appUrl: string

Defined in

agent/Agent.ts:167


capabilities

capabilities: Capability[]

Defined in

agent/Agent.ts:170

@perspect3vism/ad4m / Exports / agent/Agent / Capability

Class: Capability

agent/Agent.Capability

Table of contents

Constructors

Properties

Constructors

constructor

new Capability(withF, can)

Parameters
Name Type
withF Resource
can string[]
Defined in

agent/Agent.ts:151

Properties

can

can: string[]

Defined in

agent/Agent.ts:149


with

with: Resource

Defined in

agent/Agent.ts:146

@perspect3vism/ad4m / Exports / agent/Agent / EntanglementProof

Class: EntanglementProof

agent/Agent.EntanglementProof

Table of contents

Constructors

Properties

Constructors

constructor

new EntanglementProof(did, didSigningKeyId, deviceKeyType, deviceKey, deviceKeySignedByDid, didSignedByDeviceKey?)

Parameters
Name Type
did string
didSigningKeyId string
deviceKeyType string
deviceKey string
deviceKeySignedByDid string
didSignedByDeviceKey? string
Defined in

agent/Agent.ts:75

Properties

deviceKey

deviceKey: string

Defined in

agent/Agent.ts:67


deviceKeySignedByDid

deviceKeySignedByDid: string

Defined in

agent/Agent.ts:70


deviceKeyType

deviceKeyType: string

Defined in

agent/Agent.ts:64


did

did: string

Defined in

agent/Agent.ts:58


didSignedByDeviceKey

Optional didSignedByDeviceKey: string

Defined in

agent/Agent.ts:73


didSigningKeyId

didSigningKeyId: string

Defined in

agent/Agent.ts:61

@perspect3vism/ad4m / Exports / agent/Agent / EntanglementProofInput

Class: EntanglementProofInput

agent/Agent.EntanglementProofInput

Table of contents

Constructors

Properties

Constructors

constructor

new EntanglementProofInput(did, didSigningKeyId, deviceKeyType, deviceKey, deviceKeySignedByDid, didSignedByDeviceKey)

Parameters
Name Type
did string
didSigningKeyId string
deviceKeyType string
deviceKey string
deviceKeySignedByDid string
didSignedByDeviceKey string
Defined in

agent/Agent.ts:105

Properties

deviceKey

deviceKey: string

Defined in

agent/Agent.ts:97


deviceKeySignedByDid

deviceKeySignedByDid: string

Defined in

agent/Agent.ts:100


deviceKeyType

deviceKeyType: string

Defined in

agent/Agent.ts:94


did

did: string

Defined in

agent/Agent.ts:88


didSignedByDeviceKey

didSignedByDeviceKey: string

Defined in

agent/Agent.ts:103


didSigningKeyId

didSigningKeyId: string

Defined in

agent/Agent.ts:91

@perspect3vism/ad4m / Exports / agent/Agent / Resource

Class: Resource

agent/Agent.Resource

Table of contents

Constructors

Properties

Constructors

constructor

new Resource(domain, pointers)

Parameters
Name Type
domain string
pointers string[]
Defined in

agent/Agent.ts:137

Properties

domain

domain: string

Defined in

agent/Agent.ts:132


pointers

pointers: string[]

Defined in

agent/Agent.ts:135

@perspect3vism/ad4m / Exports / agent/AgentClient / AgentClient

Class: AgentClient

agent/AgentClient.AgentClient

Provides access to all functions regarding the local agent, such as generating, locking, unlocking, importing the DID keystore, as well as updating the publicly shared Agent expression.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AgentClient(client, subscribe?)

Parameters
Name Type Default value
client ApolloClient<any> undefined
subscribe boolean true
Defined in

agent/AgentClient.ts:84

Properties

#agentStatusChangedCallbacks

Private #agentStatusChangedCallbacks: AgentStatusChangedCallback[]

Defined in

agent/AgentClient.ts:82


#apolloClient

Private #apolloClient: ApolloClient<any>

Defined in

agent/AgentClient.ts:80


#updatedCallbacks

Private #updatedCallbacks: AgentUpdatedCallback[]

Defined in

agent/AgentClient.ts:81

Methods

addAgentStatusChangedListener

addAgentStatusChangedListener(listener): void

Parameters
Name Type
listener any
Returns

void

Defined in

agent/AgentClient.ts:324


addEntanglementProofs

addEntanglementProofs(proofs): Promise<EntanglementProof[]>

Parameters
Name Type
proofs EntanglementProofInput[]
Returns

Promise<EntanglementProof[]>

Defined in

agent/AgentClient.ts:257


addUpdatedListener

addUpdatedListener(listener): void

Parameters
Name Type
listener any
Returns

void

Defined in

agent/AgentClient.ts:304


byDID

byDID(did): Promise<Agent>

Parameters
Name Type
did string
Returns

Promise<Agent>

Defined in

agent/AgentClient.ts:178


deleteEntanglementProofs

deleteEntanglementProofs(proofs): Promise<EntanglementProof[]>

Parameters
Name Type
proofs EntanglementProofInput[]
Returns

Promise<EntanglementProof[]>

Defined in

agent/AgentClient.ts:269


entanglementProofPreFlight

entanglementProofPreFlight(deviceKey, deviceKeyType): Promise<EntanglementProof>

Parameters
Name Type
deviceKey string
deviceKeyType string
Returns

Promise<EntanglementProof>

Defined in

agent/AgentClient.ts:292


generate

generate(passphrase): Promise<AgentStatus>

Parameters
Name Type
passphrase string
Returns

Promise<AgentStatus>

Defined in

agent/AgentClient.ts:121


generateJwt

generateJwt(requestId, rand): Promise<string>

Parameters
Name Type
requestId string
rand string
Returns

Promise<string>

Defined in

agent/AgentClient.ts:364


getApps

getApps(): Promise<Apps[]>

Returns

Promise<Apps[]>

Defined in

agent/AgentClient.ts:374


getEntanglementProofs

getEntanglementProofs(): Promise<string[]>

Returns

Promise<string[]>

Defined in

agent/AgentClient.ts:281


import

import(args): Promise<AgentStatus>

Parameters
Name Type
args InitializeArgs
Returns

Promise<AgentStatus>

Defined in

agent/AgentClient.ts:135


isLocked

isLocked(): Promise<boolean>

Returns

Promise<boolean>

Defined in

agent/AgentClient.ts:410


lock

lock(passphrase): Promise<AgentStatus>

Parameters
Name Type
passphrase string
Returns

Promise<AgentStatus>

Defined in

agent/AgentClient.ts:153


me

me(): Promise<Agent>

Returns the Agent expression of the local agent as it is shared publicly via the AgentLanguage.

I.e. this is the users profile.

Returns

Promise<Agent>

Defined in

agent/AgentClient.ts:101


mutatePublicPerspective

mutatePublicPerspective(mutations): Promise<Agent>

Parameters
Name Type
mutations LinkMutations
Returns

Promise<Agent>

Defined in

agent/AgentClient.ts:213


permitCapability

permitCapability(auth): Promise<string>

Parameters
Name Type
auth string
Returns

Promise<string>

Defined in

agent/AgentClient.ts:354


removeApp

removeApp(requestId): Promise<Apps[]>

Parameters
Name Type
requestId string
Returns

Promise<Apps[]>

Defined in

agent/AgentClient.ts:386


requestCapability

requestCapability(appName, appDesc, appUrl, capabilities): Promise<string>

Parameters
Name Type
appName string
appDesc string
appUrl string
capabilities string
Returns

Promise<string>

Defined in

agent/AgentClient.ts:344


revokeToken

revokeToken(requestId): Promise<Apps[]>

Parameters
Name Type
requestId string
Returns

Promise<Apps[]>

Defined in

agent/AgentClient.ts:398


signMessage

signMessage(message): Promise<string>

Parameters
Name Type
message string
Returns

Promise<string>

Defined in

agent/AgentClient.ts:419


status

status(): Promise<AgentStatus>

Returns

Promise<AgentStatus>

Defined in

agent/AgentClient.ts:110


subscribeAgentStatusChanged

subscribeAgentStatusChanged(): void

Returns

void

Defined in

agent/AgentClient.ts:328


subscribeAgentUpdated

subscribeAgentUpdated(): void

Returns

void

Defined in

agent/AgentClient.ts:308


unlock

unlock(passphrase): Promise<AgentStatus>

Parameters
Name Type
passphrase string
Returns

Promise<AgentStatus>

Defined in

agent/AgentClient.ts:165


updateDirectMessageLanguage

updateDirectMessageLanguage(directMessageLanguage): Promise<Agent>

Parameters
Name Type
directMessageLanguage string
Returns

Promise<Agent>

Defined in

agent/AgentClient.ts:242


updatePublicPerspective

updatePublicPerspective(perspective): Promise<Agent>

Parameters
Name Type
perspective PerspectiveInput
Returns

Promise<Agent>

Defined in

agent/AgentClient.ts:190

@perspect3vism/ad4m / Exports / agent/AgentResolver / default

Class: default

agent/AgentResolver.default

Table of contents

Constructors

Methods

Constructors

constructor

new default()

Methods

agent

agent(): Agent

Returns

Agent

Defined in

agent/AgentResolver.ts:11


agentAddEntanglementProofs

agentAddEntanglementProofs(proofs): EntanglementProof[]

Parameters
Name Type
proofs EntanglementProofInput[]
Returns

EntanglementProof[]

Defined in

agent/AgentResolver.ts:93


agentByDID

agentByDID(did): Agent

Parameters
Name Type
did string
Returns

Agent

Defined in

agent/AgentResolver.ts:62


agentDeleteEntanglementProofs

agentDeleteEntanglementProofs(proofs): EntanglementProof[]

Parameters
Name Type
proofs EntanglementProofInput[]
Returns

EntanglementProof[]

Defined in

agent/AgentResolver.ts:98


agentEntanglementProofPreFlight

agentEntanglementProofPreFlight(deviceKey, deviceKeyType): EntanglementProof

Parameters
Name Type
deviceKey string
deviceKeyType string
Returns

EntanglementProof

Defined in

agent/AgentResolver.ts:108


agentGenerate

agentGenerate(passphrase, pubSub): AgentStatus

Parameters
Name Type
passphrase string
pubSub any
Returns

AgentStatus

Defined in

agent/AgentResolver.ts:21


agentGenerateJwt

agentGenerateJwt(requestId, rand): String

Parameters
Name Type
requestId string
rand string
Returns

String

Defined in

agent/AgentResolver.ts:128


agentGetApps

agentGetApps(): []

Returns

[]

Defined in

agent/AgentResolver.ts:138


agentGetEntanglementProofs

agentGetEntanglementProofs(): EntanglementProof[]

Returns

EntanglementProof[]

Defined in

agent/AgentResolver.ts:103


agentImport

agentImport(did, didDocument, keystore, passphrase): AgentStatus

Parameters
Name Type
did string
didDocument string
keystore string
passphrase string
Returns

AgentStatus

Defined in

agent/AgentResolver.ts:31


agentIsLocked

agentIsLocked(): Boolean

Returns

Boolean

Defined in

agent/AgentResolver.ts:133


agentLock

agentLock(passphrase, pubSub): AgentStatus

Parameters
Name Type
passphrase string
pubSub any
Returns

AgentStatus

Defined in

agent/AgentResolver.ts:41


agentPermitCapability

agentPermitCapability(auth): String

Parameters
Name Type
auth string
Returns

String

Defined in

agent/AgentResolver.ts:123


agentRemoveApp

agentRemoveApp(requestId): []

Parameters
Name Type
requestId string
Returns

[]

Defined in

agent/AgentResolver.ts:143


agentRequestCapability

agentRequestCapability(appName, appDesc, appUrl, capabilities): String

Parameters
Name Type
appName string
appDesc string
appUrl string
capabilities string
Returns

String

Defined in

agent/AgentResolver.ts:113


agentRevokeToken

agentRevokeToken(requestId): any[]

Parameters
Name Type
requestId string
Returns

any[]

Defined in

agent/AgentResolver.ts:148


agentSignMessage

agentSignMessage(message): AgentSignature

Parameters
Name Type
message string
Returns

AgentSignature

Defined in

agent/AgentResolver.ts:176


agentStatus

agentStatus(): AgentStatus

Returns

AgentStatus

Defined in

agent/AgentResolver.ts:16


agentStatusChanged

agentStatusChanged(): AgentStatus

Returns

AgentStatus

Defined in

agent/AgentResolver.ts:88


agentUnlock

agentUnlock(passphrase, pubSub): AgentStatus

Parameters
Name Type
passphrase string
pubSub any
Returns

AgentStatus

Defined in

agent/AgentResolver.ts:51


agentUpdateDirectMessageLanguage

agentUpdateDirectMessageLanguage(directMessageLanguage, pubSub): Agent

Parameters
Name Type
directMessageLanguage string
pubSub any
Returns

Agent

Defined in

agent/AgentResolver.ts:75


agentUpdatePublicPerspective

agentUpdatePublicPerspective(perspective, pubSub): Agent

Parameters
Name Type
perspective PerspectiveInput
pubSub any
Returns

Agent

Defined in

agent/AgentResolver.ts:67


agentUpdated

agentUpdated(): Agent

Returns

Agent

Defined in

agent/AgentResolver.ts:83

@perspect3vism/ad4m / Exports / agent/AgentStatus / AgentStatus

Class: AgentStatus

agent/AgentStatus.AgentStatus

Table of contents

Constructors

Properties

Constructors

constructor

new AgentStatus(obj?)

Parameters
Name Type
obj? object
Defined in

agent/AgentStatus.ts:20

Properties

did

Optional did: string

Defined in

agent/AgentStatus.ts:12


didDocument

Optional didDocument: string

Defined in

agent/AgentStatus.ts:15


error

Optional error: string

Defined in

agent/AgentStatus.ts:18


isInitialized

isInitialized: Boolean

Defined in

agent/AgentStatus.ts:6


isUnlocked

isUnlocked: Boolean

Defined in

agent/AgentStatus.ts:9

@perspect3vism/ad4m / Exports / expression/Expression / Expression

Class: Expression

expression/Expression.Expression

Hierarchy

  • any

    Expression

Table of contents

Constructors

Constructors

constructor

new Expression()

Inherited from

ExpressionGeneric(Object).constructor

@perspect3vism/ad4m / Exports / expression/Expression / ExpressionProof

Class: ExpressionProof

expression/Expression.ExpressionProof

Table of contents

Constructors

Properties

Constructors

constructor

new ExpressionProof(sig, k)

Parameters
Name Type
sig string
k string
Defined in

expression/Expression.ts:20

Properties

invalid

Optional invalid: boolean

Defined in

expression/Expression.ts:18


key

key: string

Defined in

expression/Expression.ts:12


signature

signature: string

Defined in

expression/Expression.ts:9


valid

Optional valid: boolean

Defined in

expression/Expression.ts:15

@perspect3vism/ad4m / Exports / expression/Expression / ExpressionProofInput

Class: ExpressionProofInput

expression/Expression.ExpressionProofInput

Table of contents

Constructors

Properties

Constructors

constructor

new ExpressionProofInput()

Properties

invalid

Optional invalid: boolean

Defined in

expression/Expression.ts:38


key

key: string

Defined in

expression/Expression.ts:32


signature

signature: string

Defined in

expression/Expression.ts:29


valid

Optional valid: boolean

Defined in

expression/Expression.ts:35

@perspect3vism/ad4m / Exports / expression/Expression / ExpressionRendered

Class: ExpressionRendered

expression/Expression.ExpressionRendered

Hierarchy

  • any

    ExpressionRendered

Table of contents

Constructors

Properties

Constructors

constructor

new ExpressionRendered()

Inherited from

ExpressionGeneric(String).constructor

Properties

icon

icon: Icon

Defined in

expression/Expression.ts:94


language

language: LanguageRef

Defined in

expression/Expression.ts:91

@perspect3vism/ad4m / Exports / expression/ExpressionClient / ExpressionClient

Class: ExpressionClient

expression/ExpressionClient.ExpressionClient

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ExpressionClient(client)

Parameters
Name Type
client ApolloClient<any>
Defined in

expression/ExpressionClient.ts:9

Properties

#apolloClient

Private #apolloClient: ApolloClient<any>

Defined in

expression/ExpressionClient.ts:7

Methods

create

create(content, languageAddress): Promise<string>

Parameters
Name Type
content any
languageAddress string
Returns

Promise<string>

Defined in

expression/ExpressionClient.ts:65


get

get(url): Promise<ExpressionRendered>

Parameters
Name Type
url string
Returns

Promise<ExpressionRendered>

Defined in

expression/ExpressionClient.ts:13


getMany

getMany(urls): Promise<ExpressionRendered[]>

Parameters
Name Type
urls string[]
Returns

Promise<ExpressionRendered[]>

Defined in

expression/ExpressionClient.ts:34


getRaw

getRaw(url): Promise<string>

Parameters
Name Type
url string
Returns

Promise<string>

Defined in

expression/ExpressionClient.ts:55


interact

interact(url, interactionCall): Promise<string>

Parameters
Name Type
url string
interactionCall InteractionCall
Returns

Promise<string>

Defined in

expression/ExpressionClient.ts:90


interactions

interactions(url): Promise<InteractionMeta[]>

Parameters
Name Type
url string
Returns

Promise<InteractionMeta[]>

Defined in

expression/ExpressionClient.ts:76

@perspect3vism/ad4m / Exports / expression/ExpressionRef / ExpressionRef

Class: ExpressionRef

expression/ExpressionRef.ExpressionRef

Table of contents

Constructors

Properties

Constructors

constructor

new ExpressionRef(lang, expr)

Parameters
Name Type
lang LanguageRef
expr string
Defined in

expression/ExpressionRef.ts:14

Properties

expression

expression: string

Defined in

expression/ExpressionRef.ts:12


language

language: LanguageRef

Defined in

expression/ExpressionRef.ts:9

@perspect3vism/ad4m / Exports / expression/ExpressionResolver / default

Class: default

expression/ExpressionResolver.default

Table of contents

Constructors

Methods

Constructors

constructor

new default()

Methods

expression

expression(url): ExpressionRendered

Parameters
Name Type
url string
Returns

ExpressionRendered

Defined in

expression/ExpressionResolver.ts:16


expressionCreate

expressionCreate(content, languageAddress): string

Parameters
Name Type
content string
languageAddress string
Returns

string

Defined in

expression/ExpressionResolver.ts:39


expressionInteract

expressionInteract(url, interactionCall): string

Parameters
Name Type
url string
interactionCall InteractionCall
Returns

string

Defined in

expression/ExpressionResolver.ts:57


expressionInteractions

expressionInteractions(url): InteractionMeta[]

Parameters
Name Type
url string
Returns

InteractionMeta[]

Defined in

expression/ExpressionResolver.ts:47


expressionMany

expressionMany(urls): ExpressionRendered[]

Parameters
Name Type
urls string[]
Returns

ExpressionRendered[]

Defined in

expression/ExpressionResolver.ts:25


expressionRaw

expressionRaw(url): string

Parameters
Name Type
url string
Returns

string

Defined in

expression/ExpressionResolver.ts:30

@perspect3vism/ad4m / Exports / language/Icon / Icon

Class: Icon

language/Icon.Icon

Table of contents

Constructors

Properties

Constructors

constructor

new Icon(code)

Parameters
Name Type
code string
Defined in

language/Icon.ts:8

Properties

code

code: string

Defined in

language/Icon.ts:6

@perspect3vism/ad4m / Exports / language/Language / InteractionCall

Class: InteractionCall

language/Language.InteractionCall

Table of contents

Constructors

Properties

Accessors

Constructors

constructor

new InteractionCall(name, parameters)

Parameters
Name Type
name string
parameters object
Defined in

language/Language.ts:239

Properties

name

name: string

Defined in

language/Language.ts:231


parametersStringified

parametersStringified: string

Defined in

language/Language.ts:233

Accessors

parameters

get parameters(): object

Returns

object

Defined in

language/Language.ts:235

@perspect3vism/ad4m / Exports / language/Language / InteractionMeta

Class: InteractionMeta

language/Language.InteractionMeta

Table of contents

Constructors

Properties

Constructors

constructor

new InteractionMeta()

Properties

label

label: string

Defined in

language/Language.ts:213


name

name: string

Defined in

language/Language.ts:216


parameters

parameters: InteractionParameter[]

Defined in

language/Language.ts:219

@perspect3vism/ad4m / Exports / language/Language / InteractionParameter

Class: InteractionParameter

language/Language.InteractionParameter

Table of contents

Constructors

Properties

Constructors

constructor

new InteractionParameter()

Properties

name

name: string

Defined in

language/Language.ts:204


type

type: string

Defined in

language/Language.ts:207

@perspect3vism/ad4m / Exports / language/Language / OnlineAgent

Class: OnlineAgent

language/Language.OnlineAgent

Table of contents

Constructors

Properties

Constructors

constructor

new OnlineAgent()

Properties

did

did: string

Defined in

language/Language.ts:248


status

status: PerspectiveExpression

Defined in

language/Language.ts:250

@perspect3vism/ad4m / Exports / language/LanguageClient / LanguageClient

Class: LanguageClient

language/LanguageClient.LanguageClient

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new LanguageClient(apolloClient)

Parameters
Name Type
apolloClient ApolloClient<any>
Defined in

language/LanguageClient.ts:31

Properties

#apolloClient

Private #apolloClient: ApolloClient<any>

Defined in

language/LanguageClient.ts:29

Methods

all

all(): Promise<LanguageHandle[]>

Returns

Promise<LanguageHandle[]>

Defined in

language/LanguageClient.ts:59


applyTemplateAndPublish

applyTemplateAndPublish(sourceLanguageHash, templateData): Promise<LanguageRef>

Parameters
Name Type
sourceLanguageHash string
templateData string
Returns

Promise<LanguageRef>

Defined in

language/LanguageClient.ts:76


byAddress

byAddress(address): Promise<LanguageHandle>

Parameters
Name Type
address string
Returns

Promise<LanguageHandle>

Defined in

language/LanguageClient.ts:35


byFilter

byFilter(filter): Promise<LanguageHandle[]>

Parameters
Name Type
filter string
Returns

Promise<LanguageHandle[]>

Defined in

language/LanguageClient.ts:47


meta

meta(address): Promise<LanguageMeta>

Parameters
Name Type
address string
Returns

Promise<LanguageMeta>

Defined in

language/LanguageClient.ts:114


publish

publish(languagePath, languageMeta): Promise<LanguageMeta>

Parameters
Name Type
languagePath string
languageMeta LanguageMetaInput
Returns

Promise<LanguageMeta>

Defined in

language/LanguageClient.ts:95


remove

remove(address): Promise<Boolean>

Parameters
Name Type
address string
Returns

Promise<Boolean>

Defined in

language/LanguageClient.ts:146


source

source(address): Promise<string>

Parameters
Name Type
address string
Returns

Promise<string>

Defined in

language/LanguageClient.ts:131


writeSettings

writeSettings(languageAddress, settings): Promise<Boolean>

Parameters
Name Type
languageAddress string
settings string
Returns

Promise<Boolean>

Defined in

language/LanguageClient.ts:63

@perspect3vism/ad4m / Exports / language/LanguageContext / Dna

Class: Dna

language/LanguageContext.Dna

Table of contents

Constructors

Properties

Constructors

constructor

new Dna()

Properties

file

file: Buffer

Defined in

language/LanguageContext.ts:25


nick

nick: string

Defined in

language/LanguageContext.ts:26


zomeCalls

zomeCalls: [string, string][]

Defined in

language/LanguageContext.ts:27

@perspect3vism/ad4m / Exports / language/LanguageHandle / LanguageHandle

Class: LanguageHandle

language/LanguageHandle.LanguageHandle

Table of contents

Constructors

Properties

Constructors

constructor

new LanguageHandle()

Properties

address

address: string

Defined in

language/LanguageHandle.ts:10


constructorIcon

Optional constructorIcon: Icon

Defined in

language/LanguageHandle.ts:19


icon

Optional icon: Icon

Defined in

language/LanguageHandle.ts:16


name

name: string

Defined in

language/LanguageHandle.ts:7


settings

Optional settings: string

Defined in

language/LanguageHandle.ts:13


settingsIcon

Optional settingsIcon: Icon

Defined in

language/LanguageHandle.ts:22

@perspect3vism/ad4m / Exports / language/LanguageMeta / LanguageExpression

Class: LanguageExpression

language/LanguageMeta.LanguageExpression

Hierarchy

  • any

    LanguageExpression

Table of contents

Constructors

Constructors

constructor

new LanguageExpression()

Inherited from

ExpressionGeneric(LanguageMetaInternal).constructor

@perspect3vism/ad4m / Exports / language/LanguageMeta / LanguageLanguageInput

Class: LanguageLanguageInput

language/LanguageMeta.LanguageLanguageInput

Table of contents

Constructors

Properties

Constructors

constructor

new LanguageLanguageInput()

Properties

bundle

bundle: string

Defined in

language/LanguageMeta.ts:68


meta

meta: LanguageMetaInternal

Defined in

language/LanguageMeta.ts:69

@perspect3vism/ad4m / Exports / language/LanguageMeta / LanguageMeta

Class: LanguageMeta

language/LanguageMeta.LanguageMeta

Table of contents

Constructors

Properties

Constructors

constructor

new LanguageMeta()

Properties

address

address: string

Defined in

language/LanguageMeta.ts:10


author

author: string

Defined in

language/LanguageMeta.ts:16


description

description: string

Defined in

language/LanguageMeta.ts:13


name

name: string

Defined in

language/LanguageMeta.ts:7


possibleTemplateParams

Optional possibleTemplateParams: string[]

Defined in

language/LanguageMeta.ts:28


Optional sourceCodeLink: string

Defined in

language/LanguageMeta.ts:31


templateAppliedParams

Optional templateAppliedParams: string

Defined in

language/LanguageMeta.ts:25


templateSourceLanguageAddress

Optional templateSourceLanguageAddress: string

Defined in

language/LanguageMeta.ts:22


templated

templated: boolean

Defined in

language/LanguageMeta.ts:19

@perspect3vism/ad4m / Exports / language/LanguageMeta / LanguageMetaInput

Class: LanguageMetaInput

language/LanguageMeta.LanguageMetaInput

Table of contents

Constructors

Properties

Constructors

constructor

new LanguageMetaInput(name?, description?)

Parameters
Name Type
name? string
description? string
Defined in

language/LanguageMeta.ts:48

Properties

description

description: string

Defined in

language/LanguageMeta.ts:40


name

name: string

Defined in

language/LanguageMeta.ts:37


possibleTemplateParams

Optional possibleTemplateParams: string[]

Defined in

language/LanguageMeta.ts:43


Optional sourceCodeLink: string

Defined in

language/LanguageMeta.ts:46

@perspect3vism/ad4m / Exports / language/LanguageMeta / LanguageMetaInternal

Class: LanguageMetaInternal

language/LanguageMeta.LanguageMetaInternal

Table of contents

Constructors

Properties

Constructors

constructor

new LanguageMetaInternal()

Properties

address

address: string

Defined in

language/LanguageMeta.ts:57


description

description: string

Defined in

language/LanguageMeta.ts:58


name

name: string

Defined in

language/LanguageMeta.ts:56


possibleTemplateParams

Optional possibleTemplateParams: string[]

Defined in

language/LanguageMeta.ts:61


Optional sourceCodeLink: string

Defined in

language/LanguageMeta.ts:62


templateAppliedParams

Optional templateAppliedParams: string

Defined in

language/LanguageMeta.ts:60


templateSourceLanguageAddress

Optional templateSourceLanguageAddress: string

Defined in

language/LanguageMeta.ts:59

@perspect3vism/ad4m / Exports / language/LanguageRef / LanguageRef

Class: LanguageRef

language/LanguageRef.LanguageRef

Table of contents

Constructors

Properties

Constructors

constructor

new LanguageRef(address?, name?)

Parameters
Name Type
address? string
name? string
Defined in

language/LanguageRef.ts:14

Properties

address

address: string

Defined in

language/LanguageRef.ts:9


name

name: string

Defined in

language/LanguageRef.ts:12

@perspect3vism/ad4m / Exports / language/LanguageResolver / default

Class: default

language/LanguageResolver.default

Resolver classes are used here to define the GraphQL schema (through the type-graphql annotations) and are spawned in the client tests in Ad4mClient.test.ts. For the latter, they return test fixtures.

Table of contents

Constructors

Methods

Constructors

constructor

new default()

Methods

language

language(address): LanguageHandle

Parameters
Name Type
address string
Returns

LanguageHandle

Defined in

language/LanguageResolver.ts:16


languageApplyTemplateAndPublish

languageApplyTemplateAndPublish(sourceLanguageHash, templateData): LanguageRef

Parameters
Name Type
sourceLanguageHash string
templateData string
Returns

LanguageRef

Defined in

language/LanguageResolver.ts:49


languageMeta

languageMeta(address): LanguageMeta

Parameters
Name Type
address string
Returns

LanguageMeta

Defined in

language/LanguageResolver.ts:75


languagePublish

languagePublish(languagePath, languageMeta): LanguageMeta

Parameters
Name Type
languagePath string
languageMeta LanguageMetaInput
Returns

LanguageMeta

Defined in

language/LanguageResolver.ts:57


languageRemove

languageRemove(address): Boolean

Parameters
Name Type
address string
Returns

Boolean

Defined in

language/LanguageResolver.ts:95


languageSource

languageSource(address): string

Parameters
Name Type
address string
Returns

string

Defined in

language/LanguageResolver.ts:90


languageWriteSettings

languageWriteSettings(languageAddress, settings): Boolean

Parameters
Name Type
languageAddress string
settings string
Returns

Boolean

Defined in

language/LanguageResolver.ts:41


languages

languages(filter): LanguageHandle[]

Parameters
Name Type
filter string
Returns

LanguageHandle[]

Defined in

language/LanguageResolver.ts:29

@perspect3vism/ad4m / Exports / links/Links / Link

links/Links.Link

Table of contents

Constructors

Properties

Constructors

constructor

new Link(obj)

Parameters
Name Type
obj any
Defined in

links/Links.ts:15

Properties

predicate

Optional predicate: string

Defined in

links/Links.ts:13


source

source: string

Defined in

links/Links.ts:7


target

target: string

Defined in

links/Links.ts:10

@perspect3vism/ad4m / Exports / links/Links / LinkExpression

Class: LinkExpression

links/Links.LinkExpression

Hierarchy

  • any

    LinkExpression

Table of contents

Constructors

Methods

Constructors

constructor

new LinkExpression()

Inherited from

ExpressionGeneric(Link).constructor

Methods

hash

hash(): number

Returns

number

Defined in

links/Links.ts:58

@perspect3vism/ad4m / Exports / links/Links / LinkExpressionInput

Class: LinkExpressionInput

links/Links.LinkExpressionInput

Hierarchy

  • any

    LinkExpressionInput

Table of contents

Constructors

Constructors

constructor

new LinkExpressionInput()

Inherited from

ExpressionGenericInput(LinkInput).constructor

@perspect3vism/ad4m / Exports / links/Links / LinkExpressionMutations

Class: LinkExpressionMutations

links/Links.LinkExpressionMutations

Table of contents

Constructors

Properties

Constructors

constructor

new LinkExpressionMutations(additions, removals)

Parameters
Name Type
additions LinkExpression[]
removals LinkExpression[]
Defined in

links/Links.ts:38

Properties

additions

additions: LinkExpression[]

Defined in

links/Links.ts:33


removals

removals: LinkExpression[]

Defined in

links/Links.ts:36

@perspect3vism/ad4m / Exports / links/Links / LinkExpressionUpdated

Class: LinkExpressionUpdated

links/Links.LinkExpressionUpdated

Table of contents

Constructors

Properties

Constructors

constructor

new LinkExpressionUpdated(oldLink, newLink)

Parameters
Name Type
oldLink LinkExpression
newLink LinkExpression
Defined in

links/Links.ts:94

Properties

newLink: LinkExpression

Defined in

links/Links.ts:92


oldLink: LinkExpression

Defined in

links/Links.ts:89

@perspect3vism/ad4m / Exports / links/Links / LinkInput

Class: LinkInput

links/Links.LinkInput

Table of contents

Constructors

Properties

Constructors

constructor

new LinkInput()

Properties

predicate

Optional predicate: string

Defined in

links/Links.ts:53


source

source: string

Defined in

links/Links.ts:47


target

target: string

Defined in

links/Links.ts:50

@perspect3vism/ad4m / Exports / links/Links / LinkMutations

Class: LinkMutations

links/Links.LinkMutations

Table of contents

Constructors

Properties

Constructors

constructor

new LinkMutations()

Properties

additions

additions: LinkInput[]

Defined in

links/Links.ts:25


removals

removals: LinkExpressionInput[]

Defined in

links/Links.ts:28

@perspect3vism/ad4m / Exports / neighbourhood/Neighbourhood / Neighbourhood

Class: Neighbourhood

neighbourhood/Neighbourhood.Neighbourhood

Table of contents

Constructors

Properties

Constructors

constructor

new Neighbourhood(linkLanguage, meta)

Parameters
Name Type
linkLanguage string
meta Perspective
Defined in

neighbourhood/Neighbourhood.ts:15

Properties

linkLanguage

linkLanguage: string

Defined in

neighbourhood/Neighbourhood.ts:10


meta

meta: Perspective

Defined in

neighbourhood/Neighbourhood.ts:13

@perspect3vism/ad4m / Exports / neighbourhood/Neighbourhood / NeighbourhoodExpression

Class: NeighbourhoodExpression

neighbourhood/Neighbourhood.NeighbourhoodExpression

Hierarchy

  • any

    NeighbourhoodExpression

Table of contents

Constructors

Constructors

constructor

new NeighbourhoodExpression()

Inherited from

ExpressionGeneric(Neighbourhood).constructor

@perspect3vism/ad4m / Exports / neighbourhood/NeighbourhoodClient / NeighbourhoodClient

Class: NeighbourhoodClient

neighbourhood/NeighbourhoodClient.NeighbourhoodClient

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NeighbourhoodClient(client)

Parameters
Name Type
client ApolloClient<any>
Defined in

neighbourhood/NeighbourhoodClient.ts:13

Properties

#apolloClient

Private #apolloClient: ApolloClient<any>

Defined in

neighbourhood/NeighbourhoodClient.ts:11

Methods

addSignalHandler

addSignalHandler(perspectiveUUID, handler): Promise<void>

Parameters
Name Type
perspectiveUUID string
handler TelepresenceSignalCallback
Returns

Promise<void>

Defined in

neighbourhood/NeighbourhoodClient.ts:164


hasTelepresenceAdapter

hasTelepresenceAdapter(perspectiveUUID): Promise<boolean>

Parameters
Name Type
perspectiveUUID string
Returns

Promise<boolean>

Defined in

neighbourhood/NeighbourhoodClient.ts:76


joinFromUrl

joinFromUrl(url): Promise<PerspectiveHandle>

Parameters
Name Type
url string
Returns

Promise<PerspectiveHandle>

Defined in

neighbourhood/NeighbourhoodClient.ts:39


onlineAgents

onlineAgents(perspectiveUUID): Promise<OnlineAgent[]>

Parameters
Name Type
perspectiveUUID string
Returns

Promise<OnlineAgent[]>

Defined in

neighbourhood/NeighbourhoodClient.ts:86


otherAgents

otherAgents(perspectiveUUID): Promise<string[]>

Parameters
Name Type
perspectiveUUID string
Returns

Promise<string[]>

Defined in

neighbourhood/NeighbourhoodClient.ts:66


publishFromPerspective

publishFromPerspective(perspectiveUUID, linkLanguage, meta): Promise<string>

Parameters
Name Type
perspectiveUUID string
linkLanguage string
meta Perspective
Returns

Promise<string>

Defined in

neighbourhood/NeighbourhoodClient.ts:17


sendBroadcast

sendBroadcast(perspectiveUUID, payload): Promise<boolean>

Parameters
Name Type
perspectiveUUID string
payload Perspective
Returns

Promise<boolean>

Defined in

neighbourhood/NeighbourhoodClient.ts:147


sendSignal

sendSignal(perspectiveUUID, remoteAgentDid, payload): Promise<boolean>

Parameters
Name Type
perspectiveUUID string
remoteAgentDid string
payload Perspective
Returns

Promise<boolean>

Defined in

neighbourhood/NeighbourhoodClient.ts:128


setOnlineStatus

setOnlineStatus(perspectiveUUID, status): Promise<boolean>

Parameters
Name Type
perspectiveUUID string
status Perspective
Returns

Promise<boolean>

Defined in

neighbourhood/NeighbourhoodClient.ts:111

@perspect3vism/ad4m / Exports / neighbourhood/NeighbourhoodProxy / NeighbourhoodProxy

Class: NeighbourhoodProxy

neighbourhood/NeighbourhoodProxy.NeighbourhoodProxy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NeighbourhoodProxy(client, pID)

Parameters
Name Type
client NeighbourhoodClient
pID string
Defined in

neighbourhood/NeighbourhoodProxy.ts:10

Properties

#client

Private #client: NeighbourhoodClient

Defined in

neighbourhood/NeighbourhoodProxy.ts:7


#pID

Private #pID: string

Defined in

neighbourhood/NeighbourhoodProxy.ts:8

Methods

addSignalHandler

addSignalHandler(handler): Promise<void>

Parameters
Name Type
handler (payload: PerspectiveExpression) => void
Returns

Promise<void>

Defined in

neighbourhood/NeighbourhoodProxy.ts:39


hasTelepresenceAdapter

hasTelepresenceAdapter(): Promise<boolean>

Returns

Promise<boolean>

Defined in

neighbourhood/NeighbourhoodProxy.ts:19


onlineAgents

onlineAgents(): Promise<OnlineAgent[]>

Returns

Promise<OnlineAgent[]>

Defined in

neighbourhood/NeighbourhoodProxy.ts:23


otherAgents

otherAgents(): Promise<string[]>

Returns

Promise<string[]>

Defined in

neighbourhood/NeighbourhoodProxy.ts:15


sendBroadcast

sendBroadcast(payload): Promise<boolean>

Parameters
Name Type
payload Perspective
Returns

Promise<boolean>

Defined in

neighbourhood/NeighbourhoodProxy.ts:35


sendSignal

sendSignal(remoteAgentDid, payload): Promise<boolean>

Parameters
Name Type
remoteAgentDid string
payload Perspective
Returns

Promise<boolean>

Defined in

neighbourhood/NeighbourhoodProxy.ts:31


setOnlineStatus

setOnlineStatus(status): Promise<boolean>

Parameters
Name Type
status Perspective
Returns

Promise<boolean>

Defined in

neighbourhood/NeighbourhoodProxy.ts:27

@perspect3vism/ad4m / Exports / neighbourhood/NeighbourhoodResolver / default

Class: default

neighbourhood/NeighbourhoodResolver.default

Resolver classes are used here to define the GraphQL schema (through the type-graphql annotations) and are spawned in the client tests in Ad4mClient.test.ts. For the latter, they return test fixtures.

Table of contents

Constructors

Methods

Constructors

constructor

new default()

Methods

neighbourhoodHasTelepresenceAdapter

neighbourhoodHasTelepresenceAdapter(perspectiveUUID): boolean

Parameters
Name Type
perspectiveUUID string
Returns

boolean

Defined in

neighbourhood/NeighbourhoodResolver.ts:53


neighbourhoodJoinFromUrl

neighbourhoodJoinFromUrl(url, pubSub): PerspectiveHandle

Parameters
Name Type
url string
pubSub any
Returns

PerspectiveHandle

Defined in

neighbourhood/NeighbourhoodResolver.ts:37


neighbourhoodOnlineAgents

neighbourhoodOnlineAgents(perspectiveUUID): OnlineAgent[]

Parameters
Name Type
perspectiveUUID string
Returns

OnlineAgent[]

Defined in

neighbourhood/NeighbourhoodResolver.ts:58


neighbourhoodOtherAgents

neighbourhoodOtherAgents(perspectiveUUID): string[]

Parameters
Name Type
perspectiveUUID string
Returns

string[]

Defined in

neighbourhood/NeighbourhoodResolver.ts:48


neighbourhoodPublishFromPerspective

neighbourhoodPublishFromPerspective(perspectiveUUID, linkLanguage, meta): string

Parameters
Name Type
perspectiveUUID string
linkLanguage string
meta PerspectiveInput
Returns

string

Defined in

neighbourhood/NeighbourhoodResolver.ts:28


neighbourhoodSendBroadcast

neighbourhoodSendBroadcast(perspectiveUUID, signal): boolean

Parameters
Name Type
perspectiveUUID string
signal PerspectiveInput
Returns

boolean

Defined in

neighbourhood/NeighbourhoodResolver.ts:76


neighbourhoodSendSignal

neighbourhoodSendSignal(perspectiveUUID, recipient, signal): boolean

Parameters
Name Type
perspectiveUUID string
recipient string
signal PerspectiveInput
Returns

boolean

Defined in

neighbourhood/NeighbourhoodResolver.ts:71


neighbourhoodSetOnlineStatus

neighbourhoodSetOnlineStatus(perspectiveUUID, status): boolean

Parameters
Name Type
perspectiveUUID string
status PerspectiveInput
Returns

boolean

Defined in

neighbourhood/NeighbourhoodResolver.ts:66


neighbourhoodSignal

neighbourhoodSignal(pID): PerspectiveExpression

Parameters
Name Type
pID string
Returns

PerspectiveExpression

Defined in

neighbourhood/NeighbourhoodResolver.ts:81

@perspect3vism/ad4m / Exports / perspectives/LinkQuery / LinkQuery

Class: LinkQuery

perspectives/LinkQuery.LinkQuery

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new LinkQuery(obj)

Parameters
Name Type
obj object
Defined in

perspectives/LinkQuery.ts:25

Properties

fromDate

Optional fromDate: Date

Defined in

perspectives/LinkQuery.ts:17


limit

Optional limit: number

Defined in

perspectives/LinkQuery.ts:23


predicate

Optional predicate: string

Defined in

perspectives/LinkQuery.ts:14


source

Optional source: string

Defined in

perspectives/LinkQuery.ts:8


target

Optional target: string

Defined in

perspectives/LinkQuery.ts:11


untilDate

Optional untilDate: Date

Defined in

perspectives/LinkQuery.ts:20

Methods

isMatch

isMatch(l): boolean

Parameters
Name Type
l Link
Returns

boolean

Defined in

perspectives/LinkQuery.ts:51

@perspect3vism/ad4m / Exports / perspectives/Perspective / Perspective

Class: Perspective

perspectives/Perspective.Perspective

A Perspective represents subjective meaning, encoded through associations between expressions, a.k.a. Links, that is a graph over the objective Expressions of any subset of Languages.

This type represents the clean onotological concept of a Perspective. An instance of this class can be regarded as an immutable snapshot of a mutable perspective.

The types PerspectiveProxy and PerspectiveHandle are used when dealing with an instantiated mutable perspective as is done through most of the GraphQL mutations.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Perspective(links?)

Parameters
Name Type
links? LinkExpression[]
Defined in

perspectives/Perspective.ts:24

Properties

links: LinkExpression[]

The content of the perspective, a list/graph of links

Defined in

perspectives/Perspective.ts:22

Methods

get

get(query): LinkExpression[]

Convenience function for filtering links just like with PerspectiveProxy

Parameters
Name Type
query LinkQuery
Returns

LinkExpression[]

Defined in

perspectives/Perspective.ts:33


getSingleTarget

getSingleTarget(query): string | void

Convenience function to get the target of the first link that matches the given query This makes sense when the query is expected to return only one link and the target of that link is what you are looking for.

Parameters
Name Type
query LinkQuery
Returns

string | void

Defined in

perspectives/Perspective.ts:81

@perspect3vism/ad4m / Exports / perspectives/Perspective / PerspectiveExpression

Class: PerspectiveExpression

perspectives/Perspective.PerspectiveExpression

Hierarchy

  • any

    PerspectiveExpression

Table of contents

Constructors

Constructors

constructor

new PerspectiveExpression()

Inherited from

ExpressionGeneric(Perspective).constructor

@perspect3vism/ad4m / Exports / perspectives/Perspective / PerspectiveInput

Class: PerspectiveInput

perspectives/Perspective.PerspectiveInput

Table of contents

Constructors

Properties

Constructors

constructor

new PerspectiveInput()

Properties

links: LinkExpressionInput[]

Defined in

perspectives/Perspective.ts:95

@perspect3vism/ad4m / Exports / perspectives/PerspectiveClient / PerspectiveClient

Class: PerspectiveClient

perspectives/PerspectiveClient.PerspectiveClient

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new PerspectiveClient(client, subscribe?)

Parameters
Name Type Default value
client ApolloClient<any> undefined
subscribe boolean true
Defined in

perspectives/PerspectiveClient.ts:50

Properties

#apolloClient

Private #apolloClient: ApolloClient<any>

Defined in

perspectives/PerspectiveClient.ts:43


#expressionClient

Private Optional #expressionClient: ExpressionClient

Defined in

perspectives/PerspectiveClient.ts:47


#neighbourhoodClient

Private Optional #neighbourhoodClient: NeighbourhoodClient

Defined in

perspectives/PerspectiveClient.ts:48


#perspectiveAddedCallbacks

Private #perspectiveAddedCallbacks: PerspectiveHandleCallback[]

Defined in

perspectives/PerspectiveClient.ts:44


#perspectiveRemovedCallbacks

Private #perspectiveRemovedCallbacks: UuidCallback[]

Defined in

perspectives/PerspectiveClient.ts:46


#perspectiveUpdatedCallbacks

Private #perspectiveUpdatedCallbacks: PerspectiveHandleCallback[]

Defined in

perspectives/PerspectiveClient.ts:45

Methods

add

add(name): Promise<PerspectiveProxy>

Parameters
Name Type
name string
Returns

Promise<PerspectiveProxy>

Defined in

perspectives/PerspectiveClient.ts:140


addLink(uuid, link): Promise<LinkExpression>

Parameters
Name Type
uuid string
link Link
Returns

Promise<LinkExpression>

Defined in

perspectives/PerspectiveClient.ts:173


addLinkExpression

addLinkExpression(uuid, link): Promise<LinkExpression>

Parameters
Name Type
uuid string
link LinkExpressionInput
Returns

Promise<LinkExpression>

Defined in

perspectives/PerspectiveClient.ts:226


addLinks(uuid, links): Promise<LinkExpression[]>

Parameters
Name Type
uuid string
links Link[]
Returns

Promise<LinkExpression[]>

Defined in

perspectives/PerspectiveClient.ts:185


addPerspectiveAddedListener

addPerspectiveAddedListener(cb): void

Parameters
Name Type
cb PerspectiveHandleCallback
Returns

void

Defined in

perspectives/PerspectiveClient.ts:283


addPerspectiveLinkAddedListener

addPerspectiveLinkAddedListener(uuid, cb): Promise<void>

Parameters
Name Type
uuid String
cb LinkCallback[]
Returns

Promise<void>

Defined in

perspectives/PerspectiveClient.ts:340


addPerspectiveLinkRemovedListener

addPerspectiveLinkRemovedListener(uuid, cb): Promise<void>

Parameters
Name Type
uuid String
cb LinkCallback[]
Returns

Promise<void>

Defined in

perspectives/PerspectiveClient.ts:357


addPerspectiveLinkUpdatedListener

addPerspectiveLinkUpdatedListener(uuid, cb): Promise<void>

Parameters
Name Type
uuid String
cb LinkCallback[]
Returns

Promise<void>

Defined in

perspectives/PerspectiveClient.ts:374


addPerspectiveRemovedListener

addPerspectiveRemovedListener(cb): void

Parameters
Name Type
cb UuidCallback
Returns

void

Defined in

perspectives/PerspectiveClient.ts:321


addPerspectiveUpdatedListener

addPerspectiveUpdatedListener(cb): void

Parameters
Name Type
cb PerspectiveHandleCallback
Returns

void

Defined in

perspectives/PerspectiveClient.ts:302


all

all(): Promise<PerspectiveProxy[]>

Returns

Promise<PerspectiveProxy[]>

Defined in

perspectives/PerspectiveClient.ts:71


byUUID

byUUID(uuid): Promise<PerspectiveProxy>

Parameters
Name Type
uuid string
Returns

Promise<PerspectiveProxy>

Defined in

perspectives/PerspectiveClient.ts:83


createExpression

createExpression(content, languageAddress): Promise<string>

Parameters
Name Type
content any
languageAddress string
Returns

Promise<string>

Defined in

perspectives/PerspectiveClient.ts:278


getExpression

getExpression(expressionURI): Promise<ExpressionRendered>

Parameters
Name Type
expressionURI string
Returns

Promise<ExpressionRendered>

Defined in

perspectives/PerspectiveClient.ts:274


getNeighbourhoodProxy

getNeighbourhoodProxy(uuid): NeighbourhoodProxy

Parameters
Name Type
uuid string
Returns

NeighbourhoodProxy

Defined in

perspectives/PerspectiveClient.ts:398


linkMutations

linkMutations(uuid, mutations): Promise<LinkExpressionMutations>

Parameters
Name Type
uuid string
mutations LinkMutations
Returns

Promise<LinkExpressionMutations>

Defined in

perspectives/PerspectiveClient.ts:209


publishSnapshotByUUID

publishSnapshotByUUID(uuid): Promise<string>

Parameters
Name Type
uuid string
Returns

Promise<string>

Defined in

perspectives/PerspectiveClient.ts:107


queryLinks(uuid, query): Promise<LinkExpression[]>

Parameters
Name Type
uuid string
query LinkQuery
Returns

Promise<LinkExpression[]>

Defined in

perspectives/PerspectiveClient.ts:117


queryProlog

queryProlog(uuid, query): Promise<any>

Parameters
Name Type
uuid string
query string
Returns

Promise<any>

Defined in

perspectives/PerspectiveClient.ts:129


remove

remove(uuid): Promise<{ perspectiveRemove: boolean }>

Parameters
Name Type
uuid string
Returns

Promise<{ perspectiveRemove: boolean }>

Defined in

perspectives/PerspectiveClient.ts:164


removeLink(uuid, link): Promise<{ perspectiveRemoveLink: boolean }>

Parameters
Name Type
uuid string
link LinkExpressionInput
Returns

Promise<{ perspectiveRemoveLink: boolean }>

Defined in

perspectives/PerspectiveClient.ts:261


removeLinks(uuid, links): Promise<LinkExpression[]>

Parameters
Name Type
uuid string
links LinkExpressionInput[]
Returns

Promise<LinkExpression[]>

Defined in

perspectives/PerspectiveClient.ts:197


setExpressionClient

setExpressionClient(client): void

Parameters
Name Type
client ExpressionClient
Returns

void

Defined in

perspectives/PerspectiveClient.ts:63


setNeighbourhoodClient

setNeighbourhoodClient(client): void

Parameters
Name Type
client NeighbourhoodClient
Returns

void

Defined in

perspectives/PerspectiveClient.ts:67


snapshotByUUID

snapshotByUUID(uuid): Promise<Perspective>

Parameters
Name Type
uuid string
Returns

Promise<Perspective>

Defined in

perspectives/PerspectiveClient.ts:96


subscribePerspectiveAdded

subscribePerspectiveAdded(): void

Returns

void

Defined in

perspectives/PerspectiveClient.ts:287


subscribePerspectiveRemoved

subscribePerspectiveRemoved(): void

Returns

void

Defined in

perspectives/PerspectiveClient.ts:325


subscribePerspectiveUpdated

subscribePerspectiveUpdated(): void

Returns

void

Defined in

perspectives/PerspectiveClient.ts:306


update

update(uuid, name): Promise<PerspectiveProxy>

Parameters
Name Type
uuid string
name string
Returns

Promise<PerspectiveProxy>

Defined in

perspectives/PerspectiveClient.ts:152


updateLink(uuid, oldLink, newLink): Promise<LinkExpression>

Parameters
Name Type
uuid string
oldLink LinkExpressionInput
newLink LinkInput
Returns

Promise<LinkExpression>

Defined in

perspectives/PerspectiveClient.ts:238

@perspect3vism/ad4m / Exports / perspectives/PerspectiveDiff / PerspectiveDiff

Class: PerspectiveDiff

perspectives/PerspectiveDiff.PerspectiveDiff

Table of contents

Constructors

Properties

Constructors

constructor

new PerspectiveDiff()

Properties

additions

additions: LinkExpression[]

Defined in

perspectives/PerspectiveDiff.ts:8


removals

removals: LinkExpression[]

Defined in

perspectives/PerspectiveDiff.ts:11

@perspect3vism/ad4m / Exports / perspectives/PerspectiveDiff / PerspectiveDiffExpression

Class: PerspectiveDiffExpression

perspectives/PerspectiveDiff.PerspectiveDiffExpression

Hierarchy

  • any

    PerspectiveDiffExpression

Table of contents

Constructors

Constructors

constructor

new PerspectiveDiffExpression()

Inherited from

ExpressionGeneric(PerspectiveDiff).constructor

@perspect3vism/ad4m / Exports / perspectives/PerspectiveHandle / PerspectiveHandle

Class: PerspectiveHandle

perspectives/PerspectiveHandle.PerspectiveHandle

Table of contents

Constructors

Properties

Constructors

constructor

new PerspectiveHandle(uuid?, name?, state?)

Parameters
Name Type
uuid? string
name? string
state? PerspectiveState
Defined in

perspectives/PerspectiveHandle.ts:30

Properties

name

name: string

Defined in

perspectives/PerspectiveHandle.ts:20


neighbourhood

Optional neighbourhood: Neighbourhood

Defined in

perspectives/PerspectiveHandle.ts:28


sharedUrl

Optional sharedUrl: string

Defined in

perspectives/PerspectiveHandle.ts:25


state

state: PerspectiveState

Defined in

perspectives/PerspectiveHandle.ts:22


uuid

uuid: string

Defined in

perspectives/PerspectiveHandle.ts:18

@perspect3vism/ad4m / Exports / perspectives/PerspectiveProxy / PerspectiveProxy

Class: PerspectiveProxy

perspectives/PerspectiveProxy.PerspectiveProxy

Perspective UI proxy object

Convenience object for UIs to interact with a perspective. It is created by some of the methods in the PerspectiveClient class and includes a reference to the PerspectiveClient object that created it.

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new PerspectiveProxy(handle, ad4m)

Parameters
Name Type
handle PerspectiveHandle
ad4m PerspectiveClient
Defined in

perspectives/PerspectiveProxy.ts:33

Properties

#client

Private #client: PerspectiveClient

Defined in

perspectives/PerspectiveProxy.ts:28


#handle

Private #handle: PerspectiveHandle

Defined in

perspectives/PerspectiveProxy.ts:27


#perspectiveLinkAddedCallbacks

Private #perspectiveLinkAddedCallbacks: LinkCallback[]

Defined in

perspectives/PerspectiveProxy.ts:29


#perspectiveLinkRemovedCallbacks

Private #perspectiveLinkRemovedCallbacks: LinkCallback[]

Defined in

perspectives/PerspectiveProxy.ts:30


#perspectiveLinkUpdatedCallbacks

Private #perspectiveLinkUpdatedCallbacks: LinkCallback[]

Defined in

perspectives/PerspectiveProxy.ts:31

Accessors

name

get name(): string

Given name of the perspective

Returns

string

Defined in

perspectives/PerspectiveProxy.ts:95


neighbourhood

get neighbourhood(): void | Neighbourhood

If the perspective is shared as a Neighbourhood, this is the Neighbourhood Expression

Returns

void | Neighbourhood

Defined in

perspectives/PerspectiveProxy.ts:105


sharedUrl

get sharedUrl(): string | void

If the perspective is shared as a Neighbourhood, this is the Neighbourhood URL

Returns

string | void

Defined in

perspectives/PerspectiveProxy.ts:100


state

get state(): PerspectiveState

Returns the state of the perspective *

Returns

PerspectiveState

Defined in

perspectives/PerspectiveProxy.ts:110


uuid

get uuid(): string

Unique ID of the perspective

Returns

string

Defined in

perspectives/PerspectiveProxy.ts:90

Methods

add

add(link): Promise<LinkExpression>

Adds a link to this perspective

Parameters
Name Type
link Link
Returns

Promise<LinkExpression>

Defined in

perspectives/PerspectiveProxy.ts:125


addLinkExpression

addLinkExpression(link): Promise<LinkExpression>

Adds a linkExpression to this perspective

Parameters
Name Type
link LinkExpressionInput
Returns

Promise<LinkExpression>

Defined in

perspectives/PerspectiveProxy.ts:145


addLinks(links): Promise<LinkExpression[]>

Adds multiple links to this perspective *

Parameters
Name Type
links Link[]
Returns

Promise<LinkExpression[]>

Defined in

perspectives/PerspectiveProxy.ts:130


addListener

addListener(type, cb): Promise<void>

Adds a link listener

Parameters
Name Type Description
type PerspectiveListenerTypes Can be 'link-added' or 'link-removed'
cb LinkCallback Callback function that is called when a link is added to the perspective
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:169


addSdna

addSdna(sdnaCode): Promise<void>

Adds the given Social DNA code to the perspective's SDNA code

Parameters
Name Type
sdnaCode string
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:328


availableFlows

availableFlows(exprAddr): Promise<string[]>

Returns all Social DNA flows that can be started from the given expression

Parameters
Name Type
exprAddr string
Returns

Promise<string[]>

Defined in

perspectives/PerspectiveProxy.ts:265


createExpression

createExpression(content, languageAddress): Promise<string>

Parameters
Name Type
content any
languageAddress string
Returns

Promise<string>

Defined in

perspectives/PerspectiveProxy.ts:161


createSubject

createSubject<T>(subjectClass, exprAddr): Promise<T>

Creates a new subject instance by running its (SDNA defined) constructor, which means adding links around the given expression address so that it conforms to the given subject class.

Type parameters
Name
T
Parameters
Name Type Description
subjectClass T Either a string with the name of the subject class, or an object with the properties of the subject class. In the latter case, the first subject class that matches the given properties will be used.
exprAddr string The address of the expression to be turned into a subject instance
Returns

Promise<T>

Defined in

perspectives/PerspectiveProxy.ts:368


ensureSDNASubjectClass

ensureSDNASubjectClass(jsClass): Promise<void>

Takes a JS class (its constructor) and assumes that it was decorated by the

Subject Class

etc. decorators. It then tests if there is a subject class already present in the perspective's SDNA that matches the given class. If there is no such class, it gets the JS class's SDNA by calling its static generateSDNA() function and adds it to the perspective's SDNA.

Parameters
Name Type
jsClass any
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:506


executeAction

executeAction(actions, expression, parameters): Promise<void>

Parameters
Name Type
actions any
expression any
parameters Parameter[]
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:44


expressionsInFlowState

expressionsInFlowState(flowName, flowState): Promise<string[]>

Returns all expressions in the given state of given Social DNA flow

Parameters
Name Type
flowName string
flowState number
Returns

Promise<string[]>

Defined in

perspectives/PerspectiveProxy.ts:279


flowActions

flowActions(flowName, exprAddr): Promise<string[]>

Returns available action names, with regard to Social DNA flow and expression's flow state

Parameters
Name Type
flowName string
exprAddr string
Returns

Promise<string[]>

Defined in

perspectives/PerspectiveProxy.ts:291


flowState

flowState(flowName, exprAddr): Promise<number>

Returns the given expression's flow state with regard to given Social DNA flow

Parameters
Name Type
flowName string
exprAddr string
Returns

Promise<number>

Defined in

perspectives/PerspectiveProxy.ts:285


get

get(query): Promise<LinkExpression[]>

Returns all the links of this perspective that matches the LinkQuery

Parameters
Name Type
query LinkQuery
Returns

Promise<LinkExpression[]>

Defined in

perspectives/PerspectiveProxy.ts:115


getAllSubjectInstances

getAllSubjectInstances<T>(subjectClass): Promise<T[]>

Returns all subject instances of the given subject class as proxy objects.

Type parameters
Name
T
Parameters
Name Type Description
subjectClass T Either a string with the name of the subject class, or an object with the properties of the subject class. In the latter case, all subject classes that match the given properties will be used.
Returns

Promise<T[]>

Defined in

perspectives/PerspectiveProxy.ts:416


getExpression

getExpression(expressionURI): Promise<ExpressionRendered>

Parameters
Name Type
expressionURI string
Returns

Promise<ExpressionRendered>

Defined in

perspectives/PerspectiveProxy.ts:157


getNeighbourhoodProxy

getNeighbourhoodProxy(): NeighbourhoodProxy

Returns

NeighbourhoodProxy

Defined in

perspectives/PerspectiveProxy.ts:514


getSdna

getSdna(): Promise<string[]>

Returns the perspective's Social DNA code This will return all SDNA code elements in an array.

Returns

Promise<string[]>

Defined in

perspectives/PerspectiveProxy.ts:318


getSingleTarget

getSingleTarget(query): Promise<string | void>

Convenience function to get the target of the first link that matches the given query This makes sense when the query is expected to return only one link and the target of that link is what you are looking for.

Works best together with

Member

setSingelTarget()

Parameters
Name Type
query LinkQuery
Returns

Promise<string | void>

Defined in

perspectives/PerspectiveProxy.ts:227


getSubjectProxy

getSubjectProxy<T>(base, subjectClass): Promise<T>

For an existing subject instance (existing in the perspective's links) this function returns a proxy object that can be used to access the subject's properties and methods.

Type parameters
Name
T
Parameters
Name Type Description
base string URI of the subject's root expression
subjectClass T Either a string with the name of the subject class, or an object with the properties of the subject class. In the latter case, the first subject class that matches the given properties will be used.
Returns

Promise<T>

Defined in

perspectives/PerspectiveProxy.ts:401


infer

infer(query): Promise<any>

Runs a Prolog query on the perspective's Prolog engine

Parameters
Name Type
query string
Returns

Promise<any>

Defined in

perspectives/PerspectiveProxy.ts:120


isSubjectInstance

isSubjectInstance<T>(expression, subjectClass): Promise<boolean>

Checks if the given expression is a subject instance of the given subject class

Type parameters
Name
T
Parameters
Name Type Description
expression string The expression to be checked
subjectClass T Either a string with the name of the subject class, or an object with the properties of the subject class. In the latter case, the first subject class that matches the given properties will be used.
Returns

Promise<boolean>

Defined in

perspectives/PerspectiveProxy.ts:386


linkMutations

linkMutations(mutations): Promise<LinkExpressionMutations>

Adds and removes multiple links from this perspective *

Parameters
Name Type
mutations LinkMutations
Returns

Promise<LinkExpressionMutations>

Defined in

perspectives/PerspectiveProxy.ts:140


loadSnapshot

loadSnapshot(snapshot): Promise<void>

Take and load all the links from the given snapshot

Parameters
Name Type
snapshot Perspective
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:208


remove

remove(link): Promise<{ perspectiveRemoveLink: boolean }>

Parameters
Name Type
link LinkExpressionInput
Returns

Promise<{ perspectiveRemoveLink: boolean }>

Defined in

perspectives/PerspectiveProxy.ts:153


removeLinks(links): Promise<LinkExpression[]>

Removes multiple links from this perspective *

Parameters
Name Type
links LinkExpressionInput[]
Returns

Promise<LinkExpression[]>

Defined in

perspectives/PerspectiveProxy.ts:135


removeListener

removeListener(type, cb): Promise<void>

Removes a previously added link listener

Parameters
Name Type Description
type PerspectiveListenerTypes Can be 'link-added' or 'link-removed'
cb LinkCallback Callback function that is called when a link is added to the perspective
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:183


runFlowAction

runFlowAction(flowName, exprAddr, actionName): Promise<void>

Runs given Social DNA flow action

Parameters
Name Type
flowName string
exprAddr string
actionName string
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:297


sdnaFlows

sdnaFlows(): Promise<string[]>

Returns all the Social DNA flows defined in this perspective

Returns

Promise<string[]>

Defined in

perspectives/PerspectiveProxy.ts:259


setSdna

setSdna(sdnaCode): Promise<void>

Set the perspective's Social DNA code to the given string. This will replace all previous SDNA code elements with the new one.

Parameters
Name Type
sdnaCode string
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:307


setSingleTarget

setSingleTarget(link): Promise<void>

Convenience function to ensure there is only one link with given source and predicate This function will remove all links with the same source and predicate as the given link, and then add the given link. This ensures there is only one target for the given source and predicate.

Works best together with

Member

getSingleTarget()

Parameters
Name Type
link Link
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:243


snapshot

snapshot(): Promise<Perspective>

Create and return a snapshot of this perspective A snapshot is a rendered Perspectie object that contains all the links of the perspective.

Returns

Promise<Perspective>

Defined in

perspectives/PerspectiveProxy.ts:203


startFlow

startFlow(flowName, exprAddr): Promise<void>

Starts the Social DNA flow

Parameters
Name Type Description
flowName string on the expression
exprAddr string
Returns

Promise<void>

Defined in

perspectives/PerspectiveProxy.ts:271


stringOrTemplateObjectToSubjectClass

stringOrTemplateObjectToSubjectClass<T>(subjectClass): Promise<string>

Type parameters
Name
T
Parameters
Name Type
subjectClass T
Returns

Promise<string>

Defined in

perspectives/PerspectiveProxy.ts:345


subjectClasses

subjectClasses(): Promise<string[]>

Returns all the Subject classes defined in this perspectives SDNA

Returns

Promise<string[]>

Defined in

perspectives/PerspectiveProxy.ts:337


subjectClassesByTemplate

subjectClassesByTemplate(obj): Promise<string[]>

Returns all subject classes that match the given template object. This function looks at the properties of the template object and its setters and collections to create a Prolog query that finds all subject classes that would be converted to a proxy object with exactly the same properties and collections.

Since there could be multiple subject classes that match the given criteria, this function returns a list of class names.

Parameters
Name Type Description
obj object The template object
Returns

Promise<string[]>

Defined in

perspectives/PerspectiveProxy.ts:444


update

update(oldLink, newLink): Promise<LinkExpression>

Parameters
Name Type
oldLink LinkExpressionInput
newLink Link
Returns

Promise<LinkExpression>

Defined in

perspectives/PerspectiveProxy.ts:149

@perspect3vism/ad4m / Exports / perspectives/PerspectiveResolver / default

Class: default

perspectives/PerspectiveResolver.default

Resolver classes are used here to define the GraphQL schema (through the type-graphql annotations) and are spawned in the client tests in Ad4mClient.test.ts. For the latter, they return test fixtures.

Table of contents

Constructors

Methods

Constructors

constructor

new default()

Methods

perspective

perspective(uuid): PerspectiveHandle

Parameters
Name Type
uuid string
Returns

PerspectiveHandle

Defined in

perspectives/PerspectiveResolver.ts:44


perspectiveAdd

perspectiveAdd(name, pubSub): PerspectiveHandle

Parameters
Name Type
name string
pubSub any
Returns

PerspectiveHandle

Defined in

perspectives/PerspectiveResolver.ts:69


perspectiveAddLink(uuid, link, pubSub): LinkExpression

Parameters
Name Type
uuid string
link LinkInput
pubSub any
Returns

LinkExpression

Defined in

perspectives/PerspectiveResolver.ts:90


perspectiveAddLinkExpression

perspectiveAddLinkExpression(uuid, link, pubSub): LinkExpression

Parameters
Name Type
uuid string
link LinkExpressionInput
pubSub any
Returns

LinkExpression

Defined in

perspectives/PerspectiveResolver.ts:147


perspectiveAddLinks(uuid, links, pubSub): LinkExpression[]

Parameters
Name Type
uuid string
links LinkInput[]
pubSub any
Returns

LinkExpression[]

Defined in

perspectives/PerspectiveResolver.ts:102


perspectiveAdded

perspectiveAdded(): PerspectiveHandle

Returns

PerspectiveHandle

Defined in

perspectives/PerspectiveResolver.ts:172


perspectiveLinkAdded

perspectiveLinkAdded(uuid): LinkExpression

Parameters
Name Type
uuid string
Returns

LinkExpression

Defined in

perspectives/PerspectiveResolver.ts:188


perspectiveLinkMutations

perspectiveLinkMutations(uuid, mutations, pubSub): LinkExpressionMutations

Parameters
Name Type
uuid string
mutations LinkMutations
pubSub any
Returns

LinkExpressionMutations

Defined in

perspectives/PerspectiveResolver.ts:140


perspectiveLinkRemoved

perspectiveLinkRemoved(uuid): LinkExpression

Parameters
Name Type
uuid string
Returns

LinkExpression

Defined in

perspectives/PerspectiveResolver.ts:193


perspectiveLinkUpdated

perspectiveLinkUpdated(uuid): LinkExpressionUpdated

Parameters
Name Type
uuid string
Returns

LinkExpressionUpdated

Defined in

perspectives/PerspectiveResolver.ts:198


perspectivePublishSnapshot

perspectivePublishSnapshot(uuid): String

Parameters
Name Type
uuid string
Returns

String

Defined in

perspectives/PerspectiveResolver.ts:54


perspectiveQueryLinks(uuid, query): LinkExpression[]

Parameters
Name Type
uuid string
query LinkQuery
Returns

LinkExpression[]

Defined in

perspectives/PerspectiveResolver.ts:59


perspectiveQueryProlog

perspectiveQueryProlog(uuid, query): string

Parameters
Name Type
uuid string
query String
Returns

string

Defined in

perspectives/PerspectiveResolver.ts:64


perspectiveRemove

perspectiveRemove(uuid, pubSub): boolean

Parameters
Name Type
uuid string
pubSub any
Returns

boolean

Defined in

perspectives/PerspectiveResolver.ts:83


perspectiveRemoveLink(uuid, link, pubSub): Boolean

Parameters
Name Type
uuid string
link LinkExpressionInput
pubSub any
Returns

Boolean

Defined in

perspectives/PerspectiveResolver.ts:166


perspectiveRemoveLinks(uuid, links, pubSub): LinkExpression[]

Parameters
Name Type
uuid string
links LinkExpressionInput[]
pubSub any
Returns

LinkExpression[]

Defined in

perspectives/PerspectiveResolver.ts:121


perspectiveRemoved

perspectiveRemoved(): string

Returns

string

Defined in

perspectives/PerspectiveResolver.ts:183


perspectiveSnapshot

perspectiveSnapshot(uuid): Perspective

Parameters
Name Type
uuid string
Returns

Perspective

Defined in

perspectives/PerspectiveResolver.ts:49


perspectiveUpdate

perspectiveUpdate(uuid, name, pubSub): PerspectiveHandle

Parameters
Name Type
uuid string
name string
pubSub any
Returns

PerspectiveHandle

Defined in

perspectives/PerspectiveResolver.ts:76


perspectiveUpdateLink(uuid, oldlink, newlink, pubSub): LinkExpression

Parameters
Name Type
uuid string
oldlink LinkExpressionInput
newlink LinkInput
pubSub any
Returns

LinkExpression

Defined in

perspectives/PerspectiveResolver.ts:153


perspectiveUpdated

perspectiveUpdated(): PerspectiveHandle

Returns

PerspectiveHandle

Defined in

perspectives/PerspectiveResolver.ts:178


perspectives

perspectives(): PerspectiveHandle[]

Returns

PerspectiveHandle[]

Defined in

perspectives/PerspectiveResolver.ts:30

@perspect3vism/ad4m / Exports / runtime/RuntimeClient / RuntimeClient

Class: RuntimeClient

runtime/RuntimeClient.RuntimeClient

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new RuntimeClient(client, subscribe?)

Parameters
Name Type Default value
client ApolloClient<any> undefined
subscribe boolean true
Defined in

runtime/RuntimeClient.ts:28

Properties

#apolloClient

Private #apolloClient: ApolloClient<any>

Defined in

runtime/RuntimeClient.ts:24


#exceptionOccurredCallbacks

Private #exceptionOccurredCallbacks: ExceptionCallback[]

Defined in

runtime/RuntimeClient.ts:26


#messageReceivedCallbacks

Private #messageReceivedCallbacks: MessageCallback[]

Defined in

runtime/RuntimeClient.ts:25

Methods

addExceptionCallback

addExceptionCallback(cb): void

Parameters
Name Type
cb ExceptionCallback
Returns

void

Defined in

runtime/RuntimeClient.ts:260


addFriends

addFriends(dids): Promise<string[]>

Parameters
Name Type
dids string[]
Returns

Promise<string[]>

Defined in

runtime/RuntimeClient.ts:128


addKnownLinkLanguageTemplates

addKnownLinkLanguageTemplates(addresses): Promise<string[]>

Parameters
Name Type
addresses string[]
Returns

Promise<string[]>

Defined in

runtime/RuntimeClient.ts:99


addMessageCallback

addMessageCallback(cb): void

Parameters
Name Type
cb MessageCallback
Returns

void

Defined in

runtime/RuntimeClient.ts:241


addTrustedAgents

addTrustedAgents(agents): Promise<string[]>

Parameters
Name Type
agents string[]
Returns

Promise<string[]>

Defined in

runtime/RuntimeClient.ts:70


deleteTrustedAgents

deleteTrustedAgents(agents): Promise<string[]>

Parameters
Name Type
agents string[]
Returns

Promise<string[]>

Defined in

runtime/RuntimeClient.ts:80


friendSendMessage

friendSendMessage(did, message): Promise<boolean>

Parameters
Name Type
did string
message Perspective
Returns

Promise<boolean>

Defined in

runtime/RuntimeClient.ts:206


friendStatus

friendStatus(did): Promise<PerspectiveExpression>

Parameters
Name Type
did string
Returns

Promise<PerspectiveExpression>

Defined in

runtime/RuntimeClient.ts:196


friends

friends(): Promise<string[]>

Returns

Promise<string[]>

Defined in

runtime/RuntimeClient.ts:148


getTrustedAgents

getTrustedAgents(): Promise<string[]>

Returns

Promise<string[]>

Defined in

runtime/RuntimeClient.ts:90


hcAddAgentInfos

hcAddAgentInfos(agentInfos): Promise<void>

Parameters
Name Type
agentInfos String
Returns

Promise<void>

Defined in

runtime/RuntimeClient.ts:166


hcAgentInfos

hcAgentInfos(): Promise<String>

Returns

Promise<String>

Defined in

runtime/RuntimeClient.ts:157


info

info(): Promise<RuntimeInfo>

Returns

Promise<RuntimeInfo>

Defined in

runtime/RuntimeClient.ts:39


knownLinkLanguageTemplates

knownLinkLanguageTemplates(): Promise<string[]>

Returns

Promise<string[]>

Defined in

runtime/RuntimeClient.ts:119


messageInbox

messageInbox(filter?): Promise<PerspectiveExpression[]>

Parameters
Name Type
filter? string
Returns

Promise<PerspectiveExpression[]>

Defined in

runtime/RuntimeClient.ts:216


messageOutbox

messageOutbox(filter?): Promise<SentMessage[]>

Parameters
Name Type
filter? string
Returns

Promise<SentMessage[]>

Defined in

runtime/RuntimeClient.ts:226


openLink(url): Promise<Boolean>

Parameters
Name Type
url string
Returns

Promise<Boolean>

Defined in

runtime/RuntimeClient.ts:60


quit

quit(): Promise<Boolean>

Returns

Promise<Boolean>

Defined in

runtime/RuntimeClient.ts:52


removeFriends

removeFriends(dids): Promise<string[]>

Parameters
Name Type
dids string[]
Returns

Promise<string[]>

Defined in

runtime/RuntimeClient.ts:138


removeKnownLinkLanguageTemplates

removeKnownLinkLanguageTemplates(addresses): Promise<string[]>

Parameters
Name Type
addresses string[]
Returns

Promise<string[]>

Defined in

runtime/RuntimeClient.ts:109


setStatus

setStatus(perspective): Promise<boolean>

Parameters
Name Type
perspective Perspective
Returns

Promise<boolean>

Defined in

runtime/RuntimeClient.ts:186


subscribeExceptionOccurred

subscribeExceptionOccurred(): void

Returns

void

Defined in

runtime/RuntimeClient.ts:264


subscribeMessageReceived

subscribeMessageReceived(): void

Returns

void

Defined in

runtime/RuntimeClient.ts:245


verifyStringSignedByDid

verifyStringSignedByDid(did, didSigningKeyId, data, signedData): Promise<boolean>

Parameters
Name Type
did string
didSigningKeyId string
data string
signedData string
Returns

Promise<boolean>

Defined in

runtime/RuntimeClient.ts:176

@perspect3vism/ad4m / Exports / runtime/RuntimeResolver / ExceptionInfo

Class: ExceptionInfo

runtime/RuntimeResolver.ExceptionInfo

Table of contents

Constructors

Properties

Constructors

constructor

new ExceptionInfo()

Properties

addon

Optional addon: string

Defined in

runtime/RuntimeResolver.ts:54


message

message: string

Defined in

runtime/RuntimeResolver.ts:50


title

title: string

Defined in

runtime/RuntimeResolver.ts:48


type

type: ExceptionType

Defined in

runtime/RuntimeResolver.ts:52

@perspect3vism/ad4m / Exports / runtime/RuntimeResolver / RuntimeInfo

Class: RuntimeInfo

runtime/RuntimeResolver.RuntimeInfo

Table of contents

Constructors

Properties

Constructors

constructor

new RuntimeInfo()

Properties

ad4mExecutorVersion

ad4mExecutorVersion: string

Defined in

runtime/RuntimeResolver.ts:38


isInitialized

isInitialized: Boolean

Defined in

runtime/RuntimeResolver.ts:40


isUnlocked

isUnlocked: Boolean

Defined in

runtime/RuntimeResolver.ts:42

@perspect3vism/ad4m / Exports / runtime/RuntimeResolver / SentMessage

Class: SentMessage

runtime/RuntimeResolver.SentMessage

Table of contents

Constructors

Properties

Constructors

constructor

new SentMessage()

Properties

message

message: PerspectiveExpression

Defined in

runtime/RuntimeResolver.ts:32


recipient

recipient: string

Defined in

runtime/RuntimeResolver.ts:30

@perspect3vism/ad4m / Exports / runtime/RuntimeResolver / default

Class: default

runtime/RuntimeResolver.default

Resolver classes are used here to define the GraphQL schema (through the type-graphql annotations) and are spawned in the client tests in Ad4mClient.test.ts. For the latter, they return test fixtures.

Table of contents

Constructors

Methods

Constructors

constructor

new default()

Methods

addTrustedAgents

addTrustedAgents(agents): string[]

Parameters
Name Type
agents string[]
Returns

string[]

Defined in

runtime/RuntimeResolver.ts:84


deleteTrustedAgents

deleteTrustedAgents(agents): string[]

Parameters
Name Type
agents string[]
Returns

string[]

Defined in

runtime/RuntimeResolver.ts:89


exceptionOccurred

exceptionOccurred(): ExceptionInfo

Returns

ExceptionInfo

Defined in

runtime/RuntimeResolver.ts:185


getTrustedAgents

getTrustedAgents(): string[]

Returns

string[]

Defined in

runtime/RuntimeResolver.ts:94


runtimeAddFriends

runtimeAddFriends(dids): string[]

Parameters
Name Type
dids string[]
Returns

string[]

Defined in

runtime/RuntimeResolver.ts:119


runtimeAddKnownLinkLanguageTemplates

runtimeAddKnownLinkLanguageTemplates(addresses): string[]

Parameters
Name Type
addresses string[]
Returns

string[]

Defined in

runtime/RuntimeResolver.ts:104


runtimeFriendSendMessage

runtimeFriendSendMessage(did, message): boolean

Parameters
Name Type
did string
message PerspectiveInput
Returns

boolean

Defined in

runtime/RuntimeResolver.ts:158


runtimeFriendStatus

runtimeFriendStatus(did): PerspectiveExpression

Parameters
Name Type
did string
Returns

PerspectiveExpression

Defined in

runtime/RuntimeResolver.ts:153


runtimeFriends

runtimeFriends(): string[]

Returns

string[]

Defined in

runtime/RuntimeResolver.ts:114


runtimeHcAddAgentInfos

runtimeHcAddAgentInfos(agentInfos): boolean

Parameters
Name Type
agentInfos any
Returns

boolean

Defined in

runtime/RuntimeResolver.ts:134


runtimeHcAgentInfos

runtimeHcAgentInfos(): String

Returns

String

Defined in

runtime/RuntimeResolver.ts:129


runtimeInfo

runtimeInfo(): RuntimeInfo

Returns

RuntimeInfo

Defined in

runtime/RuntimeResolver.ts:75


runtimeKnownLinkLanguageTemplates

runtimeKnownLinkLanguageTemplates(): string[]

Returns

string[]

Defined in

runtime/RuntimeResolver.ts:99


runtimeMessageInbox

runtimeMessageInbox(filter?): PerspectiveExpression[]

Parameters
Name Type
filter? string
Returns

PerspectiveExpression[]

Defined in

runtime/RuntimeResolver.ts:166


runtimeMessageOutbox

runtimeMessageOutbox(filter?): SentMessage[]

Parameters
Name Type
filter? string
Returns

SentMessage[]

Defined in

runtime/RuntimeResolver.ts:171


runtimeMessageReceived

runtimeMessageReceived(): PerspectiveExpression

Returns

PerspectiveExpression

Defined in

runtime/RuntimeResolver.ts:180


runtimeOpenLink(url): Boolean

Parameters
Name Type
url string
Returns

Boolean

Defined in

runtime/RuntimeResolver.ts:70


runtimeQuit

runtimeQuit(): Boolean

Returns

Boolean

Defined in

runtime/RuntimeResolver.ts:65


runtimeRemoveFriends

runtimeRemoveFriends(dids): string[]

Parameters
Name Type
dids string[]
Returns

string[]

Defined in

runtime/RuntimeResolver.ts:124


runtimeRemoveKnownLinkLanguageTemplates

runtimeRemoveKnownLinkLanguageTemplates(addresses): string[]

Parameters
Name Type
addresses string[]
Returns

string[]

Defined in

runtime/RuntimeResolver.ts:109


runtimeSetStatus

runtimeSetStatus(status): boolean

Parameters
Name Type
status Perspective
Returns

boolean

Defined in

runtime/RuntimeResolver.ts:148


runtimeVerifyStringSignedByDid

runtimeVerifyStringSignedByDid(did, didSigningKeyId, data, signedData): boolean

Parameters
Name Type
did string
didSigningKeyId string
data string
signedData string
Returns

boolean

Defined in

runtime/RuntimeResolver.ts:139

@perspect3vism/ad4m / Exports / subject/SDNADecorators / PerspectiveAction

Class: PerspectiveAction

subject/SDNADecorators.PerspectiveAction

Table of contents

Constructors

Properties

Constructors

constructor

new PerspectiveAction()

Properties

action

action: string

Defined in

subject/SDNADecorators.ts:6


predicate

predicate: string

Defined in

subject/SDNADecorators.ts:8


source

source: string

Defined in

subject/SDNADecorators.ts:7


target

target: string

Defined in

subject/SDNADecorators.ts:9

@perspect3vism/ad4m / Exports / subject/Subject / Subject

Class: Subject

subject/Subject.Subject

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Subject(perspective, baseExpression, subjectClass)

Parameters
Name Type
perspective PerspectiveProxy
baseExpression string
subjectClass string
Defined in

subject/Subject.ts:9

Properties

#baseExpression

Private #baseExpression: string

Defined in

subject/Subject.ts:5


#perspective

Private #perspective: PerspectiveProxy

Defined in

subject/Subject.ts:7


#subjectClass

Private #subjectClass: string

Defined in

subject/Subject.ts:6

Accessors

baseExpression

get baseExpression(): string

Returns

string

Defined in

subject/Subject.ts:15

Methods

init

init(): Promise<void>

Returns

Promise<void>

Defined in

subject/Subject.ts:19

Enums

@perspect3vism/ad4m / Exports / Exception / ExceptionType

Enumeration: ExceptionType

Exception.ExceptionType

Table of contents

Enumeration Members

Enumeration Members

AgentIsUntrusted

AgentIsUntrusted = 2

Defined in

Exception.ts:4


CapabilityRequested

CapabilityRequested = 3

Defined in

Exception.ts:5


ExpressionIsNotVerified

ExpressionIsNotVerified = 1

Defined in

Exception.ts:3


LanguageIsNotLoaded

LanguageIsNotLoaded = 0

Defined in

Exception.ts:2

@perspect3vism/ad4m / Exports / perspectives/PerspectiveHandle / PerspectiveState

Enumeration: PerspectiveState

perspectives/PerspectiveHandle.PerspectiveState

Table of contents

Enumeration Members

Enumeration Members

LinkLanguageFailedToInstall

LinkLanguageFailedToInstall = "LinkLanguageFailedToInstall"

Defined in

perspectives/PerspectiveHandle.ts:7


LinkLanguageInstalledButNotSynced

LinkLanguageInstalledButNotSynced = "LinkLanguageInstalledButNotSynced"

Defined in

perspectives/PerspectiveHandle.ts:8


NeighbourhoodJoinInitiated

NeighbourhoodJoinInitiated = "NeighbourhoodJoinInitiated"

Defined in

perspectives/PerspectiveHandle.ts:6


Private

Private = "Private"

Defined in

perspectives/PerspectiveHandle.ts:5


Synced

Synced = "Synced"

Defined in

perspectives/PerspectiveHandle.ts:9

Interfaces

@perspect3vism/ad4m / Exports / agent/AgentClient / InitializeArgs

Interface: InitializeArgs

agent/AgentClient.InitializeArgs

Table of contents

Properties

Properties

did

did: string

Defined in

agent/AgentClient.ts:66


didDocument

didDocument: string

Defined in

agent/AgentClient.ts:67


keystore

keystore: string

Defined in

agent/AgentClient.ts:68


passphrase

passphrase: string

Defined in

agent/AgentClient.ts:69

@perspect3vism/ad4m / Exports / language/Language / DirectMessageAdapter

Interface: DirectMessageAdapter

language/Language.DirectMessageAdapter

Table of contents

Methods

Methods

addMessageCallback

addMessageCallback(callback): any

Parameters
Name Type
callback MessageCallback
Returns

any

Defined in

language/Language.ts:198


inbox

inbox(filter?): Promise<PerspectiveExpression[]>

Parameters
Name Type
filter? string
Returns

Promise<PerspectiveExpression[]>

Defined in

language/Language.ts:197


recipient

recipient(): string

Returns

string

Defined in

language/Language.ts:190


sendInbox

sendInbox(message): Promise<void | PerspectiveExpression>

Parameters
Name Type
message Perspective
Returns

Promise<void | PerspectiveExpression>

Defined in

language/Language.ts:194


sendP2P

sendP2P(message): Promise<void | PerspectiveExpression>

Parameters
Name Type
message Perspective
Returns

Promise<void | PerspectiveExpression>

Defined in

language/Language.ts:193


setStatus

setStatus(status): any

Parameters
Name Type
status PerspectiveExpression
Returns

any

Defined in

language/Language.ts:196


status

status(): Promise<void | PerspectiveExpression>

Returns

Promise<void | PerspectiveExpression>

Defined in

language/Language.ts:192

@perspect3vism/ad4m / Exports / language/Language / ExpressionAdapter

Interface: ExpressionAdapter

language/Language.ExpressionAdapter

Interface for the most common Expression Languages

Table of contents

Properties

Methods

Properties

putAdapter

putAdapter: PublicSharing | ReadOnlyLanguage

Strategy for putting an expression with needs to be different for those two cases:

  1. PublicSharing means that this language supports the creation and sharing of Expressions, which is the common use-case
  2. ReadOnlyLanguage means that the Language implements a pre-defined set of expressions (which can be infinite or finite). For example the url-iframe Language which directly maps URLs to addresses - meaning every well formed URL is an address in this Language. Or a potential Language implementing the verbs/predicates of a spec like FOAF.
Defined in

language/Language.ts:105

Methods

get

get(address): Promise<Expression>

Returns an Expression by address, or null if there is no Expression with that given address

Parameters
Name Type
address string
Returns

Promise<Expression>

Defined in

language/Language.ts:92

@perspect3vism/ad4m / Exports / language/Language / ExpressionUI

Interface: ExpressionUI

language/Language.ExpressionUI

UI factories returning web components

Table of contents

Methods

Methods

constructorIcon

constructorIcon(): string

Returns JS code of a web component used to create new expressions

Returns

string

Defined in

language/Language.ts:81


icon

icon(): string

Returns JS code of a web component that renders the given expression

Returns

string

Defined in

language/Language.ts:79

@perspect3vism/ad4m / Exports / language/Language / GetAllAdapter

Interface: GetAllAdapter

language/Language.GetAllAdapter

Table of contents

Methods

Methods

getAll

getAll(filter, count, page): Promise<Expression[]>

Parameters
Name Type
filter any
count number
page number
Returns

Promise<Expression[]>

Defined in

language/Language.ts:147

@perspect3vism/ad4m / Exports / language/Language / GetByAuthorAdapter

Interface: GetByAuthorAdapter

language/Language.GetByAuthorAdapter

Table of contents

Methods

Methods

getByAuthor

getByAuthor(author, count, page): Promise<Expression[]>

Parameters
Name Type
author string
count number
page number
Returns

Promise<Expression[]>

Defined in

language/Language.ts:138

@perspect3vism/ad4m / Exports / language/Language / Interaction

Interface: Interaction

language/Language.Interaction

Table of contents

Properties

Methods

Properties

label

Readonly label: string

Defined in

language/Language.ts:222


name

Readonly name: string

Defined in

language/Language.ts:223


parameters

Readonly parameters: InteractionParameter[]

Defined in

language/Language.ts:224

Methods

execute

execute(parameters): Promise<string>

Parameters
Name Type
parameters object
Returns

Promise<string>

Defined in

language/Language.ts:225

@perspect3vism/ad4m / Exports / language/Language / Language

Interface: Language

language/Language.Language

Interface of AD4M Languages

Any JavaScript module that implements a create() function that returns an object that implements this interface is a valid AD4M language. So the AD4M-internal representation of a language is an object that implements this interface.

Since there are a few different kinds of languages, this interface is split into optional sub-interfaces. The only required property is the name of the language.

The most usual kind of language is the "Expression Language", which is a language that can be used to create and share Expressions. For that, implement the expressionsAdapter and expressionUI interface.

The second most common kind of language is the "Link Language", which is a language that builds the core of AD4M Neighbourhoods. For that, implement the linksAdapter interface.

Table of contents

Properties

Methods

Properties

directMessageAdapter

Optional Readonly directMessageAdapter: DirectMessageAdapter

Optional adapter for direct messaging between agents

Defined in

language/Language.ts:64


expressionAdapter

Optional Readonly expressionAdapter: ExpressionAdapter

ExpressionAdapter implements means of getting an Expression by address and putting an expression

Defined in

language/Language.ts:38


expressionUI

Optional Readonly expressionUI: ExpressionUI

Interface for getting UI/web components for rendering Expressions of this Language

Defined in

language/Language.ts:41


getAllAdapter

Optional Readonly getAllAdapter: GetAllAdapter

Optional adapter for getting all Expressions

Defined in

language/Language.ts:61


getByAuthorAdapter

Optional Readonly getByAuthorAdapter: GetByAuthorAdapter

Optional adapter for getting Expressions by author

Defined in

language/Language.ts:59


languageAdapter

Optional Readonly languageAdapter: LanguageAdapter

Implementation of a Language that defines and stores Languages

Defined in

language/Language.ts:56


linksAdapter

Optional Readonly linksAdapter: LinkSyncAdapter

Interface of LinkLanguages for the core implementation of Neighbourhoods

Defined in

language/Language.ts:44


name

Readonly name: string

Defined in

language/Language.ts:26


settingsUI

Optional Readonly settingsUI: SettingsUI

Interface for providing UI components for the settings of this Language

Defined in

language/Language.ts:67


teardown

Optional Readonly teardown: () => void

Type declaration

▸ (): void

Optional function to make any cleanup/teardown if your language gets deleting in the ad4m-executor

Returns

void

Defined in

language/Language.ts:70


telepresenceAdapter

Optional Readonly telepresenceAdapter: TelepresenceAdapter

Additional Interface of LinkLanguages that support telepresence features, that is:

  • seeing who is online and getting a status
  • sending/receiveing p2p signals to other online agents without affecting the shared Perspective of the Neighbourhood (see TelepresenceAdapter for more details)
Defined in

language/Language.ts:53

Methods

interactions

interactions(expression): Interaction[]

All available interactions this agent could execute on given expression

Parameters
Name Type
expression string
Returns

Interaction[]

Defined in

language/Language.ts:73


isImmutableExpression

Optional isImmutableExpression(expression): boolean

Flagging expressions as immutable to enable expression caching in the ad4m-executor

Parameters
Name Type
expression string
Returns

boolean

Defined in

language/Language.ts:31

@perspect3vism/ad4m / Exports / language/Language / LanguageAdapter

Interface: LanguageAdapter

language/Language.LanguageAdapter

Table of contents

Methods

Methods

getLanguageSource

getLanguageSource(address): Promise<string>

Parameters
Name Type
address string
Returns

Promise<string>

Defined in

language/Language.ts:131

@perspect3vism/ad4m / Exports / language/Language / LinkSyncAdapter

Interface: LinkSyncAdapter

language/Language.LinkSyncAdapter

Interface for "Link Languages" that facilitate the synchronization between agents' local Perspectives inside a Neighbourhood. The assumption is that every version of the shared Perspective is labeled with a unique revision string. Changes are committed and retrieved through diffs. Think of a LinkSyncAdapter as a git branch to which agents commit their changes to and pull diffs from their current revision to the latest one.

Table of contents

Methods

Methods

addCallback

addCallback(callback): any

Get push notification when a diff got published

Parameters
Name Type
callback PerspectiveDiffObserver
Returns

any

Defined in

language/Language.ts:184


commit

commit(diff): Promise<string>

Publish changes

Parameters
Name Type
diff PerspectiveDiff
Returns

Promise<string>

Defined in

language/Language.ts:181


currentRevision

currentRevision(): Promise<string>

What revision are we on now -> what changes are included in output of render()

Returns

Promise<string>

Defined in

language/Language.ts:172


latestRevision

latestRevision(): Promise<string>

Call this to check if there are new changes (compare returned revision with last one that was pulled)

Returns

Promise<string>

Defined in

language/Language.ts:169


others

others(): Promise<string[]>

Returns

Promise<string[]>

Defined in

language/Language.ts:164


public

public(): boolean

Returns

boolean

Defined in

language/Language.ts:163


pull

pull(): Promise<PerspectiveDiff>

Check for and get new changes

Returns

Promise<PerspectiveDiff>

Defined in

language/Language.ts:175


render

render(): Promise<Perspective>

Returns the full, rendered Perspective at currentRevision

Returns

Promise<Perspective>

Defined in

language/Language.ts:178


writable

writable(): boolean

Returns

boolean

Defined in

language/Language.ts:162

@perspect3vism/ad4m / Exports / language/Language / PublicSharing

Interface: PublicSharing

language/Language.PublicSharing

Implement this interface if your Language supports creation of sharing of Expressions. See ExpressionAdapter

Table of contents

Methods

Methods

createPublic

createPublic(content): Promise<string>

Create an Expression and shares it. Return the Expression's address.

Parameters
Name Type Description
content object is the object created by the constructorIcon component
Returns

Promise<string>

Defined in

language/Language.ts:117

@perspect3vism/ad4m / Exports / language/Language / ReadOnlyLanguage

Interface: ReadOnlyLanguage

language/Language.ReadOnlyLanguage

Implement this interface if your Language is defined over a static set of pre-defined Expressions.

Table of contents

Methods

Methods

addressOf

addressOf(content): Promise<string>

This just calculates the address of an object

Parameters
Name Type Description
content object is the object created by the constructorIcon component
Returns

Promise<string>

Defined in

language/Language.ts:127

@perspect3vism/ad4m / Exports / language/Language / SettingsUI

Interface: SettingsUI

language/Language.SettingsUI

Table of contents

Methods

Methods

settingsIcon

settingsIcon(): string

Returns

string

Defined in

language/Language.ts:85

@perspect3vism/ad4m / Exports / language/Language / TelepresenceAdapter

Interface: TelepresenceAdapter

language/Language.TelepresenceAdapter

Table of contents

Methods

Methods

getOnlineAgents

getOnlineAgents(): Promise<OnlineAgent[]>

Returns

Promise<OnlineAgent[]>

Defined in

language/Language.ts:256


registerSignalCallback

registerSignalCallback(callback): Promise<void>

Parameters
Name Type
callback TelepresenceSignalCallback
Returns

Promise<void>

Defined in

language/Language.ts:260


sendBroadcast

sendBroadcast(payload): Promise<object>

Parameters
Name Type
payload PerspectiveExpression
Returns

Promise<object>

Defined in

language/Language.ts:259


sendSignal

sendSignal(remoteAgentDid, payload): Promise<object>

Parameters
Name Type
remoteAgentDid string
payload PerspectiveExpression
Returns

Promise<object>

Defined in

language/Language.ts:258


setOnlineStatus

setOnlineStatus(status): Promise<void>

Parameters
Name Type
status PerspectiveExpression
Returns

Promise<void>

Defined in

language/Language.ts:255

@perspect3vism/ad4m / Exports / language/LanguageContext / AgentService

Interface: AgentService

language/LanguageContext.AgentService

Table of contents

Properties

Methods

Properties

did

Readonly did: string

Defined in

language/LanguageContext.ts:6

Methods

createSignedExpression

createSignedExpression(data): Expression

Parameters
Name Type
data any
Returns

Expression

Defined in

language/LanguageContext.ts:7

@perspect3vism/ad4m / Exports / language/LanguageContext / HolochainLanguageDelegate

Interface: HolochainLanguageDelegate

language/LanguageContext.HolochainLanguageDelegate

Table of contents

Methods

Methods

call

call(dnaNick, zomeName, fnName, params): Promise<any>

Makes a single call to a given holochain DNA. Underlying implementation puts these calls into a sync fifo queue

Parameters
Name Type
dnaNick string
zomeName string
fnName string
params string \ object
Returns

Promise<any>

Defined in

language/LanguageContext.ts:34


callAsync

callAsync(calls, timeoutMs?): Promise<any[]>

Makes all supplied calls in parallel to the provided holochain dna... Should only be called on read operations to avoid source chain async mutation errors

Parameters
Name Type
calls { dnaNick: string ; fnName: string ; params: string \ object ; zomeName: string }[]
timeoutMs? number
Returns

Promise<any[]>

Defined in

language/LanguageContext.ts:36


registerDNAs

registerDNAs(dnas, holochainSignalCallback?): Promise<void>

Installs/registers a given DNA in the ad4m-executor

Parameters
Name Type
dnas Dna[]
holochainSignalCallback? AppSignalCb
Returns

Promise<void>

Defined in

language/LanguageContext.ts:32

@perspect3vism/ad4m / Exports / language/LanguageContext / LanguageContext

Interface: LanguageContext

language/LanguageContext.LanguageContext

Table of contents

Properties

Properties

Holochain

Holochain: HolochainLanguageDelegate

Defined in

language/LanguageContext.ts:20


IPFS

IPFS: IPFS<{}>

Defined in

language/LanguageContext.ts:16


ad4mSignal

ad4mSignal: Ad4mSignalCB

Defined in

language/LanguageContext.ts:21


agent

agent: AgentService

Defined in

language/LanguageContext.ts:15


customSettings

customSettings: object

Defined in

language/LanguageContext.ts:19


signatures

signatures: SignaturesService

Defined in

language/LanguageContext.ts:17


storageDirectory

storageDirectory: string

Defined in

language/LanguageContext.ts:18

@perspect3vism/ad4m / Exports / language/LanguageContext / SignaturesService

Interface: SignaturesService

language/LanguageContext.SignaturesService

Table of contents

Methods

Methods

verify

verify(expr): boolean

Parameters
Name Type
expr Expression
Returns

boolean

Defined in

language/LanguageContext.ts:11

@perspect3vism/ad4m / Exports

@perspect3vism/ad4m

Table of contents

Modules

Modules

@perspect3vism/ad4m / Exports / Ad4mClient

Module: Ad4mClient

Table of contents

Classes

@perspect3vism/ad4m / Exports / Address

Module: Address

Table of contents

Type Aliases

Type Aliases

Address

Ƭ Address: string

Defined in

Address.ts:1

@perspect3vism/ad4m / Exports / DID

Module: DID

Table of contents

Type Aliases

Type Aliases

DID

Ƭ DID: string

Defined in

DID.ts:1

@perspect3vism/ad4m / Exports / Exception

Module: Exception

Table of contents

Enumerations

@perspect3vism/ad4m / Exports / Literal

Module: Literal

Table of contents

Classes

@perspect3vism/ad4m / Exports / PubSub

Module: PubSub

Table of contents

Variables

Variables

AGENT_STATUS_CHANGED

Const AGENT_STATUS_CHANGED: "agent-status-changed-topic"

Defined in

PubSub.ts:2


AGENT_UPDATED

Const AGENT_UPDATED: "agent-updated-topic"

Defined in

PubSub.ts:1


DIRECT_MESSAGE_RECEIVED

Const DIRECT_MESSAGE_RECEIVED: "direct-message-received-topic"

Defined in

PubSub.ts:3


EXCEPTION_OCCURRED_TOPIC

Const EXCEPTION_OCCURRED_TOPIC: "exception-occurred-topic"

Defined in

PubSub.ts:11


LINK_ADDED_TOPIC

Const LINK_ADDED_TOPIC: "link-added-topic"

Defined in

PubSub.ts:7


LINK_REMOVED_TOPIC

Const LINK_REMOVED_TOPIC: "link-removed-topic"

Defined in

PubSub.ts:8


LINK_UDATED_TOPIC

Const LINK_UDATED_TOPIC: "link-updated-topic"

Defined in

PubSub.ts:9


NEIGHBOURHOOD_SIGNAL_RECEIVED_TOPIC

Const NEIGHBOURHOOD_SIGNAL_RECEIVED_TOPIC: "neighbourhood-signal-received-topic"

Defined in

PubSub.ts:12


PERSPECTIVE_ADDED_TOPIC

Const PERSPECTIVE_ADDED_TOPIC: "perspective-added-topic"

Defined in

PubSub.ts:4


PERSPECTIVE_REMOVED_TOPIC

Const PERSPECTIVE_REMOVED_TOPIC: "perspective-removed-topic"

Defined in

PubSub.ts:6


PERSPECTIVE_UPDATED_TOPIC

Const PERSPECTIVE_UPDATED_TOPIC: "perspective-updated-topic"

Defined in

PubSub.ts:5


SIGNAL

Const SIGNAL: "signal"

Defined in

PubSub.ts:10

@perspect3vism/ad4m / Exports / SmartLiteral

Module: SmartLiteral

Table of contents

Classes

Variables

Variables

SMART_LITERAL_CONTENT_PREDICATE

Const SMART_LITERAL_CONTENT_PREDICATE: "smart_literal://content"

Defined in

SmartLiteral.ts:6

@perspect3vism/ad4m / Exports / agent/Agent

Module: agent/Agent

Table of contents

Classes

@perspect3vism/ad4m / Exports / agent/AgentClient

Module: agent/AgentClient

Table of contents

Classes

Interfaces

Type Aliases

Type Aliases

AgentStatusChangedCallback

Ƭ AgentStatusChangedCallback: (agent: Agent) => null

Type declaration

▸ (agent): null

Parameters
Name Type
agent Agent
Returns

null

Defined in

agent/AgentClient.ts:73


AgentUpdatedCallback

Ƭ AgentUpdatedCallback: (agent: Agent) => null

Type declaration

▸ (agent): null

Parameters
Name Type
agent Agent
Returns

null

Defined in

agent/AgentClient.ts:72

@perspect3vism/ad4m / Exports / agent/AgentResolver

Module: agent/AgentResolver

Table of contents

Classes

Variables

Variables

TEST_AGENT_DID

Const TEST_AGENT_DID: "did:ad4m:test"

Defined in

agent/AgentResolver.ts:7

@perspect3vism/ad4m / Exports / agent/AgentStatus

Module: agent/AgentStatus

Table of contents

Classes

@perspect3vism/ad4m / Exports / buildSchema

Module: buildSchema

@perspect3vism/ad4m / Exports / expression/Expression

Module: expression/Expression

Table of contents

Classes

Functions

Functions

ExpressionGeneric

ExpressionGeneric<DataType>(DataTypeClass): any

Type parameters
Name
DataType
Parameters
Name Type
DataTypeClass ClassType<DataType>
Returns

any

Defined in

expression/Expression.ts:42


ExpressionGenericInput

ExpressionGenericInput<DataType>(DataTypeClass): any

Type parameters
Name
DataType
Parameters
Name Type
DataTypeClass ClassType<DataType>
Returns

any

Defined in

expression/Expression.ts:67


isExpression

isExpression(e): boolean

Parameters
Name Type
e any
Returns

boolean

Defined in

expression/Expression.ts:97

@perspect3vism/ad4m / Exports / expression/ExpressionClient

Module: expression/ExpressionClient

Table of contents

Classes

@perspect3vism/ad4m / Exports / expression/ExpressionRef

Module: expression/ExpressionRef

Table of contents

Classes

Functions

Functions

exprRef2String

exprRef2String(ref): string

Parameters
Name Type
ref ExpressionRef
Returns

string

Defined in

expression/ExpressionRef.ts:22


parseExprUrl

parseExprUrl(url): ExpressionRef

Parameters
Name Type
url string
Returns

ExpressionRef

Defined in

expression/ExpressionRef.ts:29

@perspect3vism/ad4m / Exports / expression/ExpressionResolver

Module: expression/ExpressionResolver

Table of contents

Classes

@perspect3vism/ad4m / Exports / jestSetup

Module: jestSetup

@perspect3vism/ad4m / Exports / language/Icon

Module: language/Icon

Table of contents

Classes

@perspect3vism/ad4m / Exports / language/Language

Module: language/Language

Table of contents

Classes

Interfaces

Type Aliases

Type Aliases

MessageCallback

Ƭ MessageCallback: (message: PerspectiveExpression) => void

Type declaration

▸ (message): void

Parameters
Name Type
message PerspectiveExpression
Returns

void

Defined in

language/Language.ts:187


PerspectiveDiffObserver

Ƭ PerspectiveDiffObserver: (diff: PerspectiveDiff) => void

Type declaration

▸ (diff): void

Parameters
Name Type
diff PerspectiveDiff
Returns

void

Defined in

language/Language.ts:150


StatusCallback

Ƭ StatusCallback: (caller: DID) => Perspective

Type declaration

▸ (caller): Perspective

Parameters
Name Type
caller DID
Returns

Perspective

Defined in

language/Language.ts:188


TelepresenceSignalCallback

Ƭ TelepresenceSignalCallback: (payload: PerspectiveExpression) => void

Type declaration

▸ (payload): void

Parameters
Name Type
payload PerspectiveExpression
Returns

void

Defined in

language/Language.ts:253

@perspect3vism/ad4m / Exports / language/LanguageClient

Module: language/LanguageClient

Table of contents

Classes

@perspect3vism/ad4m / Exports / language/LanguageContext

Module: language/LanguageContext

Table of contents

Classes

Interfaces

Type Aliases

Type Aliases

Ad4mSignalCB

Ƭ Ad4mSignalCB: (signal: any) => void

Type declaration

▸ (signal): void

Parameters
Name Type
signal any
Returns

void

Defined in

language/LanguageContext.ts:39

@perspect3vism/ad4m / Exports / language/LanguageHandle

Module: language/LanguageHandle

Table of contents

Classes

@perspect3vism/ad4m / Exports / language/LanguageMeta

Module: language/LanguageMeta

Table of contents

Classes

@perspect3vism/ad4m / Exports / language/LanguageRef

Module: language/LanguageRef

Table of contents

Classes

@perspect3vism/ad4m / Exports / language/LanguageResolver

Module: language/LanguageResolver

Table of contents

Classes

@perspect3vism/ad4m / Exports / links/Links

Table of contents

Classes

Functions

Functions

isLink(l): boolean

Parameters
Name Type
l any
Returns

boolean

Defined in

links/Links.ts:82


linkEqual

linkEqual(l1, l2): boolean

Parameters
Name Type
l1 LinkExpression
l2 LinkExpression
Returns

boolean

Defined in

links/Links.ts:74

@perspect3vism/ad4m / Exports / neighbourhood/Neighbourhood

Module: neighbourhood/Neighbourhood

Table of contents

Classes

@perspect3vism/ad4m / Exports / neighbourhood/NeighbourhoodClient

Module: neighbourhood/NeighbourhoodClient

Table of contents

Classes

@perspect3vism/ad4m / Exports / neighbourhood/NeighbourhoodProxy

Module: neighbourhood/NeighbourhoodProxy

Table of contents

Classes

@perspect3vism/ad4m / Exports / neighbourhood/NeighbourhoodResolver

Module: neighbourhood/NeighbourhoodResolver

Table of contents

Classes

@perspect3vism/ad4m / Exports / perspectives/LinkQuery

Module: perspectives/LinkQuery

Table of contents

Classes

@perspect3vism/ad4m / Exports / perspectives/Perspective

Module: perspectives/Perspective

Table of contents

Classes

@perspect3vism/ad4m / Exports / perspectives/PerspectiveClient

Module: perspectives/PerspectiveClient

Table of contents

Classes

Type Aliases

Type Aliases

LinkCallback

Ƭ LinkCallback: (link: LinkExpression) => null

Type declaration

▸ (link): null

Parameters
Name Type
link LinkExpression
Returns

null

Defined in

perspectives/PerspectiveClient.ts:41


PerspectiveHandleCallback

Ƭ PerspectiveHandleCallback: (perspective: PerspectiveHandle) => null

Type declaration

▸ (perspective): null

Parameters
Name Type
perspective PerspectiveHandle
Returns

null

Defined in

perspectives/PerspectiveClient.ts:39


UuidCallback

Ƭ UuidCallback: (uuid: string) => null

Type declaration

▸ (uuid): null

Parameters
Name Type
uuid string
Returns

null

Defined in

perspectives/PerspectiveClient.ts:40

@perspect3vism/ad4m / Exports / perspectives/PerspectiveDiff

Module: perspectives/PerspectiveDiff

Table of contents

Classes

@perspect3vism/ad4m / Exports / perspectives/PerspectiveHandle

Module: perspectives/PerspectiveHandle

Table of contents

Enumerations

Classes

@perspect3vism/ad4m / Exports / perspectives/PerspectiveProxy

Module: perspectives/PerspectiveProxy

Table of contents

Classes

@perspect3vism/ad4m / Exports / perspectives/PerspectiveResolver

Module: perspectives/PerspectiveResolver

Table of contents

Classes

Variables

Variables

Const testLink: LinkExpression

Defined in

perspectives/PerspectiveResolver.ts:9

@perspect3vism/ad4m / Exports / runtime/RuntimeClient

Module: runtime/RuntimeClient

Table of contents

Classes

Type Aliases

Type Aliases

ExceptionCallback

Ƭ ExceptionCallback: (info: ExceptionInfo) => null

Type declaration

▸ (info): null

Parameters
Name Type
info ExceptionInfo
Returns

null

Defined in

runtime/RuntimeClient.ts:21


MessageCallback

Ƭ MessageCallback: (message: PerspectiveExpression) => null

Type declaration

▸ (message): null

Parameters
Name Type
message PerspectiveExpression
Returns

null

Defined in

runtime/RuntimeClient.ts:20

@perspect3vism/ad4m / Exports / runtime/RuntimeResolver

Module: runtime/RuntimeResolver

Table of contents

Classes

@perspect3vism/ad4m / Exports / subject/SDNADecorators

Module: subject/SDNADecorators

Table of contents

Classes

Functions

Functions

SDNAClass

SDNAClass(opts): (target: any) => void

Parameters
Name Type
opts SDNAClassOptions
Returns

fn

▸ (target): void

Parameters
Name Type
target any
Returns

void

Defined in

subject/SDNADecorators.ts:153


addLink(source, predicate, target): PerspectiveAction

Parameters
Name Type
source string
predicate string
target string
Returns

PerspectiveAction

Defined in

subject/SDNADecorators.ts:12


hasLink(predicate): string

Parameters
Name Type
predicate string
Returns

string

Defined in

subject/SDNADecorators.ts:21


instanceQuery

instanceQuery(options?): (target: T, key: keyof T, descriptor: PropertyDescriptor) => void

Parameters
Name Type
options? InstanceQueryParams
Returns

fn

▸ <T>(target, key, descriptor): void

Type parameters
Name
T
Parameters
Name Type
target T
key keyof T
descriptor PropertyDescriptor
Returns

void

Defined in

subject/SDNADecorators.ts:30


subjectCollection

subjectCollection(opts): (target: T, key: keyof T) => void

Parameters
Name Type
opts CollectionOptions
Returns

fn

▸ <T>(target, key): void

Type parameters
Name
T
Parameters
Name Type
target T
key keyof T
Returns

void

Defined in

subject/SDNADecorators.ts:126


subjectFlag

subjectFlag(opts): (target: T, key: keyof T) => void

Parameters
Name Type
opts FlagOptions
Returns

fn

▸ <T>(target, key): void

Type parameters
Name
T
Parameters
Name Type
target T
key keyof T
Returns

void

Defined in

subject/SDNADecorators.ts:99


subjectProperty

subjectProperty(opts): (target: T, key: keyof T) => void

Parameters
Name Type
opts PropertyOptions
Returns

fn

▸ <T>(target, key): void

Type parameters
Name
T
Parameters
Name Type
target T
key keyof T
Returns

void

Defined in

subject/SDNADecorators.ts:80

@perspect3vism/ad4m / Exports / subject/Subject

Module: subject/Subject

Table of contents

Classes

@perspect3vism/ad4m / Exports / subject/util

Module: subject/util

Table of contents

Functions

Functions

capitalize

capitalize(str): string

Parameters
Name Type
str string
Returns

string

Defined in

subject/util.ts:1


collectionAdderToName

collectionAdderToName(adderName): string

Parameters
Name Type
adderName string
Returns

string

Defined in

subject/util.ts:39


collectionSetterToName

collectionSetterToName(adderName): string

Parameters
Name Type
adderName string
Returns

string

Defined in

subject/util.ts:45


collectionToAdderName

collectionToAdderName(collection): string

Parameters
Name Type
collection string
Returns

string

Defined in

subject/util.ts:34


collectionToSetterName

collectionToSetterName(collection): string

Parameters
Name Type
collection string
Returns

string

Defined in

subject/util.ts:52


pluralToSingular

pluralToSingular(plural): string

Parameters
Name Type
plural string
Returns

string

Defined in

subject/util.ts:23


propertyNameToSetterName

propertyNameToSetterName(property): string

Parameters
Name Type
property string
Returns

string

Defined in

subject/util.ts:6


setterNameToPropertyName

setterNameToPropertyName(setter): string

Parameters
Name Type
setter string
Returns

string

Defined in

subject/util.ts:11


singularToPlural

singularToPlural(singular): string

Parameters
Name Type
singular string
Returns

string

Defined in

subject/util.ts:15


stringifyObjectLiteral

stringifyObjectLiteral(obj): any

Parameters
Name Type
obj any
Returns

any

Defined in

subject/util.ts:57

@perspect3vism/ad4m / Exports / typeDefs

Module: typeDefs

Table of contents

Variables

Variables

typeDefsString

Const typeDefsString: ""

Defined in

typeDefs.ts:6

@perspect3vism/ad4m / Exports / unwrapApolloResult

Module: unwrapApolloResult

Table of contents

Functions

Functions

default

default(result): any

Parameters
Name Type
result ApolloQueryResult<any> \ FetchResult<any, Record<string, any>, Record<string, any>>
Returns

any

Defined in

unwrapApolloResult.ts:3