This package has been deprecated

Author message:

Package no longer supported.

@holochain/devhub-entities

0.6.0 • Public • Published

DevHub Entity Architecture

A Javascript library for deconstructing DevHub response payloads.

Overview

This package defines Entity models for the Holochain DevHub project using the @whi/entity-architect library.

Install

npm i @holochain/devhub-entities

Basic usage

Schema

const { Schema } = require('@holochain/devhub-entities');

const ID = Buffer.from("hCEkEvFsj08QdtgiUDBlEhwlcW5lsfqD4vKRcaGIirSBx0Wl7MVf", "base64");
const HEADER = Buffer.from("hCkkn_kIobHe9Zt4feh751we8mDGyJuBXR50X5LBqtcSuGLalIBa", "base64");
const ADDRESS = Buffer.from("hCEkU7zcM5NFGXIljSHjJS3mk62FfVRpniZQlg6f92zWHkOZpb2z", "base64");
const AUTHOR = Buffer.from("hCAkocJKdTlSkQFVmjPW_lA_A5kusNOORPrFYJqT8134Pag45Vjf", "base64");

Schema.deconstruct( "entity", {
    "id": ID,
    "header": HEADER,
    "address": ADDRESS,
    "type": {
        "name": "dna",
        "model": "info",
    },
    "content": dna_info
});
// Entity { ...dna_info }

Client

This client will automatically parse Essence packages and deconstruct Entity payloads using Schema.

const { Client } = require('@holochain/devhub-entities');

const client = new Client( cell_agent, {
    [dna_nickname]: dna_hash,
}, app_port );

let response = client.call( dna_nickname, zome_name, fn_name, args );

Contributing

See CONTRIBUTING.md

Readme

Keywords

none

Package Sidebar

Install

npm i @holochain/devhub-entities

Weekly Downloads

1

Version

0.6.0

License

ISC

Unpacked Size

82.8 kB

Total Files

4

Last publish

Collaborators

  • thetasinner
  • matthme
  • jost-s
  • guillem.cordoba
  • neonphog
  • connoropolous
  • lucksus
  • zippy314
  • thedavidmeister
  • maackle
  • peeech
  • zo-el
  • brisebom