@peerbit/blocks 2.0.31 → 2.0.32-a9206a8
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/benchmark/e2e.d.ts +2 -0
- package/dist/benchmark/e2e.d.ts.map +1 -0
- package/dist/benchmark/e2e.js +74 -0
- package/dist/benchmark/e2e.js.map +1 -0
- package/dist/benchmark/multiformats.d.ts +2 -0
- package/dist/benchmark/multiformats.d.ts.map +1 -0
- package/dist/benchmark/multiformats.js +129 -0
- package/dist/benchmark/multiformats.js.map +1 -0
- package/{lib/esm → dist/src}/any-blockstore.d.ts +5 -4
- package/dist/src/any-blockstore.d.ts.map +1 -0
- package/{lib/esm → dist/src}/any-blockstore.js +4 -0
- package/dist/src/any-blockstore.js.map +1 -0
- package/{lib/esm → dist/src}/block.d.ts +1 -0
- package/dist/src/block.d.ts.map +1 -0
- package/dist/src/block.js.map +1 -0
- package/{lib/esm → dist/src}/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -0
- package/{lib/esm → dist/src}/interface.d.ts +3 -2
- package/dist/src/interface.d.ts.map +1 -0
- package/{lib/esm → dist/src}/libp2p.d.ts +5 -4
- package/dist/src/libp2p.d.ts.map +1 -0
- package/{lib/esm → dist/src}/libp2p.js +4 -1
- package/dist/src/libp2p.js.map +1 -0
- package/{lib/esm → dist/src}/remote.d.ts +4 -3
- package/dist/src/remote.d.ts.map +1 -0
- package/{lib/esm → dist/src}/remote.js +4 -0
- package/dist/src/remote.js.map +1 -0
- package/package.json +86 -63
- package/src/any-blockstore.ts +5 -4
- package/src/block.ts +2 -2
- package/src/interface.ts +2 -2
- package/src/libp2p.ts +3 -4
- package/src/remote.ts +5 -5
- package/LICENSE +0 -202
- package/lib/esm/any-blockstore.js.map +0 -1
- package/lib/esm/block.js.map +0 -1
- package/lib/esm/libp2p.js.map +0 -1
- package/lib/esm/remote.js.map +0 -1
- /package/{lib/esm → dist/src}/block.js +0 -0
- /package/{lib/esm → dist/src}/index.js +0 -0
- /package/{lib/esm → dist/src}/index.js.map +0 -0
- /package/{lib/esm → dist/src}/interface.js +0 -0
- /package/{lib/esm → dist/src}/interface.js.map +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e2e.d.ts","sourceRoot":"","sources":["../../benchmark/e2e.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import B from "benchmark";
|
|
2
|
+
import { TestSession } from "@peerbit/libp2p-test-utils";
|
|
3
|
+
import { waitForPeers } from "@peerbit/stream";
|
|
4
|
+
import { delay } from "@peerbit/time";
|
|
5
|
+
import crypto from "crypto";
|
|
6
|
+
import { DirectBlock, stringifyCid } from "../src/index.js";
|
|
7
|
+
import { tcp } from "@libp2p/tcp";
|
|
8
|
+
// Run with "node --loader ts-node/esm ./src/__benchmark__/e2e.ts"
|
|
9
|
+
// size: 1kb x 827 ops/sec ±2.03% (87 runs sampled)
|
|
10
|
+
// size: 1000kb x 40.51 ops/sec ±4.09% (62 runs sampled)
|
|
11
|
+
const session = await TestSession.disconnected(4, {
|
|
12
|
+
transports: [tcp()],
|
|
13
|
+
services: {
|
|
14
|
+
blocks: (c) => new DirectBlock(c)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
/*
|
|
18
|
+
┌─┐
|
|
19
|
+
│1│
|
|
20
|
+
└┬┘
|
|
21
|
+
┌▽┐
|
|
22
|
+
│2│
|
|
23
|
+
└┬┘
|
|
24
|
+
┌▽┐
|
|
25
|
+
│3│
|
|
26
|
+
└┬┘
|
|
27
|
+
┌▽┐
|
|
28
|
+
│4│
|
|
29
|
+
└─┘
|
|
30
|
+
|
|
31
|
+
*/
|
|
32
|
+
await session.connect([
|
|
33
|
+
[session.peers[0], session.peers[1]],
|
|
34
|
+
[session.peers[1], session.peers[2]],
|
|
35
|
+
[session.peers[2], session.peers[3]]
|
|
36
|
+
]);
|
|
37
|
+
await session.connect();
|
|
38
|
+
await waitForPeers(session.peers[0].services.blocks, session.peers[1].services.blocks);
|
|
39
|
+
await waitForPeers(session.peers[1].services.blocks, session.peers[2].services.blocks);
|
|
40
|
+
await waitForPeers(session.peers[2].services.blocks, session.peers[3].services.blocks);
|
|
41
|
+
await delay(3000);
|
|
42
|
+
const largeRandom = [];
|
|
43
|
+
for (let i = 0; i < 100; i++) {
|
|
44
|
+
largeRandom.push(crypto.randomBytes(1e6));
|
|
45
|
+
}
|
|
46
|
+
const smallRandom = [];
|
|
47
|
+
for (let i = 0; i < 1000; i++) {
|
|
48
|
+
smallRandom.push(crypto.randomBytes(1e3));
|
|
49
|
+
}
|
|
50
|
+
const sizes = [1e3, 1e6];
|
|
51
|
+
let suite = new B.Suite("_", { minSamples: 1, initCount: 1, maxTime: 5 });
|
|
52
|
+
for (const size of sizes) {
|
|
53
|
+
suite = suite.add("size: " + size / 1e3 + "kb", {
|
|
54
|
+
defer: true,
|
|
55
|
+
async: true,
|
|
56
|
+
fn: async (deferred) => {
|
|
57
|
+
{
|
|
58
|
+
const rng = crypto.randomBytes(size);
|
|
59
|
+
const cid = await session.peers[0].services.blocks.put(rng);
|
|
60
|
+
await session.peers[session.peers.length - 1].services.blocks.get(stringifyCid(cid));
|
|
61
|
+
deferred.resolve();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
suite
|
|
67
|
+
.on("cycle", (event) => {
|
|
68
|
+
console.log(String(event.target));
|
|
69
|
+
})
|
|
70
|
+
.on("complete", function (...args) {
|
|
71
|
+
session.stop();
|
|
72
|
+
})
|
|
73
|
+
.run({ async: true });
|
|
74
|
+
//# sourceMappingURL=e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e2e.js","sourceRoot":"","sources":["../../benchmark/e2e.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,WAAW,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,O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AAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBAC5D,MAAM,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAChE,YAAY,CAAC,GAAG,CAAC,CACjB,CAAC;gBACF,QAAQ,CAAC,OAAO,EAAE,CAAC;YACpB,CAAC;QACF,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AACD,KAAK;KACH,EAAE,CAAC,OAAO,EAAE,CAAC,KAAU,EAAE,EAAE;IAC3B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACnC,CAAC,CAAC;KACD,EAAE,CAAC,UAAU,EAAE,UAAqB,GAAG,IAAW;IAClD,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC,CAAC;KACD,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiformats.d.ts","sourceRoot":"","sources":["../../benchmark/multiformats.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var CIDSha256_1;
|
|
11
|
+
import { deserialize, field, serialize, variant } from "@dao-xyz/borsh";
|
|
12
|
+
import B from "benchmark";
|
|
13
|
+
import crypto from "crypto";
|
|
14
|
+
import { sha256 } from "multiformats/hashes/sha2";
|
|
15
|
+
import { encode } from "multiformats/block";
|
|
16
|
+
import { checkDecodeBlock, cidifyString, codecMap, stringifyCid } from "../src/block.js";
|
|
17
|
+
import { equals } from "uint8arrays";
|
|
18
|
+
// Run with "node --loader ts-node/esm ./src/__benchmark__/multiformats.ts"
|
|
19
|
+
// size: 1kb x 785 ops/sec ±2.66% (86 runs sampled)
|
|
20
|
+
// size: 1000kb x 38.14 ops/sec ±1.43% (40 runs sampled)
|
|
21
|
+
class DummyCid {
|
|
22
|
+
static decode(bytes) {
|
|
23
|
+
return deserialize(bytes, DummyCid);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
let CIDSha256 = CIDSha256_1 = class CIDSha256 extends DummyCid {
|
|
27
|
+
hash;
|
|
28
|
+
constructor(hash) {
|
|
29
|
+
super();
|
|
30
|
+
this.hash = hash;
|
|
31
|
+
}
|
|
32
|
+
static encode(bytes) {
|
|
33
|
+
const digest = crypto.createHash("sha256").update(bytes).digest();
|
|
34
|
+
return new CIDSha256_1(digest);
|
|
35
|
+
}
|
|
36
|
+
equals(other) {
|
|
37
|
+
if (other instanceof CIDSha256_1) {
|
|
38
|
+
return equals(this.hash, other.hash);
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
get bytes() {
|
|
43
|
+
return serialize(this);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
__decorate([
|
|
47
|
+
field({ type: Uint8Array }),
|
|
48
|
+
__metadata("design:type", Uint8Array)
|
|
49
|
+
], CIDSha256.prototype, "hash", void 0);
|
|
50
|
+
CIDSha256 = CIDSha256_1 = __decorate([
|
|
51
|
+
variant(0),
|
|
52
|
+
__metadata("design:paramtypes", [Uint8Array])
|
|
53
|
+
], CIDSha256);
|
|
54
|
+
const codec = codecMap["raw"];
|
|
55
|
+
const sizes = [1e3, 1e6];
|
|
56
|
+
const suite = new B.Suite("_", { minSamples: 1, initCount: 1, maxTime: 5 });
|
|
57
|
+
const SAMPLE_SIZE = 1e3;
|
|
58
|
+
const sample = {};
|
|
59
|
+
for (const size of sizes) {
|
|
60
|
+
sample[size] = [];
|
|
61
|
+
for (let i = 0; i < SAMPLE_SIZE; i++) {
|
|
62
|
+
sample[size].push(crypto.randomBytes(size));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const getSample = (size) => {
|
|
66
|
+
return sample[size][Math.floor(Math.random() * SAMPLE_SIZE)];
|
|
67
|
+
};
|
|
68
|
+
for (const size of sizes) {
|
|
69
|
+
suite.add("multiformats, size: " + size / 1e3 + "kb", {
|
|
70
|
+
defer: true,
|
|
71
|
+
async: true,
|
|
72
|
+
fn: async (deferred) => {
|
|
73
|
+
{
|
|
74
|
+
const rng = getSample(size);
|
|
75
|
+
const cid = await encode({
|
|
76
|
+
value: rng,
|
|
77
|
+
codec,
|
|
78
|
+
hasher: sha256
|
|
79
|
+
});
|
|
80
|
+
const cidString = stringifyCid(cid.cid);
|
|
81
|
+
const cidObject = cidifyString(cidString);
|
|
82
|
+
const checked = await checkDecodeBlock(cidObject, rng, {
|
|
83
|
+
hasher: sha256,
|
|
84
|
+
codec
|
|
85
|
+
});
|
|
86
|
+
if (!checked) {
|
|
87
|
+
throw new Error("Not verified");
|
|
88
|
+
}
|
|
89
|
+
deferred.resolve();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
suite.add("dummy, size: " + size / 1e3 + "kb", {
|
|
94
|
+
defer: true,
|
|
95
|
+
fn: (deferred) => {
|
|
96
|
+
{
|
|
97
|
+
const rng = getSample(size);
|
|
98
|
+
const cid = CIDSha256.encode(rng);
|
|
99
|
+
const cidBytes = cid.bytes;
|
|
100
|
+
const cidObject = DummyCid.decode(cidBytes);
|
|
101
|
+
const cid2 = CIDSha256.encode(rng);
|
|
102
|
+
if (!cidObject.equals(cid2)) {
|
|
103
|
+
throw new Error("Not verified");
|
|
104
|
+
}
|
|
105
|
+
deferred.resolve();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
suite.add("sha256 digest hex, size: " + size / 1e3 + "kb", {
|
|
110
|
+
defer: true,
|
|
111
|
+
fn: (deferred) => {
|
|
112
|
+
{
|
|
113
|
+
const rng = getSample(size);
|
|
114
|
+
const cid = crypto.createHash("sha256").update(rng).digest("hex");
|
|
115
|
+
const cid2 = crypto.createHash("sha256").update(rng).digest("hex");
|
|
116
|
+
if (cid !== cid2) {
|
|
117
|
+
throw new Error("Not verified");
|
|
118
|
+
}
|
|
119
|
+
deferred.resolve();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
suite
|
|
125
|
+
.on("cycle", (event) => {
|
|
126
|
+
console.log(String(event.target));
|
|
127
|
+
})
|
|
128
|
+
.run({ async: true });
|
|
129
|
+
//# sourceMappingURL=multiformats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiformats.js","sourceRoot":"","sources":["../../benchmark/multiformats.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,CAAC,MAAM,WAAW,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EACN,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,MAAM,iBAAiB,C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CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAElE,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAEnE,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;oBAClB,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;gBACjC,CAAC;gBACD,QAAQ,CAAC,OAAO,EAAE,CAAC;YACpB,CAAC;QACF,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AACD,KAAK;KACH,EAAE,CAAC,OAAO,EAAE,CAAC,KAAU,EAAE,EAAE;IAC3B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACnC,CAAC,CAAC;KACD,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Blocks } from "@peerbit/blocks-interface";
|
|
2
|
-
import { PeerId } from "@libp2p/interface";
|
|
1
|
+
import { type Blocks } from "@peerbit/blocks-interface";
|
|
2
|
+
import { type PeerId } from "@libp2p/interface";
|
|
3
3
|
import { PublicSignKey } from "@peerbit/crypto";
|
|
4
|
-
import { AnyStore } from "@peerbit/any-store";
|
|
4
|
+
import { type AnyStore } from "@peerbit/any-store-interface";
|
|
5
5
|
export declare class AnyBlockStore implements Blocks {
|
|
6
6
|
private _store;
|
|
7
7
|
private _opening;
|
|
@@ -20,7 +20,8 @@ export declare class AnyBlockStore implements Blocks {
|
|
|
20
20
|
has(cid: string): Promise<boolean>;
|
|
21
21
|
start(): Promise<void>;
|
|
22
22
|
stop(): Promise<void>;
|
|
23
|
-
status(): import("@peerbit/any-store").MaybePromise<"opening" | "open" | "closing" | "closed">;
|
|
23
|
+
status(): import("@peerbit/any-store-interface").MaybePromise<"opening" | "open" | "closing" | "closed">;
|
|
24
24
|
waitFor(peer: PeerId | PublicSignKey): Promise<void>;
|
|
25
25
|
size(): Promise<number>;
|
|
26
26
|
}
|
|
27
|
+
//# sourceMappingURL=any-blockstore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any-blockstore.d.ts","sourceRoot":"","sources":["../../src/any-blockstore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAUxD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAE7D,qBAAa,aAAc,YAAW,MAAM;IAC3C,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,QAAQ,CAA0B;IAC1C,OAAO,CAAC,gBAAgB,CAAkB;gBAC9B,KAAK,GAAE,QAAwB;IAIrC,GAAG,CACR,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE;QACT,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,GAAG,CAAC;KACb,GACC,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAyB5B,GAAG,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAQvC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7B,QAAQ,IAAI,cAAc,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAM7D,GAAG,CAAC,GAAG,EAAE,MAAM;IAIf,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAM3B,MAAM;IAGA,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpD,IAAI;CAGV"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import {} from "@peerbit/blocks-interface";
|
|
1
2
|
import { cidifyString, codecCodes, createBlock, defaultHasher, stringifyCid } from "./block.js";
|
|
2
3
|
import { decode } from "multiformats/block";
|
|
3
4
|
import { waitFor } from "@peerbit/time";
|
|
5
|
+
import {} from "@libp2p/interface";
|
|
6
|
+
import { PublicSignKey } from "@peerbit/crypto";
|
|
4
7
|
import { createStore } from "@peerbit/any-store";
|
|
8
|
+
import {} from "@peerbit/any-store-interface";
|
|
5
9
|
export class AnyBlockStore {
|
|
6
10
|
_store;
|
|
7
11
|
_opening;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any-blockstore.js","sourceRoot":"","sources":["../../src/any-blockstore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACN,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAc,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAiB,MAAM,8BAA8B,CAAC;AAE7D,MAAM,OAAO,aAAa;IACjB,MAAM,CAAW;IACjB,QAAQ,CAAe;IACvB,QAAQ,CAA0B;IAClC,gBAAgB,CAAkB;IAC1C,YAAY,QAAkB,WAAW,EAAE;QAC1C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,KAAK,CA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AM,CAAC,MAAM,WAAW,GAAG,KAAK,EAC/B,KAAU,EACV,MAAc,EACd,OAGC,EACoC,EAAE;IACvC,MAAM,KAAK,GAAI,QAAgB,CAAC,MAAM,CAAC,CAAC;IACxC,KAAK,GAAG,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC;QAC1B,KAAK;QACL,KAAK;QACL,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,aAAa;KACxC,CAAC,CAAC;IACH,OAAO,KAAkC,CAAC;AAC3C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { MaybePromise } from "@peerbit/any-store";
|
|
2
|
-
import { Blocks as IBlockStore } from "@peerbit/blocks-interface";
|
|
1
|
+
import type { MaybePromise } from "@peerbit/any-store-interface";
|
|
2
|
+
import type { Blocks as IBlockStore } from "@peerbit/blocks-interface";
|
|
3
3
|
export type StoreStatus = MaybePromise<"open" | "opening" | "closed" | "closing">;
|
|
4
4
|
export interface BlockStore extends IBlockStore {
|
|
5
5
|
start(): Promise<void>;
|
|
6
6
|
stop(): Promise<void>;
|
|
7
7
|
status(): StoreStatus;
|
|
8
8
|
}
|
|
9
|
+
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEvE,MAAM,MAAM,WAAW,GAAG,YAAY,CACrC,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CACzC,CAAC;AACF,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC9C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,MAAM,IAAI,WAAW,CAAC;CACtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Blocks as IBlocks } from "@peerbit/blocks-interface";
|
|
1
|
+
import { type Blocks as IBlocks } from "@peerbit/blocks-interface";
|
|
2
2
|
import { DirectStream } from "@peerbit/stream";
|
|
3
|
-
import { DirectStreamComponents } from "@peerbit/stream";
|
|
4
|
-
import { GetOptions } from "@peerbit/blocks-interface";
|
|
3
|
+
import { type DirectStreamComponents } from "@peerbit/stream";
|
|
4
|
+
import type { GetOptions } from "@peerbit/blocks-interface";
|
|
5
5
|
export type DirectBlockComponents = DirectStreamComponents;
|
|
6
6
|
export declare class DirectBlock extends DirectStream implements IBlocks {
|
|
7
7
|
private remoteBlocks;
|
|
@@ -21,5 +21,6 @@ export declare class DirectBlock extends DirectStream implements IBlocks {
|
|
|
21
21
|
start(): Promise<void>;
|
|
22
22
|
stop(): Promise<void>;
|
|
23
23
|
size(): Promise<number>;
|
|
24
|
-
get status(): import("./interface.js").StoreStatus;
|
|
24
|
+
get status(): boolean | import("./interface.js").StoreStatus;
|
|
25
25
|
}
|
|
26
|
+
//# sourceMappingURL=libp2p.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libp2p.d.ts","sourceRoot":"","sources":["../../src/libp2p.ts"],"names":[],"mappings":"AAAA,OAAO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|
|
2
4
|
import { AnyBlockStore } from "./any-blockstore.js";
|
|
3
5
|
import { createStore } from "@peerbit/any-store";
|
|
4
6
|
import { BlockMessage, RemoteBlocks } from "./remote.js";
|
|
5
|
-
import {
|
|
7
|
+
import { PublicSignKey } from "@peerbit/crypto";
|
|
8
|
+
import { AnyWhere, DataMessage } from "@peerbit/stream-interface";
|
|
6
9
|
import { deserialize, serialize } from "@dao-xyz/borsh";
|
|
7
10
|
export class DirectBlock extends DirectStream {
|
|
8
11
|
remoteBlocks;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libp2p.js","sourceRoot":"","sources":["../../src/libp2p.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAA+B,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,OAAO,WAAY,SAAQ,YAAY;IACpC,YAAY,CAAe;IAC3B,QAAQ,CAAM;IACd,iBAAiB,CAAM;IAE/B,YACC,UAAiC,EACjC,OAKC;QAED,KAAK,CAAC,UAAU,EAAE,CAAC,kBAAkB,CAAC,EAAE;YACvC,4BAA4B,EAAE,OAAO,EAAE,4BAA4B,IAAI,EAAE;YACzE,eAAe,EAAE,OAAO,EAAE,eAAe,IAAI,IAAI;YACjD,iBAAiB,EAAE;gBAClB,MAAM,EAAE,KAAK;gBACb,M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{ BlockStore } from "./interface.js";
|
|
2
|
-
import { Blocks as IBlocks } from "@peerbit/blocks-interface";
|
|
1
|
+
import type { BlockStore } from "./interface.js";
|
|
2
|
+
import type { Blocks as IBlocks } from "@peerbit/blocks-interface";
|
|
3
3
|
import { PublicSignKey } from "@peerbit/crypto";
|
|
4
4
|
import { AnyBlockStore } from "./any-blockstore.js";
|
|
5
|
-
import { GetOptions } from "@peerbit/blocks-interface";
|
|
5
|
+
import type { GetOptions } from "@peerbit/blocks-interface";
|
|
6
6
|
import type { PeerId } from "@libp2p/interface";
|
|
7
7
|
export declare class BlockMessage {
|
|
8
8
|
}
|
|
@@ -57,3 +57,4 @@ export declare class RemoteBlocks implements IBlocks {
|
|
|
57
57
|
size(): Promise<number>;
|
|
58
58
|
get status(): import("./interface.js").StoreStatus;
|
|
59
59
|
}
|
|
60
|
+
//# sourceMappingURL=remote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/remote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAUnE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,qBAAa,YAAY;CAAI;AAE7B,qBACa,YAAa,SAAQ,YAAY;IAE7C,GAAG,EAAE,MAAM,CAAC;gBAEA,GAAG,EAAE,MAAM;CAIvB;AAED,qBACa,aAAc,SAAQ,YAAY;IAE9C,GAAG,EAAE,MAAM,CAAC;IAGZ,KAAK,EAAE,UAAU,CAAC;gBAEN,GAAG,EAAE,MA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E,MAAM,EACX,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,GAC9B,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAgB5B,EAAE,CAAC,GAAG,EAAE,MAAM;IAIb,QAAQ,IAAI,cAAc,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAM7D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAO5B,SAAS,CAAC,IAAI,EAAE,YAAY;IAG5B,WAAW,CAAC,SAAS,EAAE,aAAa;YAMtB,kBAAkB;YAclB,cAAc;IAyEtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAc3B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9C,IAAI;IAIV,IAAI,MAAM,yCAMT;CACD"}
|
|
@@ -9,6 +9,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { stringifyCid, cidifyString, codecCodes, checkDecodeBlock } from "./block.js";
|
|
11
11
|
import { variant, field } from "@dao-xyz/borsh";
|
|
12
|
+
import { CID } from "multiformats";
|
|
13
|
+
import {} from "multiformats/block";
|
|
14
|
+
import { PublicSignKey } from "@peerbit/crypto";
|
|
15
|
+
import { AnyBlockStore } from "./any-blockstore.js";
|
|
12
16
|
import PQueue from "p-queue";
|
|
13
17
|
import { AbortError } from "@peerbit/time";
|
|
14
18
|
import { TypedEventEmitter, CustomEvent } from "@libp2p/interface";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/remote.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,GAAG,EA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-
|
|
2
|
+
"name": "@peerbit/blocks",
|
|
3
|
+
"version": "2.0.32-a9206a8",
|
|
4
|
+
"description": "Block store streaming",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"types": "./dist/src/index.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
"*": {
|
|
9
|
+
"*": [
|
|
10
|
+
"*",
|
|
11
|
+
"dist/*",
|
|
12
|
+
"dist/src/*",
|
|
13
|
+
"dist/src/*/index"
|
|
14
|
+
],
|
|
15
|
+
"src/*": [
|
|
16
|
+
"*",
|
|
17
|
+
"dist/*",
|
|
18
|
+
"dist/src/*",
|
|
19
|
+
"dist/src/*/index"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"src",
|
|
25
|
+
"dist",
|
|
26
|
+
"!dist/e2e",
|
|
27
|
+
"!dist/test",
|
|
28
|
+
"!**/*.tsbuildinfo"
|
|
29
|
+
],
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/src/index.d.ts",
|
|
33
|
+
"import": "./dist/src/index.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"eslintConfig": {
|
|
37
|
+
"extends": "ipfs",
|
|
38
|
+
"parserOptions": {
|
|
39
|
+
"project": true,
|
|
40
|
+
"sourceType": "module"
|
|
41
|
+
},
|
|
42
|
+
"ignorePatterns": [
|
|
43
|
+
"!.aegir.js",
|
|
44
|
+
"test/ts-use",
|
|
45
|
+
"*.d.ts"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"clean": "aegir clean",
|
|
53
|
+
"build": "aegir build --no-bundle",
|
|
54
|
+
"test": "aegir test --target node"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=16.15.1"
|
|
58
|
+
},
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "git+https://github.com/dao-xyz/peerbit.git"
|
|
62
|
+
},
|
|
63
|
+
"keywords": [
|
|
64
|
+
"peerbit"
|
|
65
|
+
],
|
|
66
|
+
"author": "dao.xyz",
|
|
67
|
+
"license": "MIT",
|
|
68
|
+
"bugs": {
|
|
69
|
+
"url": "https://github.com/dao-xyz/peerbit/issues"
|
|
70
|
+
},
|
|
71
|
+
"homepage": "https://github.com/dao-xyz/peerbit#readme",
|
|
72
|
+
"localMaintainers": [
|
|
73
|
+
"dao.xyz"
|
|
74
|
+
],
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@peerbit/libp2p-test-utils": "2.1.3-a9206a8"
|
|
77
|
+
},
|
|
78
|
+
"dependencies": {
|
|
79
|
+
"@dao-xyz/borsh": "^5.2.2",
|
|
80
|
+
"@peerbit/any-store": "2.0.2-a9206a8",
|
|
81
|
+
"@peerbit/stream": "4.0.5-a9206a8",
|
|
82
|
+
"@peerbit/blocks-interface": "1.2.19-a9206a8",
|
|
83
|
+
"@peerbit/crypto": "2.2.0-a9206a8",
|
|
84
|
+
"@ipld/dag-cbor": "^9.0.2",
|
|
85
|
+
"libp2p": "^1.2.3",
|
|
86
|
+
"multiformats": "^13.0.1"
|
|
87
|
+
}
|
|
65
88
|
}
|
package/src/any-blockstore.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Blocks } from "@peerbit/blocks-interface";
|
|
1
|
+
import { type Blocks } from "@peerbit/blocks-interface";
|
|
2
2
|
import {
|
|
3
3
|
cidifyString,
|
|
4
4
|
codecCodes,
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
} from "./block.js";
|
|
9
9
|
import { decode, type Block } from "multiformats/block";
|
|
10
10
|
import { waitFor } from "@peerbit/time";
|
|
11
|
-
import { PeerId } from "@libp2p/interface";
|
|
11
|
+
import { type PeerId } from "@libp2p/interface";
|
|
12
12
|
import { PublicSignKey } from "@peerbit/crypto";
|
|
13
|
-
import {
|
|
13
|
+
import { createStore } from "@peerbit/any-store";
|
|
14
|
+
import { type AnyStore } from "@peerbit/any-store-interface";
|
|
14
15
|
|
|
15
16
|
export class AnyBlockStore implements Blocks {
|
|
16
17
|
private _store: AnyStore;
|
|
@@ -36,7 +37,7 @@ export class AnyBlockStore implements Blocks {
|
|
|
36
37
|
if (!bytes) {
|
|
37
38
|
return undefined;
|
|
38
39
|
}
|
|
39
|
-
const codec = codecCodes[cidObject.code];
|
|
40
|
+
const codec = (codecCodes as any)[cidObject.code];
|
|
40
41
|
const block = await decode({
|
|
41
42
|
bytes,
|
|
42
43
|
codec,
|
package/src/block.ts
CHANGED
|
@@ -47,7 +47,7 @@ export const checkDecodeBlock = async (
|
|
|
47
47
|
): Promise<Block<any, any, any, any>> => {
|
|
48
48
|
const cidObject =
|
|
49
49
|
typeof expectedCID === "string" ? cidifyString(expectedCID) : expectedCID;
|
|
50
|
-
const codec = options.codec || codecCodes[cidObject.code];
|
|
50
|
+
const codec = options.codec || (codecCodes as any)[cidObject.code];
|
|
51
51
|
const block = await decode({
|
|
52
52
|
bytes: bytes,
|
|
53
53
|
codec,
|
|
@@ -103,7 +103,7 @@ export const createBlock = async (
|
|
|
103
103
|
links?: string[];
|
|
104
104
|
}
|
|
105
105
|
): Promise<Block<any, any, any, any>> => {
|
|
106
|
-
const codec = codecMap[format];
|
|
106
|
+
const codec = (codecMap as any)[format];
|
|
107
107
|
value = prepareBlockWrite(value, codec, options?.links);
|
|
108
108
|
const block = await encode({
|
|
109
109
|
value,
|
package/src/interface.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MaybePromise } from "@peerbit/any-store";
|
|
2
|
-
import { Blocks as IBlockStore } from "@peerbit/blocks-interface";
|
|
1
|
+
import type { MaybePromise } from "@peerbit/any-store-interface";
|
|
2
|
+
import type { Blocks as IBlockStore } from "@peerbit/blocks-interface";
|
|
3
3
|
|
|
4
4
|
export type StoreStatus = MaybePromise<
|
|
5
5
|
"open" | "opening" | "closed" | "closing"
|
package/src/libp2p.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Blocks as IBlocks } from "@peerbit/blocks-interface";
|
|
1
|
+
import { type Blocks as IBlocks } from "@peerbit/blocks-interface";
|
|
3
2
|
import { DirectStream } from "@peerbit/stream";
|
|
4
|
-
import { DirectStreamComponents } from "@peerbit/stream";
|
|
3
|
+
import { type DirectStreamComponents } from "@peerbit/stream";
|
|
5
4
|
import { AnyBlockStore } from "./any-blockstore.js";
|
|
6
|
-
import { GetOptions } from "@peerbit/blocks-interface";
|
|
5
|
+
import type { GetOptions } from "@peerbit/blocks-interface";
|
|
7
6
|
import { createStore } from "@peerbit/any-store";
|
|
8
7
|
import { BlockMessage, RemoteBlocks } from "./remote.js";
|
|
9
8
|
import { PublicSignKey } from "@peerbit/crypto";
|
package/src/remote.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BlockStore } from "./interface.js";
|
|
2
|
-
import { Blocks as IBlocks } from "@peerbit/blocks-interface";
|
|
1
|
+
import type { BlockStore } from "./interface.js";
|
|
2
|
+
import type { Blocks as IBlocks } from "@peerbit/blocks-interface";
|
|
3
3
|
import {
|
|
4
4
|
stringifyCid,
|
|
5
5
|
cidifyString,
|
|
@@ -11,13 +11,13 @@ import { CID } from "multiformats";
|
|
|
11
11
|
import { type Block } from "multiformats/block";
|
|
12
12
|
import { PublicSignKey } from "@peerbit/crypto";
|
|
13
13
|
import { AnyBlockStore } from "./any-blockstore.js";
|
|
14
|
-
import { GetOptions } from "@peerbit/blocks-interface";
|
|
14
|
+
import type { GetOptions } from "@peerbit/blocks-interface";
|
|
15
15
|
import PQueue from "p-queue";
|
|
16
16
|
import { AbortError } from "@peerbit/time";
|
|
17
17
|
import type { PeerId } from "@libp2p/interface";
|
|
18
18
|
import { TypedEventEmitter, CustomEvent } from "@libp2p/interface";
|
|
19
19
|
|
|
20
|
-
export class BlockMessage {}
|
|
20
|
+
export class BlockMessage { }
|
|
21
21
|
|
|
22
22
|
@variant(0)
|
|
23
23
|
export class BlockRequest extends BlockMessage {
|
|
@@ -173,7 +173,7 @@ export class RemoteBlocks implements IBlocks {
|
|
|
173
173
|
cidObject: CID,
|
|
174
174
|
options: { timeout?: number; hasher?: any; from?: string[] } = {}
|
|
175
175
|
): Promise<Uint8Array | undefined> {
|
|
176
|
-
const codec = codecCodes[cidObject.code];
|
|
176
|
+
const codec = (codecCodes as any)[cidObject.code];
|
|
177
177
|
let promise = this._readFromPeersPromises.get(cidString);
|
|
178
178
|
if (!promise) {
|
|
179
179
|
promise = new Promise<Block<any, any, any, 1> | undefined>(
|
package/LICENSE
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
-
|
|
181
|
-
To apply the Apache License to your work, attach the following
|
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
-
replaced with your own identifying information. (Don't include
|
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
-
comment syntax for the file format. We also recommend that a
|
|
186
|
-
file or class name and description of purpose be included on the
|
|
187
|
-
same "printed page" as the copyright notice for easier
|
|
188
|
-
identification within third-party archives.
|
|
189
|
-
|
|
190
|
-
Copyright 2022 dao.xyz
|
|
191
|
-
|
|
192
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
-
you may not use this file except in compliance with the License.
|
|
194
|
-
You may obtain a copy of the License at
|
|
195
|
-
|
|
196
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
-
|
|
198
|
-
Unless required by applicable law or agreed to in writing, software
|
|
199
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
-
See the License for the specific language governing permissions and
|
|
202
|
-
limitations under the License.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"any-blockstore.js","sourceRoot":"","sources":["../../src/any-blockstore.ts"],"names":[],"mappings":"AACA,OAAO,EACN,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAc,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAY,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,OAAO,aAAa;IACjB,MAAM,CAAW;IACjB,QAAQ,CAAe;IACvB,QAAQ,CAA0B;IAClC,gBAAgB,CAAkB;IAC1C,YAAY,QAAkB,WAAW,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,CAAC,sBAAsB,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,wFAAwF;IACzF,CAAC;IAED,OAAO,CAAC,IAA4B;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IAED,IAAI,MAAM;QACT,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAClC,CAAC;aAAM,CAAC;YACP,OAAO,QAAQ,CAAC;QACjB,CAAC;IACF,CAAC;CACD"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|