New:Socket for Asana Is Now Available.Learn more
Get Started

genosdb

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

genosdb - npm Package Compare versions

Comparing version
0.23.1
to
0.23.2
+36
-10
dist/index.d.ts

@@ -55,6 +55,6 @@ // Type definitions for genosdb

$edge?: Query
/** Geo module: proximity search (requires `geo: true`). */
$near?: { center: [number, number]; radius: number }
/** Geo module: proximity search, radius in km (requires `geo: true`). */
$near?: { latitude: number; longitude: number; radius: number }
/** Geo module: bounding-box search (requires `geo: true`). */
$bbox?: [number, number, number, number]
$bbox?: { minLat: number; maxLat: number; minLng: number; maxLng: number }
}

@@ -176,4 +176,6 @@

export interface ACLs {
set(nodeId: string, acl: any): Promise<any>
grant(nodeId: string, ethAddress: string, permissions?: any): Promise<any>
/** Create (value only) or update (value + id). `owner` and `collaborators` are engine-managed: they are stripped from the value and re-based on the stored node. */
set(value: any, id?: string): Promise<string>
/** Owner-only. One level per address; granting again replaces the previous level. */
grant(nodeId: string, ethAddress: string, permission: "read" | "write" | "delete"): Promise<any>
revoke(nodeId: string, ethAddress: string): Promise<any>

@@ -183,2 +185,17 @@ delete(nodeId: string): Promise<any>

/** State pushed to `setSecurityStateChangeCallback` on every session change. */
export interface SecurityState {
/** A local signer is active: writes can be signed. */
isActive: boolean
activeAddress: string | null
/** Abbreviated address (`0x1234...abcd`) for display. */
abbrAddr: string
/** The active session was opened via WebAuthn. */
isWebAuthnProtected: boolean
/** A freshly generated identity is held in memory, not yet secured. */
hasVolatileIdentity: boolean
/** This device has a WebAuthn registration to log in with. */
hasWebAuthnHardwareRegistration: boolean
}
export interface SecurityManager {

@@ -196,5 +213,3 @@ startNewUserRegistration(): Promise<any>

clearSecurity(): Promise<void>
setSecurityStateChangeCallback(
callback: (state: { isActive: boolean; activeAddress: string | null }) => void
): void
setSecurityStateChangeCallback(callback: (state: SecurityState) => void): void
setGovernanceStateChangeCallback(callback: (state: any) => void): void

@@ -215,2 +230,4 @@ assignRole(targetUserEthAddress: string, role: string, expiresAt?: number | string): Promise<any>

remove(id: string): Promise<void>
/** Abbreviate an address (`0x1234...abcd`) for display. */
abbrAddr(address: string): string
encryptDataForCurrentUser(data: any): Promise<any>

@@ -285,4 +302,13 @@ decryptDataForCurrentUser(encrypted: any): Promise<any>

clear(): Promise<void>
/** Middleware over incoming P2P operation batches. */
use(middleware: (operations: any[]) => Promise<any[]> | any[]): void
/**
* Middleware over incoming P2P operation batches. Receives the batch and a
* Map of each node's previous state; return the (filtered) batch, or
* nothing to discard the whole message.
*/
use(
middleware: (
operations: any[],
previousStates: Map<string, any>
) => Promise<any[] | void> | any[] | void
): void
/** P2P room (present when `rtc` is enabled). */

@@ -289,0 +315,0 @@ room?: Room

{
"name": "genosdb",
"version": "0.23.1",
"version": "0.23.2",
"description": "GenosDB (GDB): distributed graph database in real-time, peer-to-peer, scalable storage - efficient querying of complex relationships.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",