JSPM

@fairdatasociety/beesonlet

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q22963F
  • License MIT

Beeson applet

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@fairdatasociety/beesonlet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Beesonlet - Beeson applet

    Run verifiable JavaScript apps in the edge using QuickJS/Wasm

    Install

    npm install @fairdatasociety/beesonlet

    Usage

    import { BeeSon, Type } from '@fairdatasociety/beeson';
    import { createSignedApplet } from '@fairdatasociety/beesonlet';
    
    
    const src =
    
    `const json = [0, 1, 2, 3, 5, 6]
    const beeson = new BeeSon({ json })
    return beeson.serialize()
    `;
    
    // Create beesonlet with source code and dependencies
    const res = await createSignedApplet(src, {
        BeeSon
    });
    
    
    const fn = res.fn;
    fn(); // returns Uint8Array
    console.log(res.reference); // returns swarm reference
    console.log(res.bytecode); // returns serialize source code as Uint8Array
    

    Maintainers

    License

    MIT