🚧 Work in progress.
An implementation of the OCapN protocol.
Includes codecs for Syrup encoded messages.
#!/usr/bin/env node | |
const { promisify } = require('util') | |
const sass = require('sass') | |
const { promises: fs } = require('fs') | |
const vm = require('vm') | |
// example() | |
// async function example(){ | |
// const vmContext = vm.createContext() |
. | |
. | |
,d88b, . __..- | |
888888 . .--SEAL:. | |
`?88P' . __ ,'WWII::. | |
.MW:`-. /WWII::.. | |
. _.MWII:'. `. . ,'WII::.. | |
_.-MWII::'. `-. ,'WWI::. | |
. _..vvvv,'WWII::' `.'WII::. | |
,-'WI:'''/WII:'. \WI:. |
/** | |
* A LazyPromise doesn't run its executor until .then, .catch, or .finally is called, | |
* or the promise is awaited. | |
* Unfortunately, `@endo/promise-kit`'s isPromise returns false for instances of LazyPromise. | |
* However, LazyPromise instances will return true for instanceof Promise. | |
*/ | |
export class LazyPromise extends Promise { | |
#isListening = false; | |
#executor; |
🚧 Work in progress.
An implementation of the OCapN protocol.
Includes codecs for Syrup encoded messages.
(define-values (a-vat a-netlayer a-mycapn) | |
(make-new-node "a")) | |
(define-values (b-vat b-netlayer b-mycapn) | |
(make-new-node "b")) | |
(define (^greeter _bcom our-name) | |
(lambda (their-name) | |
(format #f "Hello ~a, my name is ~a" their-name our-name))) | |
(define (^echo _bcom) |