Socket
Socket
Sign inDemoInstall

@holochain/devhub-entities

Package Overview
Dependencies
Maintainers
12
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@holochain/devhub-entities

A Holochain client for deconstructing DevHub entity payloads


Version published
Weekly downloads
3
increased by200%
Maintainers
12
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 26 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc