p2party 0.7.7 → 0.7.8
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/lib/api/webrtc/baseQuery.d.ts +0 -1
- package/lib/api/webrtc/baseQuery.d.ts.map +1 -1
- package/lib/api/webrtc/disconnectFromRoomQuery.d.ts.map +1 -1
- package/lib/api/webrtc/index.d.ts +0 -3
- package/lib/api/webrtc/index.d.ts.map +1 -1
- package/lib/api/webrtc/interfaces.d.ts +6 -1
- package/lib/api/webrtc/interfaces.d.ts.map +1 -1
- package/lib/api/webrtc/openChannelQuery.d.ts +0 -1
- package/lib/api/webrtc/openChannelQuery.d.ts.map +1 -1
- package/lib/api/webrtc/sendMessageQuery.d.ts +0 -1
- package/lib/api/webrtc/sendMessageQuery.d.ts.map +1 -1
- package/lib/api/webrtc/setDescriptionQuery.d.ts +0 -1
- package/lib/api/webrtc/setDescriptionQuery.d.ts.map +1 -1
- package/lib/cryptography/memory.d.ts +0 -2
- package/lib/db.worker.js +1 -1
- package/lib/handlers/handleOpenChannel.d.ts +5 -5
- package/lib/handlers/handleReceiveMessage.d.ts +1 -1
- package/lib/handlers/handleReceiveMessageOld.d.ts +16 -0
- package/lib/handlers/handleSendMessage.d.ts +1 -2
- package/lib/handlers/handleWebSocketMessage.d.ts +0 -3
- package/lib/index.d.ts +0 -4
- package/lib/index.js +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/utils/allocators.d.ts +22 -0
- package/lib/utils/constants.d.ts +10 -0
- package/lib/utils/metadata.d.ts +0 -1
- package/lib/utils/splitToChunks.d.ts +2 -4
- package/package.json +17 -17
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LibCrypto } from "../cryptography/libcrypto";
|
|
2
|
+
export declare const allocateSendMessage: (encryptionModule: LibCrypto) => {
|
|
3
|
+
ptr1: number;
|
|
4
|
+
ptr2: number;
|
|
5
|
+
ptr3: number;
|
|
6
|
+
ptr4: number;
|
|
7
|
+
ptr5: number;
|
|
8
|
+
ptr6: number;
|
|
9
|
+
ptr7: number;
|
|
10
|
+
ptr8: number;
|
|
11
|
+
ptr9: number;
|
|
12
|
+
ptr10: number;
|
|
13
|
+
senderEphemeralPublicKey: Uint8Array<ArrayBuffer>;
|
|
14
|
+
senderEphemeralSecretKey: Uint8Array<ArrayBuffer>;
|
|
15
|
+
seedBytes: Uint8Array<ArrayBuffer>;
|
|
16
|
+
senderEphemeralSignature: Uint8Array<ArrayBuffer>;
|
|
17
|
+
chunkArray: Uint8Array<ArrayBuffer>;
|
|
18
|
+
receiverPublicKeyArray: Uint8Array<ArrayBuffer>;
|
|
19
|
+
nonceArray: Uint8Array<ArrayBuffer>;
|
|
20
|
+
encryptedArray: Uint8Array<ArrayBuffer>;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=allocators.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const MESSAGE_LEN: number;
|
|
2
|
+
export declare const MAX_BUFFERED_AMOUNT: number;
|
|
3
|
+
export declare const PROOF_LEN: number;
|
|
4
|
+
export declare const NAME_LEN = 256;
|
|
5
|
+
export declare const METADATA_LEN: number;
|
|
6
|
+
export declare const IMPORTANT_DATA_LEN: number;
|
|
7
|
+
export declare const CHUNK_LEN: number;
|
|
8
|
+
export declare const DECRYPTED_LEN: number;
|
|
9
|
+
export declare const ENCRYPTED_LEN: number;
|
|
10
|
+
//# sourceMappingURL=constants.d.ts.map
|
package/lib/utils/metadata.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export interface BasicMetadata {
|
|
|
11
11
|
export interface Metadata extends BasicMetadata {
|
|
12
12
|
chunkIndex: number;
|
|
13
13
|
}
|
|
14
|
-
export declare const METADATA_LEN: number;
|
|
15
14
|
export declare const formatSize: (size: number) => string;
|
|
16
15
|
export declare const serializeMetadata: (metadata: Metadata) => Uint8Array;
|
|
17
16
|
export declare const deserializeMetadata: (buffer: Uint8Array) => Metadata;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { BaseQueryApi } from "@reduxjs/toolkit/query";
|
|
2
2
|
import type { Room } from "../reducers/roomSlice";
|
|
3
|
-
|
|
4
|
-
export declare const IMPORTANT_DATA_LEN: number;
|
|
5
|
-
export declare const CHUNK_LEN: number;
|
|
3
|
+
import type { LibCrypto } from "../cryptography/libcrypto";
|
|
6
4
|
export declare const metadataSchemaVersions: number[];
|
|
7
5
|
export declare const CANCEL_SEND = "CANCEL_SEND";
|
|
8
6
|
/**
|
|
@@ -16,7 +14,7 @@ export declare const CANCEL_SEND = "CANCEL_SEND";
|
|
|
16
14
|
* @param percentageFilledChunk - If = 1 then all chunk is filled with useful data. Range (0, 1].
|
|
17
15
|
* @returns An object containing the chunks, their merkle proofs and the last valid byte index.
|
|
18
16
|
*/
|
|
19
|
-
export declare const splitToChunks: (message: string | File, api: BaseQueryApi, label: string, room: Room, minChunks?: number, chunkSize?: number, percentageFilledChunk?: number, metadataSchemaVersion?: number) => Promise<{
|
|
17
|
+
export declare const splitToChunks: (message: string | File, api: BaseQueryApi, label: string, room: Room, merkleModule: LibCrypto, minChunks?: number, chunkSize?: number, percentageFilledChunk?: number, metadataSchemaVersion?: number) => Promise<{
|
|
20
18
|
merkleRoot: Uint8Array;
|
|
21
19
|
merkleRootHex: string;
|
|
22
20
|
hash: Uint8Array;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "p2party",
|
|
3
3
|
"description": "Create WebRTC mesh networks in two LOC",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.8",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/p2party/p2party-js.git"
|
|
@@ -79,36 +79,36 @@
|
|
|
79
79
|
"docs": "typedoc --out docs --excludeInternal src/index.ts"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@aws-sdk/client-s3": "^3.
|
|
83
|
-
"@eslint/js": "^9.
|
|
84
|
-
"@jest/globals": "^
|
|
85
|
-
"@rollup/plugin-commonjs": "^
|
|
82
|
+
"@aws-sdk/client-s3": "^3.892.0",
|
|
83
|
+
"@eslint/js": "^9.35.0",
|
|
84
|
+
"@jest/globals": "^30.1.2",
|
|
85
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
86
86
|
"@rollup/plugin-json": "^6.1.0",
|
|
87
|
-
"@rollup/plugin-node-resolve": "^
|
|
87
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
88
88
|
"@rollup/plugin-replace": "^6.0.2",
|
|
89
89
|
"@rollup/plugin-terser": "^0.4.4",
|
|
90
|
-
"@rollup/plugin-typescript": "^
|
|
91
|
-
"@types/emscripten": "^1.41.
|
|
92
|
-
"@types/eslint__js": "^
|
|
90
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
91
|
+
"@types/emscripten": "^1.41.2",
|
|
92
|
+
"@types/eslint__js": "^9.14.0",
|
|
93
93
|
"@web/rollup-plugin-import-meta-assets": "^2.3.0",
|
|
94
|
-
"cross-env": "^
|
|
95
|
-
"dotenv": "^
|
|
94
|
+
"cross-env": "^10.0.0",
|
|
95
|
+
"dotenv": "^17.2.2",
|
|
96
96
|
"dts-bundle-generator": "^9.5.1",
|
|
97
|
-
"eslint": "^9.
|
|
98
|
-
"eslint-plugin-jest": "^
|
|
97
|
+
"eslint": "^9.35.0",
|
|
98
|
+
"eslint-plugin-jest": "^29.0.1",
|
|
99
99
|
"idb": "^8.0.3",
|
|
100
|
-
"jest": "^
|
|
100
|
+
"jest": "^30.1.3",
|
|
101
101
|
"npm-run-all": "^4.1.5",
|
|
102
102
|
"prettier": "^3.6.2",
|
|
103
|
-
"rollup": "^4.50.
|
|
103
|
+
"rollup": "^4.50.2",
|
|
104
104
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
105
105
|
"rollup-plugin-copy": "^3.5.0",
|
|
106
106
|
"rollup-plugin-dts": "^6.2.3",
|
|
107
107
|
"terser": "^5.44.0",
|
|
108
|
-
"ts-jest": "^29.4.
|
|
108
|
+
"ts-jest": "^29.4.3",
|
|
109
109
|
"tslib": "^2.8.1",
|
|
110
110
|
"typescript": "^5.9.2",
|
|
111
|
-
"typescript-eslint": "^8.
|
|
111
|
+
"typescript-eslint": "^8.44.0"
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
114
|
"@reduxjs/toolkit": "^2.9.0",
|