@fireproof/core 0.3.17 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.js +2 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +1 -1
- package/dist/src/index.mjs.map +1 -1
- package/package.json +6 -2
- package/src/fireproof.js +1 -1
package/dist/src/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var
|
3
|
+
var randomBytes = require('randombytes');
|
4
4
|
var Block = require('multiformats/block');
|
5
5
|
var sha2 = require('multiformats/hashes/sha2');
|
6
6
|
var dagcbor = require('@ipld/dag-cbor');
|
@@ -1015,7 +1015,7 @@ class Fireproof {
|
|
1015
1015
|
* @returns {Fireproof} - a new Fireproof instance
|
1016
1016
|
*/
|
1017
1017
|
static storage = (name = "global") => {
|
1018
|
-
const instanceKey =
|
1018
|
+
const instanceKey = randomBytes(32).toString("hex");
|
1019
1019
|
return new Fireproof(new TransactionBlockstore(name, instanceKey), [], { name });
|
1020
1020
|
};
|
1021
1021
|
constructor(blocks, clock, config, authCtx = {}) {
|