@claw-network/core 0.6.1 → 0.6.4
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/crypto/blake3-hasher.d.ts +24 -0
- package/dist/crypto/blake3-hasher.d.ts.map +1 -0
- package/dist/crypto/blake3-hasher.js +36 -0
- package/dist/crypto/blake3-hasher.js.map +1 -0
- package/dist/crypto/index.d.ts +1 -0
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.js +1 -0
- package/dist/crypto/index.js.map +1 -1
- package/dist/p2p/delivery-external.d.ts +56 -0
- package/dist/p2p/delivery-external.d.ts.map +1 -0
- package/dist/p2p/delivery-external.js +64 -0
- package/dist/p2p/delivery-external.js.map +1 -0
- package/dist/p2p/index.d.ts +1 -0
- package/dist/p2p/index.d.ts.map +1 -1
- package/dist/p2p/index.js +1 -0
- package/dist/p2p/index.js.map +1 -1
- package/dist/p2p/topics.d.ts +2 -0
- package/dist/p2p/topics.d.ts.map +1 -1
- package/dist/p2p/topics.js +2 -0
- package/dist/p2p/topics.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Incremental BLAKE3 hasher.
|
|
3
|
+
* Wraps @noble/hashes blake3.create() to expose a stable streaming API.
|
|
4
|
+
*/
|
|
5
|
+
export interface Blake3Hasher {
|
|
6
|
+
/** Feed bytes into the running hash. Returns `this` for chaining. */
|
|
7
|
+
update(data: Uint8Array): this;
|
|
8
|
+
/** Finalize and return the raw 32-byte digest. Idempotent. */
|
|
9
|
+
digest(): Uint8Array;
|
|
10
|
+
/** Finalize and return the hex-encoded 64-char digest. Idempotent. */
|
|
11
|
+
hexDigest(): string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create a new incremental BLAKE3 hasher.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const h = createBlake3Hasher();
|
|
19
|
+
* h.update(chunk1).update(chunk2);
|
|
20
|
+
* const hash = h.hexDigest();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function createBlake3Hasher(): Blake3Hasher;
|
|
24
|
+
//# sourceMappingURL=blake3-hasher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blake3-hasher.d.ts","sourceRoot":"","sources":["../../src/crypto/blake3-hasher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,YAAY;IAC3B,qEAAqE;IACrE,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAC/B,8DAA8D;IAC9D,MAAM,IAAI,UAAU,CAAC;IACrB,sEAAsE;IACtE,SAAS,IAAI,MAAM,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,CAmBjD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Incremental BLAKE3 hasher.
|
|
3
|
+
* Wraps @noble/hashes blake3.create() to expose a stable streaming API.
|
|
4
|
+
*/
|
|
5
|
+
import { blake3 } from '@noble/hashes/blake3';
|
|
6
|
+
import { bytesToHex } from '../utils/bytes.js';
|
|
7
|
+
/**
|
|
8
|
+
* Create a new incremental BLAKE3 hasher.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const h = createBlake3Hasher();
|
|
13
|
+
* h.update(chunk1).update(chunk2);
|
|
14
|
+
* const hash = h.hexDigest();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export function createBlake3Hasher() {
|
|
18
|
+
const h = blake3.create({});
|
|
19
|
+
let finalized = null;
|
|
20
|
+
return {
|
|
21
|
+
update(data) {
|
|
22
|
+
h.update(data);
|
|
23
|
+
return this;
|
|
24
|
+
},
|
|
25
|
+
digest() {
|
|
26
|
+
if (!finalized) {
|
|
27
|
+
finalized = h.digest();
|
|
28
|
+
}
|
|
29
|
+
return finalized;
|
|
30
|
+
},
|
|
31
|
+
hexDigest() {
|
|
32
|
+
return bytesToHex(this.digest());
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=blake3-hasher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blake3-hasher.js","sourceRoot":"","sources":["../../src/crypto/blake3-hasher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAW/C;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC5B,IAAI,SAAS,GAAsB,IAAI,CAAC;IAExC,OAAO;QACL,MAAM,CAAC,IAAgB;YACrB,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACf,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM;YACJ,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;YACzB,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS;YACP,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/crypto/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/crypto/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/crypto/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
package/dist/crypto/index.js
CHANGED
package/dist/crypto/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/crypto/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/crypto/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delivery-external: point-to-point content transfer over libp2p streams.
|
|
3
|
+
*
|
|
4
|
+
* Protocol: /clawnet/1.0.0/delivery-external
|
|
5
|
+
*
|
|
6
|
+
* Used when a consumer node needs to fetch the actual content bytes for a
|
|
7
|
+
* deliverable whose transport.method === 'external' and whose transport.uri
|
|
8
|
+
* uses the `p2p://` scheme.
|
|
9
|
+
*
|
|
10
|
+
* Wire format (length-prefixed JSON header + raw bytes):
|
|
11
|
+
* [4 bytes big-endian: header-length][header-JSON][raw-content-bytes]
|
|
12
|
+
*
|
|
13
|
+
* Request message:
|
|
14
|
+
* { version: 1, deliverableId: string, requesterDid: string }
|
|
15
|
+
*
|
|
16
|
+
* Response message:
|
|
17
|
+
* Header: { version: 1, deliverableId: string, size: number, contentHash: string }
|
|
18
|
+
* Body: raw content bytes, exactly `size` bytes long.
|
|
19
|
+
*
|
|
20
|
+
* Spec: docs/implementation/deliverable-spec.md §6.7
|
|
21
|
+
*/
|
|
22
|
+
export declare const DELIVERY_EXTERNAL_PROTOCOL = "/clawnet/1.0.0/delivery-external";
|
|
23
|
+
/** Sent by the requester (consumer) to initiate a content pull. */
|
|
24
|
+
export interface DeliveryExternalRequest {
|
|
25
|
+
version: 1;
|
|
26
|
+
/** The deliverable ID to fetch. */
|
|
27
|
+
deliverableId: string;
|
|
28
|
+
/** DID of the requesting node (for audit / access control). */
|
|
29
|
+
requesterDid: string;
|
|
30
|
+
}
|
|
31
|
+
/** Sent by the provider as the response header (followed immediately by raw bytes). */
|
|
32
|
+
export interface DeliveryExternalResponseHeader {
|
|
33
|
+
version: 1;
|
|
34
|
+
deliverableId: string;
|
|
35
|
+
/** Content size in bytes. */
|
|
36
|
+
size: number;
|
|
37
|
+
/** BLAKE3 hex hash of the content. */
|
|
38
|
+
contentHash: string;
|
|
39
|
+
}
|
|
40
|
+
/** Returned to the caller when provider does not have the asset. */
|
|
41
|
+
export interface DeliveryExternalNotFound {
|
|
42
|
+
version: 1;
|
|
43
|
+
deliverableId: string;
|
|
44
|
+
error: 'not_found';
|
|
45
|
+
}
|
|
46
|
+
export type DeliveryExternalResponse = DeliveryExternalResponseHeader | DeliveryExternalNotFound;
|
|
47
|
+
/** Encode a 4-byte big-endian length prefix + JSON header. */
|
|
48
|
+
export declare function encodeHeader(header: Record<string, unknown>): Uint8Array;
|
|
49
|
+
/** Decode the 4-byte length prefix and extract the JSON header bytes. */
|
|
50
|
+
export declare function decodeHeader<T>(data: Uint8Array): {
|
|
51
|
+
header: T;
|
|
52
|
+
bodyOffset: number;
|
|
53
|
+
};
|
|
54
|
+
export declare function isDeliveryExternalRequest(v: unknown): v is DeliveryExternalRequest;
|
|
55
|
+
export declare function isDeliveryExternalNotFound(v: unknown): v is DeliveryExternalNotFound;
|
|
56
|
+
//# sourceMappingURL=delivery-external.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-external.d.ts","sourceRoot":"","sources":["../../src/p2p/delivery-external.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAI7E,mEAAmE;AACnE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,CAAC,CAAC;IACX,mCAAmC;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,uFAAuF;AACvF,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,CAAC,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,oEAAoE;AACpE,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,CAAC,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,GAAG,wBAAwB,CAAC;AAIjG,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,CAOxE;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,GAAG;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAYnF;AAID,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,uBAAuB,CAQlF;AAED,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,wBAAwB,CAIpF"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delivery-external: point-to-point content transfer over libp2p streams.
|
|
3
|
+
*
|
|
4
|
+
* Protocol: /clawnet/1.0.0/delivery-external
|
|
5
|
+
*
|
|
6
|
+
* Used when a consumer node needs to fetch the actual content bytes for a
|
|
7
|
+
* deliverable whose transport.method === 'external' and whose transport.uri
|
|
8
|
+
* uses the `p2p://` scheme.
|
|
9
|
+
*
|
|
10
|
+
* Wire format (length-prefixed JSON header + raw bytes):
|
|
11
|
+
* [4 bytes big-endian: header-length][header-JSON][raw-content-bytes]
|
|
12
|
+
*
|
|
13
|
+
* Request message:
|
|
14
|
+
* { version: 1, deliverableId: string, requesterDid: string }
|
|
15
|
+
*
|
|
16
|
+
* Response message:
|
|
17
|
+
* Header: { version: 1, deliverableId: string, size: number, contentHash: string }
|
|
18
|
+
* Body: raw content bytes, exactly `size` bytes long.
|
|
19
|
+
*
|
|
20
|
+
* Spec: docs/implementation/deliverable-spec.md §6.7
|
|
21
|
+
*/
|
|
22
|
+
import { utf8ToBytes, bytesToUtf8 } from '../utils/bytes.js';
|
|
23
|
+
// ── Protocol constant ─────────────────────────────────────────────
|
|
24
|
+
export const DELIVERY_EXTERNAL_PROTOCOL = '/clawnet/1.0.0/delivery-external';
|
|
25
|
+
// ── Framing helpers ───────────────────────────────────────────────
|
|
26
|
+
/** Encode a 4-byte big-endian length prefix + JSON header. */
|
|
27
|
+
export function encodeHeader(header) {
|
|
28
|
+
const json = utf8ToBytes(JSON.stringify(header));
|
|
29
|
+
const buf = new Uint8Array(4 + json.length);
|
|
30
|
+
const view = new DataView(buf.buffer);
|
|
31
|
+
view.setUint32(0, json.length, false /* big-endian */);
|
|
32
|
+
buf.set(json, 4);
|
|
33
|
+
return buf;
|
|
34
|
+
}
|
|
35
|
+
/** Decode the 4-byte length prefix and extract the JSON header bytes. */
|
|
36
|
+
export function decodeHeader(data) {
|
|
37
|
+
if (data.length < 4) {
|
|
38
|
+
throw new Error('Delivery-external: buffer too short for length prefix');
|
|
39
|
+
}
|
|
40
|
+
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
41
|
+
const headerLen = view.getUint32(0, false /* big-endian */);
|
|
42
|
+
if (data.length < 4 + headerLen) {
|
|
43
|
+
throw new Error(`Delivery-external: buffer truncated (expected ${4 + headerLen}, got ${data.length})`);
|
|
44
|
+
}
|
|
45
|
+
const headerJson = data.subarray(4, 4 + headerLen);
|
|
46
|
+
const header = JSON.parse(bytesToUtf8(headerJson));
|
|
47
|
+
return { header, bodyOffset: 4 + headerLen };
|
|
48
|
+
}
|
|
49
|
+
// ── Type guards ───────────────────────────────────────────────────
|
|
50
|
+
export function isDeliveryExternalRequest(v) {
|
|
51
|
+
if (typeof v !== 'object' || v === null)
|
|
52
|
+
return false;
|
|
53
|
+
const r = v;
|
|
54
|
+
return (r.version === 1 &&
|
|
55
|
+
typeof r.deliverableId === 'string' &&
|
|
56
|
+
typeof r.requesterDid === 'string');
|
|
57
|
+
}
|
|
58
|
+
export function isDeliveryExternalNotFound(v) {
|
|
59
|
+
if (typeof v !== 'object' || v === null)
|
|
60
|
+
return false;
|
|
61
|
+
const r = v;
|
|
62
|
+
return r.version === 1 && r.error === 'not_found';
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=delivery-external.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-external.js","sourceRoot":"","sources":["../../src/p2p/delivery-external.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE7D,qEAAqE;AAErE,MAAM,CAAC,MAAM,0BAA0B,GAAG,kCAAkC,CAAC;AAgC7E,qEAAqE;AAErE,8DAA8D;AAC9D,MAAM,UAAU,YAAY,CAAC,MAA+B;IAC1D,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACvD,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACjB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,YAAY,CAAI,IAAgB;IAC9C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACzE,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC5D,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,SAAS,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,GAAG,SAAS,SAAS,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACzG,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,CAAM,CAAC;IACxD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC;AAC/C,CAAC;AAED,qEAAqE;AAErE,MAAM,UAAU,yBAAyB,CAAC,CAAU;IAClD,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,CAAC,GAAG,CAA4B,CAAC;IACvC,OAAO,CACL,CAAC,CAAC,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,CAAC,aAAa,KAAK,QAAQ;QACnC,OAAO,CAAC,CAAC,YAAY,KAAK,QAAQ,CACnC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,CAAU;IACnD,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,CAAC,GAAG,CAA4B,CAAC;IACvC,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,WAAW,CAAC;AACpD,CAAC"}
|
package/dist/p2p/index.d.ts
CHANGED
package/dist/p2p/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/p2p/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/p2p/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
package/dist/p2p/index.js
CHANGED
package/dist/p2p/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/p2p/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/p2p/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
package/dist/p2p/topics.d.ts
CHANGED
|
@@ -6,5 +6,7 @@ export declare const TOPIC_RESPONSES = "/clawnet/1.0.0/responses";
|
|
|
6
6
|
export declare const PROTOCOL_DELIVERY_AUTH = "/clawnet/1.0.0/delivery-auth";
|
|
7
7
|
/** Point-to-point stream protocol for binary attachment relay between nodes. */
|
|
8
8
|
export declare const PROTOCOL_ATTACHMENT = "/clawnet/1.0.0/attachment";
|
|
9
|
+
/** Point-to-point stream protocol for external deliverable transfer between nodes. */
|
|
10
|
+
export declare const PROTOCOL_DELIVERY_EXTERNAL = "/clawnet/1.0.0/delivery-external";
|
|
9
11
|
export declare const ALL_TOPICS: string[];
|
|
10
12
|
//# sourceMappingURL=topics.d.ts.map
|
package/dist/p2p/topics.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["../../src/p2p/topics.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,cAAc,4BAA4B,CAAC;AACxD,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAE1D,mFAAmF;AACnF,eAAO,MAAM,sBAAsB,iCAAiC,CAAC;AAErE,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAE/D,eAAO,MAAM,UAAU,UAAiE,CAAC"}
|
|
1
|
+
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["../../src/p2p/topics.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,cAAc,4BAA4B,CAAC;AACxD,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAE1D,mFAAmF;AACnF,eAAO,MAAM,sBAAsB,iCAAiC,CAAC;AAErE,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAE/D,sFAAsF;AACtF,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E,eAAO,MAAM,UAAU,UAAiE,CAAC"}
|
package/dist/p2p/topics.js
CHANGED
|
@@ -6,5 +6,7 @@ export const TOPIC_RESPONSES = '/clawnet/1.0.0/responses';
|
|
|
6
6
|
export const PROTOCOL_DELIVERY_AUTH = '/clawnet/1.0.0/delivery-auth';
|
|
7
7
|
/** Point-to-point stream protocol for binary attachment relay between nodes. */
|
|
8
8
|
export const PROTOCOL_ATTACHMENT = '/clawnet/1.0.0/attachment';
|
|
9
|
+
/** Point-to-point stream protocol for external deliverable transfer between nodes. */
|
|
10
|
+
export const PROTOCOL_DELIVERY_EXTERNAL = '/clawnet/1.0.0/delivery-external';
|
|
9
11
|
export const ALL_TOPICS = [TOPIC_EVENTS, TOPIC_MARKETS, TOPIC_REQUESTS, TOPIC_RESPONSES];
|
|
10
12
|
//# sourceMappingURL=topics.js.map
|
package/dist/p2p/topics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topics.js","sourceRoot":"","sources":["../../src/p2p/topics.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,uBAAuB,CAAC;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,wBAAwB,CAAC;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG,yBAAyB,CAAC;AACxD,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAE1D,mFAAmF;AACnF,MAAM,CAAC,MAAM,sBAAsB,GAAG,8BAA8B,CAAC;AAErE,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAE/D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"topics.js","sourceRoot":"","sources":["../../src/p2p/topics.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,uBAAuB,CAAC;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,wBAAwB,CAAC;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG,yBAAyB,CAAC;AACxD,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAE1D,mFAAmF;AACnF,MAAM,CAAC,MAAM,sBAAsB,GAAG,8BAA8B,CAAC;AAErE,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAE/D,sFAAsF;AACtF,MAAM,CAAC,MAAM,0BAA0B,GAAG,kCAAkC,CAAC;AAE7E,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC"}
|