@shroud-fi/compliance 0.1.2 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shroud-fi/compliance",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Operator-side viewing-key tools for ShroudFi. Generate audit trails of payments received without granting spend authority.",
5
5
  "keywords": [
6
6
  "shroudfi",
@@ -25,10 +25,13 @@
25
25
  }
26
26
  },
27
27
  "files": [
28
- "dist"
28
+ "dist",
29
+ "src",
30
+ "tsconfig.json",
31
+ "README.md"
29
32
  ],
30
33
  "dependencies": {
31
- "@shroud-fi/core": "0.1.2"
34
+ "@shroud-fi/core": "0.1.3"
32
35
  },
33
36
  "peerDependencies": {
34
37
  "viem": "^2.21.0"
package/src/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ export type { ViewingKeyConfig, AuditTrail, DisclosureProof } from './types.js';
2
+
3
+ export function generateViewingKey(
4
+ _config: import('./types.js').ViewingKeyConfig,
5
+ ): Promise<import('./types.js').DisclosureProof> {
6
+ throw new Error('Not implemented');
7
+ }
package/src/types.ts ADDED
@@ -0,0 +1,21 @@
1
+ import type { Address } from 'viem';
2
+
3
+ export interface ViewingKeyConfig {
4
+ readonly spendingPrivateKey: `0x${string}`;
5
+ readonly chain: 'base' | 'baseSepolia';
6
+ }
7
+
8
+ export interface AuditTrail {
9
+ readonly stealthAddress: Address;
10
+ readonly ephemeralPubKey: `0x${string}`;
11
+ readonly blockNumber: bigint;
12
+ readonly txHash: `0x${string}`;
13
+ readonly timestamp: number;
14
+ }
15
+
16
+ export interface DisclosureProof {
17
+ readonly viewingPublicKey: `0x${string}`;
18
+ readonly spendingPublicKey: `0x${string}`;
19
+ readonly stealthMetaAddress: string;
20
+ readonly auditTrail: readonly AuditTrail[];
21
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist/esm",
5
+ "rootDir": "./src"
6
+ },
7
+ "include": ["src/**/*.ts"],
8
+ "exclude": ["dist", "test", "node_modules"]
9
+ }