New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@holochain/client

Package Overview
Dependencies
Maintainers
0
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@holochain/client - npm Package Compare versions

Comparing version 0.18.0-rc.1 to 0.18.0-rc.2

32

lib/hdk/dht-ops.d.ts

@@ -7,3 +7,3 @@ import { ActionHash, AgentPubKey, Signature, Timestamp } from "../types.js";

*/
export declare enum DhtOpType {
export declare enum ChainOpType {
StoreRecord = "StoreRecord",

@@ -44,9 +44,9 @@ StoreEntry = "StoreEntry",

export type ChainOp = {
[DhtOpType.StoreRecord]: [Signature, Action, Entry | undefined];
[ChainOpType.StoreRecord]: [Signature, Action, Entry | undefined];
} | {
[DhtOpType.StoreEntry]: [Signature, NewEntryAction, Entry];
[ChainOpType.StoreEntry]: [Signature, NewEntryAction, Entry];
} | {
[DhtOpType.RegisterAgentActivity]: [Signature, Action];
[ChainOpType.RegisterAgentActivity]: [Signature, Action];
} | {
[DhtOpType.RegisterUpdatedContent]: [
[ChainOpType.RegisterUpdatedContent]: [
Signature,

@@ -57,11 +57,15 @@ Update,

} | {
[DhtOpType.RegisterUpdatedRecord]: [Signature, Update, Entry | undefined];
[ChainOpType.RegisterUpdatedRecord]: [
Signature,
Update,
Entry | undefined
];
} | {
[DhtOpType.RegisterDeletedBy]: [Signature, Delete];
[ChainOpType.RegisterDeletedBy]: [Signature, Delete];
} | {
[DhtOpType.RegisterDeletedEntryAction]: [Signature, Delete];
[ChainOpType.RegisterDeletedEntryAction]: [Signature, Delete];
} | {
[DhtOpType.RegisterAddLink]: [Signature, CreateLink];
[ChainOpType.RegisterAddLink]: [Signature, CreateLink];
} | {
[DhtOpType.RegisterRemoveLink]: [Signature, DeleteLink];
[ChainOpType.RegisterRemoveLink]: [Signature, DeleteLink];
};

@@ -120,14 +124,14 @@ /**

*/
export declare function getDhtOpType(op: DhtOp): DhtOpType;
export declare function getChainOpType(op: ChainOp): ChainOpType;
/**
* @public
*/
export declare function getDhtOpAction(op: DhtOp): Action;
export declare function getChainOpAction(op: ChainOp): Action;
/**
* @public
*/
export declare function getDhtOpEntry(op: DhtOp): Entry | undefined;
export declare function getChainOpEntry(op: ChainOp): Entry | undefined;
/**
* @public
*/
export declare function getDhtOpSignature(op: DhtOp): Signature;
export declare function getChainOpSignature(op: ChainOp): Signature;

@@ -5,18 +5,18 @@ // https://github.com/holochain/holochain/blob/develop/crates/types/src/dht_op.rs

*/
export var DhtOpType;
(function (DhtOpType) {
DhtOpType["StoreRecord"] = "StoreRecord";
DhtOpType["StoreEntry"] = "StoreEntry";
DhtOpType["RegisterAgentActivity"] = "RegisterAgentActivity";
DhtOpType["RegisterUpdatedContent"] = "RegisterUpdatedContent";
DhtOpType["RegisterUpdatedRecord"] = "RegisterUpdatedRecord";
DhtOpType["RegisterDeletedBy"] = "RegisterDeletedBy";
DhtOpType["RegisterDeletedEntryAction"] = "RegisterDeletedEntryAction";
DhtOpType["RegisterAddLink"] = "RegisterAddLink";
DhtOpType["RegisterRemoveLink"] = "RegisterRemoveLink";
})(DhtOpType || (DhtOpType = {}));
export var ChainOpType;
(function (ChainOpType) {
ChainOpType["StoreRecord"] = "StoreRecord";
ChainOpType["StoreEntry"] = "StoreEntry";
ChainOpType["RegisterAgentActivity"] = "RegisterAgentActivity";
ChainOpType["RegisterUpdatedContent"] = "RegisterUpdatedContent";
ChainOpType["RegisterUpdatedRecord"] = "RegisterUpdatedRecord";
ChainOpType["RegisterDeletedBy"] = "RegisterDeletedBy";
ChainOpType["RegisterDeletedEntryAction"] = "RegisterDeletedEntryAction";
ChainOpType["RegisterAddLink"] = "RegisterAddLink";
ChainOpType["RegisterRemoveLink"] = "RegisterRemoveLink";
})(ChainOpType || (ChainOpType = {}));
/**
* @public
*/
export function getDhtOpType(op) {
export function getChainOpType(op) {
return Object.keys(op)[0];

@@ -27,6 +27,6 @@ }

*/
export function getDhtOpAction(op) {
const opType = getDhtOpType(op);
export function getChainOpAction(op) {
const opType = getChainOpType(op);
const action = Object.values(op)[0][1];
if (opType === DhtOpType.RegisterAddLink) {
if (opType === ChainOpType.RegisterAddLink) {
return {

@@ -37,4 +37,4 @@ type: "CreateLink",

}
if (opType === DhtOpType.RegisterUpdatedContent ||
opType === DhtOpType.RegisterUpdatedRecord) {
if (opType === ChainOpType.RegisterUpdatedContent ||
opType === ChainOpType.RegisterUpdatedRecord) {
return {

@@ -58,3 +58,3 @@ type: "Update",

*/
export function getDhtOpEntry(op) {
export function getChainOpEntry(op) {
return Object.values(op)[0][2];

@@ -65,4 +65,4 @@ }

*/
export function getDhtOpSignature(op) {
export function getChainOpSignature(op) {
return Object.values(op)[0][1];
}
{
"name": "@holochain/client",
"version": "0.18.0-rc.1",
"version": "0.18.0-rc.2",
"description": "A JavaScript client for the Holochain Conductor API",

@@ -5,0 +5,0 @@ "author": "Holochain Foundation <info@holochain.org> (https://holochain.org)",

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