@skalenetwork/privacy-sdk 0.1.0-develop.0

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.
@@ -0,0 +1,17 @@
1
+ export { C as CtxPromise, a as CtxResult, g as getCtxHash, b as getCtxHashes, w as waitForCtx } from '../ctx-ifn_jhPL.js';
2
+ import { Hex } from 'viem';
3
+ import { T as TransferData, V as ViewerKeypair } from '../types-WaeCtQlG.js';
4
+
5
+ declare function decryptEciesPayload(encryptedHex: Hex, privateKey: Hex): Uint8Array;
6
+ declare function decryptBalance(encryptedHex: Hex, privateKey: Hex): Promise<bigint>;
7
+ declare function decryptTransferData(encryptedHex: Hex, privateKey: Hex): Promise<TransferData>;
8
+
9
+ declare function parsePublicKeyCoordinates(publicKey: Hex): {
10
+ x: Hex;
11
+ y: Hex;
12
+ };
13
+ declare function deriveAddressFromPublicKey(publicKey: Hex): Hex;
14
+ declare function validateViewerKey(publicKey: Hex, expectedViewerAddress?: Hex): string | undefined;
15
+ declare function deriveViewerKeypair(signature: Hex): ViewerKeypair;
16
+
17
+ export { decryptBalance, decryptEciesPayload, decryptTransferData, deriveAddressFromPublicKey, deriveViewerKeypair, parsePublicKeyCoordinates, validateViewerKey };
@@ -0,0 +1,27 @@
1
+ import {
2
+ getCtxHash,
3
+ getCtxHashes,
4
+ waitForCtx
5
+ } from "../chunk-Y6NM73JA.js";
6
+ import {
7
+ decryptBalance,
8
+ decryptEciesPayload,
9
+ decryptTransferData,
10
+ deriveAddressFromPublicKey,
11
+ deriveViewerKeypair,
12
+ parsePublicKeyCoordinates,
13
+ validateViewerKey
14
+ } from "../chunk-K5WS3F4Q.js";
15
+ export {
16
+ decryptBalance,
17
+ decryptEciesPayload,
18
+ decryptTransferData,
19
+ deriveAddressFromPublicKey,
20
+ deriveViewerKeypair,
21
+ getCtxHash,
22
+ getCtxHashes,
23
+ parsePublicKeyCoordinates,
24
+ validateViewerKey,
25
+ waitForCtx
26
+ };
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@skalenetwork/privacy-sdk",
3
+ "version": "0.1.0-develop.0",
4
+ "description": "SDK for interacting with SKALE Programmable Privacy",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/skalenetwork/private-pay.git",
8
+ "directory": "packages/privacy-sdk"
9
+ },
10
+ "homepage": "https://github.com/skalenetwork/private-pay/tree/main/packages/privacy-sdk#readme",
11
+ "type": "module",
12
+ "main": "./dist/index.cjs",
13
+ "module": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js",
19
+ "require": "./dist/index.cjs"
20
+ },
21
+ "./actions": {
22
+ "types": "./dist/actions/index.d.ts",
23
+ "import": "./dist/actions/index.js",
24
+ "require": "./dist/actions/index.cjs"
25
+ },
26
+ "./utils": {
27
+ "types": "./dist/utils/index.d.ts",
28
+ "import": "./dist/utils/index.js",
29
+ "require": "./dist/utils/index.cjs"
30
+ }
31
+ },
32
+ "files": [
33
+ "dist"
34
+ ],
35
+ "scripts": {
36
+ "build": "tsup",
37
+ "dev": "tsup --watch",
38
+ "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
39
+ "format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
40
+ "lint": "eslint src/",
41
+ "test": "vitest run",
42
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
43
+ "typecheck": "tsc --noEmit",
44
+ "typecheck:all": "tsc --project tsconfig.test.json"
45
+ },
46
+ "peerDependencies": {
47
+ "viem": ">=2.0.0"
48
+ },
49
+ "dependencies": {
50
+ "@noble/ciphers": "^1.2.1",
51
+ "@noble/curves": "^1.8.2",
52
+ "@noble/hashes": "^1.7.2",
53
+ "@skalenetwork/bite": "^0.8.2-develop.0"
54
+ },
55
+ "devDependencies": {
56
+ "@eslint/js": "^10.0.1",
57
+ "@types/node": "^25.9.3",
58
+ "@typescript-eslint/eslint-plugin": "^8.60.1",
59
+ "@typescript-eslint/parser": "^8.60.1",
60
+ "eslint": "^10.4.1",
61
+ "eslint-config-prettier": "^10.1.8",
62
+ "prettier": "^3.8.4",
63
+ "tsup": "^8.0.0",
64
+ "typescript": "^5.5.0",
65
+ "typescript-eslint": "^8.60.1",
66
+ "viem": "^2.47.0",
67
+ "vitest": "^2.1.9"
68
+ }
69
+ }