Public
Edited
Feb 2, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
sendMail = () =>
msg.send("mailto:alice@example.com", {
to: ["bob@example.com", "carol@example.com"],
subject: "hi",
body: "world"
})
Insert cell
Insert cell
Insert cell
taskPipeline = () => {
// Pseudocode
const mailingList = crud.read("https://exmaple.com/mailinglist");
const sendEmail = msg.send("mailto://alice@example.com", {
to: mailingList.await().ok,
subject: "hello",
body: "world"
});

return sendEmail;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
notifyEditorsExample = () => {
const createDraft = crud.create("https://example.com/blog/posts", {
payload: {
title: "How UCAN Tasks Changed My Life",
body: "This is the story of how one spec changed everything..."
}
});

const getEditors = crud.read("https://example.com/users/editors");

const notify = msg.send("mailto:akiko@example.com", {
to: createDraft.await().ok,
subject: "Coffee",
body: getEditors.await().ok
});

return notify;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
crud = agent.crud
Insert cell
Insert cell
site = agent.site
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
isEmpty = (source) => Object.keys(source).length === 0
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { json, CBOR, Block, Link, sha256, CID } from "@gozala/ipld"
Insert cell
import { delegate, Signer, ed25519, UCAN } from "@gozala/ucanto"
Insert cell
import { fromDSL, toDSL } from "@gozala/ipld-schema"
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more