@zkpassport/sdk 0.2.0 → 0.2.1
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/cjs/encryption.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function generateECDHKeyPair(): Promise<{
|
|
2
|
-
privateKey:
|
|
3
|
-
publicKey:
|
|
2
|
+
privateKey: import("@noble/secp256k1").Bytes;
|
|
3
|
+
publicKey: import("@noble/secp256k1").Bytes;
|
|
4
4
|
}>;
|
|
5
|
-
export declare function getSharedSecret(privateKey: string, publicKey: string): Promise<Uint8Array
|
|
6
|
-
export declare function encrypt(message: string, sharedSecret: Uint8Array, topic: string): Promise<Uint8Array
|
|
5
|
+
export declare function getSharedSecret(privateKey: string, publicKey: string): Promise<Uint8Array<ArrayBuffer>>;
|
|
6
|
+
export declare function encrypt(message: string, sharedSecret: Uint8Array, topic: string): Promise<Uint8Array<ArrayBufferLike>>;
|
|
7
7
|
export declare function decrypt(ciphertext: Uint8Array, sharedSecret: Uint8Array, topic: string): Promise<string>;
|
package/dist/cjs/encryption.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.generateECDHKeyPair = generateECDHKeyPair;
|
|
27
37
|
exports.getSharedSecret = getSharedSecret;
|
package/dist/esm/encryption.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function generateECDHKeyPair(): Promise<{
|
|
2
|
-
privateKey:
|
|
3
|
-
publicKey:
|
|
2
|
+
privateKey: import("@noble/secp256k1").Bytes;
|
|
3
|
+
publicKey: import("@noble/secp256k1").Bytes;
|
|
4
4
|
}>;
|
|
5
|
-
export declare function getSharedSecret(privateKey: string, publicKey: string): Promise<Uint8Array
|
|
6
|
-
export declare function encrypt(message: string, sharedSecret: Uint8Array, topic: string): Promise<Uint8Array
|
|
5
|
+
export declare function getSharedSecret(privateKey: string, publicKey: string): Promise<Uint8Array<ArrayBuffer>>;
|
|
6
|
+
export declare function encrypt(message: string, sharedSecret: Uint8Array, topic: string): Promise<Uint8Array<ArrayBufferLike>>;
|
|
7
7
|
export declare function decrypt(ciphertext: Uint8Array, sharedSecret: Uint8Array, topic: string): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zkpassport/sdk",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Privacy-preserving identity verification using passports and ID cards",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
7
7
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"README.md"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"
|
|
15
|
+
"prepublishOnly": "npm run build",
|
|
16
16
|
"build": "npm run build:esm && npm run build:cjs",
|
|
17
17
|
"build:esm": "tsc -p tsconfig.json",
|
|
18
18
|
"build:cjs": "tsc -p tsconfig.cjs.json"
|