Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wnfs

Package Overview
Dependencies
Maintainers
8
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wnfs - npm Package Compare versions

Comparing version 0.1.22 to 0.1.23

2

package.json

@@ -8,3 +8,3 @@ {

"description": "WebNative Filesystem API (WebAssembly)",
"version": "0.1.22",
"version": "0.1.23",
"license": "Apache-2.0",

@@ -11,0 +11,0 @@ "repository": {

@@ -17,5 +17,6 @@ /* tslint:disable */

* @param {Uint8Array} recipient_exchange_key
* @returns {Namefilter}
* @param {PrivateForest} sharer_forest
* @returns {Name}
*/
export function createShareLabel(share_count: number, sharer_root_did: string, recipient_exchange_key: Uint8Array): Namefilter;
export function createShareName(share_count: number, sharer_root_did: string, recipient_exchange_key: Uint8Array, sharer_forest: PrivateForest): Name;
/**

@@ -32,3 +33,3 @@ * @param {number} share_count

/**
* @param {Namefilter} share_label
* @param {Name} share_name
* @param {PrivateKey} recipient_key

@@ -39,3 +40,3 @@ * @param {PrivateForest} sharer_forest

*/
export function receiveShare(share_label: Namefilter, recipient_key: PrivateKey, sharer_forest: PrivateForest, store: BlockStore): Promise<any>;
export function receiveShare(share_name: Name, recipient_key: PrivateKey, sharer_forest: PrivateForest, store: BlockStore): Promise<any>;
/**

@@ -60,2 +61,5 @@ * Panic hook lets us get better error messages if our Rust code ever panics.

/**
* Return the label in the forest, used for
* accessing the ciphertext that can be decrypted with
* this access key.
* @returns {Uint8Array}

@@ -65,9 +69,35 @@ */

/**
* Returns the temporal key or null, in case this
* access key only gives access to the shapshot level.
* @returns {Uint8Array | undefined}
*/
getTemporalKey(): Uint8Array | undefined;
/**
* Returns the snapshot key.
* May derive the key on-the-fly in case this
* AccessKey also gives access to the temporal access level.
* @returns {Uint8Array}
*/
getTemporalKey(): Uint8Array;
getSnapshotKey(): Uint8Array;
/**
* Return the CID of what this access key decrypts.
* This is mainly used for disambiguation, in case the
* label the AccessKey links to has multiple conflicting writes.
* @returns {Uint8Array}
*/
getContentCid(): Uint8Array;
/**
* Serialize this AccessKey into bytes.
* This will contain secret key material!
* Make sure to keep safe or encrypt
* (e.g. using the WebCrypto and asymmetrically encrypting these bytes).
* @returns {Uint8Array}
*/
toBytes(): Uint8Array;
/**
* Deserialize an AccessKey previously generated from `into_bytes`.
* @param {Uint8Array} bytes
* @returns {AccessKey}
*/
static fromBytes(bytes: Uint8Array): AccessKey;
}

@@ -99,5 +129,5 @@ /**

/**
* @returns {Namefilter}
* @returns {NameAccumulator}
*/
getKey(): Namefilter;
getKey(): NameAccumulator;
/**

@@ -114,8 +144,9 @@ * @returns {(Uint8Array)[]}

*/
export class Namefilter {
export class Name {
free(): void;
}
/**
* Creates a new namefilter.
*/
constructor();
export class NameAccumulator {
free(): void;
}

@@ -129,19 +160,10 @@ /**

* Creates a new private directory.
* @param {Namefilter} parent_bare_name
* @param {Name} parent_bare_name
* @param {Date} time
* @param {Rng} rng
*/
constructor(parent_bare_name: Namefilter, time: Date, rng: Rng);
constructor(parent_bare_name: Name, time: Date, rng: Rng);
/**
* Creates a new directory with the ratchet seed and inumber provided.
* @param {Namefilter} parent_bare_name
* @param {Date} time
* @param {Uint8Array} ratchet_seed
* @param {Uint8Array} inumber
* @returns {PrivateDirectory}
*/
static withSeed(parent_bare_name: Namefilter, time: Date, ratchet_seed: Uint8Array, inumber: Uint8Array): PrivateDirectory;
/**
* This contstructor creates a new private directory and stores it in a provided `PrivateForest`.
* @param {Namefilter} parent_bare_name
* @param {Name} parent_bare_name
* @param {Date} time

@@ -153,16 +175,4 @@ * @param {PrivateForest} forest

*/
static newAndStore(parent_bare_name: Namefilter, time: Date, forest: PrivateForest, store: BlockStore, rng: Rng): Promise<Promise<any>>;
static newAndStore(parent_bare_name: Name, time: Date, forest: PrivateForest, store: BlockStore, rng: Rng): Promise<Promise<any>>;
/**
* This contstructor creates a new private directory and stores it in a provided `PrivateForest`.
* @param {Namefilter} parent_bare_name
* @param {Date} time
* @param {Uint8Array} ratchet_seed
* @param {Uint8Array} inumber
* @param {PrivateForest} forest
* @param {BlockStore} store
* @param {Rng} rng
* @returns {Promise<Promise<any>>}
*/
static newWithSeedAndStore(parent_bare_name: Namefilter, time: Date, ratchet_seed: Uint8Array, inumber: Uint8Array, forest: PrivateForest, store: BlockStore, rng: Rng): Promise<Promise<any>>;
/**
* Persists the current state of this directory in the BlockStore and PrivateForest.

@@ -293,10 +303,10 @@ * This will also force a history entry to be created, if there were changes.

* Creates an empty private file.
* @param {Namefilter} parent_bare_name
* @param {Name} parent_bare_name
* @param {Date} time
* @param {Rng} rng
*/
constructor(parent_bare_name: Namefilter, time: Date, rng: Rng);
constructor(parent_bare_name: Name, time: Date, rng: Rng);
/**
* Creates a file with provided content.
* @param {Namefilter} parent_bare_name
* @param {Name} parent_bare_name
* @param {Date} time

@@ -309,3 +319,3 @@ * @param {Uint8Array} content

*/
static withContent(parent_bare_name: Namefilter, time: Date, content: Uint8Array, forest: PrivateForest, store: BlockStore, rng: Rng): Promise<any>;
static withContent(parent_bare_name: Name, time: Date, content: Uint8Array, forest: PrivateForest, store: BlockStore, rng: Rng): Promise<any>;
/**

@@ -350,4 +360,6 @@ * Persists the current state of this file in the BlockStore and PrivateForest.

* Creates a new private forest.
* @param {Rng} rng
* @param {Uint8Array | undefined} rsa_modulus_big_endian
*/
constructor();
constructor(rng: Rng, rsa_modulus_big_endian?: Uint8Array);
/**

@@ -380,2 +392,6 @@ * Loads an existing private forest from a given CID

diff(other: PrivateForest, store: BlockStore): Promise<any>;
/**
* @returns {Name}
*/
emptyName(): Name;
}

@@ -401,6 +417,13 @@ /**

* @param {BlockStore} store
* @param {Name | undefined} parent_name
* @returns {Promise<any>}
*/
static load(access_key: AccessKey, forest: PrivateForest, store: BlockStore): Promise<any>;
static load(access_key: AccessKey, forest: PrivateForest, store: BlockStore, parent_name?: Name): Promise<any>;
/**
* @param {PrivateForest} forest
* @param {BlockStore} store
* @returns {Promise<any>}
*/
searchLatest(forest: PrivateForest, store: BlockStore): Promise<any>;
/**
* @returns {PrivateDirectory}

@@ -626,8 +649,9 @@ */

readonly accesskey_getTemporalKey: (a: number, b: number) => void;
readonly accesskey_getSnapshotKey: (a: number, b: number) => void;
readonly accesskey_getContentCid: (a: number, b: number) => void;
readonly accesskey_toBytes: (a: number, b: number) => void;
readonly accesskey_fromBytes: (a: number, b: number) => number;
readonly __wbg_privatedirectory_free: (a: number) => void;
readonly privatedirectory_new: (a: number, b: number, c: number, d: number) => void;
readonly privatedirectory_withSeed: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
readonly privatedirectory_newAndStore: (a: number, b: number, c: number, d: number, e: number) => number;
readonly privatedirectory_newWithSeedAndStore: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
readonly privatedirectory_store: (a: number, b: number, c: number, d: number, e: number) => void;

@@ -655,3 +679,3 @@ readonly privatedirectory_getNode: (a: number, b: number, c: number, d: number, e: number, f: number) => void;

readonly __wbg_privateforest_free: (a: number) => void;
readonly privateforest_new: () => number;
readonly privateforest_new: (a: number, b: number, c: number, d: number) => void;
readonly privateforest_load: (a: number, b: number, c: number, d: number) => void;

@@ -661,8 +685,10 @@ readonly privateforest_store: (a: number, b: number, c: number) => void;

readonly privateforest_diff: (a: number, b: number, c: number, d: number) => void;
readonly __wbg_namefilter_free: (a: number) => void;
readonly namefilter_new: () => number;
readonly privateforest_emptyName: (a: number) => number;
readonly __wbg_name_free: (a: number) => void;
readonly __wbg_nameaccumulator_free: (a: number) => void;
readonly __wbg_privatenode_free: (a: number) => void;
readonly __wbg_forestchange_free: (a: number) => void;
readonly privatenode_store: (a: number, b: number, c: number, d: number, e: number) => void;
readonly privatenode_load: (a: number, b: number, c: number, d: number) => void;
readonly privatenode_load: (a: number, b: number, c: number, d: number, e: number) => void;
readonly privatenode_searchLatest: (a: number, b: number, c: number, d: number) => void;
readonly privatenode_asDir: (a: number, b: number) => void;

@@ -678,3 +704,3 @@ readonly privatenode_asFile: (a: number, b: number) => void;

readonly share: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
readonly createShareLabel: (a: number, b: number, c: number, d: number, e: number) => number;
readonly createShareName: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
readonly findLatestShareCounter: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;

@@ -696,3 +722,2 @@ readonly receiveShare: (a: number, b: number, c: number, d: number, e: number) => void;

readonly publicdirectory_metadata: (a: number, b: number) => void;
readonly publicdirectory_asNode: (a: number) => number;
readonly publicdirectory_getId: (a: number, b: number) => void;

@@ -707,3 +732,2 @@ readonly __wbg_publicfile_free: (a: number) => void;

readonly publicfile_contentCid: (a: number, b: number) => void;
readonly publicfile_asNode: (a: number) => number;
readonly __wbg_publicnode_free: (a: number) => void;

@@ -718,10 +742,12 @@ readonly publicnode_asDir: (a: number, b: number) => void;

readonly __wbg_foreignprivatekey_free: (a: number) => void;
readonly publicfile_asNode: (a: number) => number;
readonly publicdirectory_asNode: (a: number) => number;
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
readonly __wbindgen_export_2: WebAssembly.Table;
readonly wasm_bindgen__convert__closures__invoke1_mut__h73d25faefd4cda1f: (a: number, b: number, c: number) => void;
readonly wasm_bindgen__convert__closures__invoke1_mut__he078474ac2e743a3: (a: number, b: number, c: number) => void;
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_exn_store: (a: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__h0e8ff37cca297720: (a: number, b: number, c: number, d: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__h08e694515f938703: (a: number, b: number, c: number, d: number) => void;
}

@@ -728,0 +754,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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