privacycash-x402 1.0.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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +139 -0
  3. package/dist/examples/client-example.d.ts +13 -0
  4. package/dist/examples/client-example.d.ts.map +1 -0
  5. package/dist/examples/client-example.js +108 -0
  6. package/dist/examples/client-example.js.map +1 -0
  7. package/dist/examples/server-example.d.ts +13 -0
  8. package/dist/examples/server-example.d.ts.map +1 -0
  9. package/dist/examples/server-example.js +104 -0
  10. package/dist/examples/server-example.js.map +1 -0
  11. package/dist/src/client/index.d.ts +89 -0
  12. package/dist/src/client/index.d.ts.map +1 -0
  13. package/dist/src/client/index.js +259 -0
  14. package/dist/src/client/index.js.map +1 -0
  15. package/dist/src/config.d.ts +10 -0
  16. package/dist/src/config.d.ts.map +1 -0
  17. package/dist/src/config.js +16 -0
  18. package/dist/src/config.js.map +1 -0
  19. package/dist/src/errors/index.d.ts +81 -0
  20. package/dist/src/errors/index.d.ts.map +1 -0
  21. package/dist/src/errors/index.js +110 -0
  22. package/dist/src/errors/index.js.map +1 -0
  23. package/dist/src/index.d.ts +10 -0
  24. package/dist/src/index.d.ts.map +1 -0
  25. package/dist/src/index.js +47 -0
  26. package/dist/src/index.js.map +1 -0
  27. package/dist/src/models/keypair.d.ts +27 -0
  28. package/dist/src/models/keypair.d.ts.map +1 -0
  29. package/dist/src/models/keypair.js +48 -0
  30. package/dist/src/models/keypair.js.map +1 -0
  31. package/dist/src/models/utxo.d.ts +50 -0
  32. package/dist/src/models/utxo.d.ts.map +1 -0
  33. package/dist/src/models/utxo.js +86 -0
  34. package/dist/src/models/utxo.js.map +1 -0
  35. package/dist/src/server/index.d.ts +67 -0
  36. package/dist/src/server/index.d.ts.map +1 -0
  37. package/dist/src/server/index.js +266 -0
  38. package/dist/src/server/index.js.map +1 -0
  39. package/dist/src/types/index.d.ts +67 -0
  40. package/dist/src/types/index.d.ts.map +1 -0
  41. package/dist/src/types/index.js +3 -0
  42. package/dist/src/types/index.js.map +1 -0
  43. package/dist/src/utils/constants.d.ts +29 -0
  44. package/dist/src/utils/constants.d.ts.map +1 -0
  45. package/dist/src/utils/constants.js +65 -0
  46. package/dist/src/utils/constants.js.map +1 -0
  47. package/dist/src/utils/encryption.d.ts +108 -0
  48. package/dist/src/utils/encryption.d.ts.map +1 -0
  49. package/dist/src/utils/encryption.js +420 -0
  50. package/dist/src/utils/encryption.js.map +1 -0
  51. package/dist/src/utils/logger.d.ts +10 -0
  52. package/dist/src/utils/logger.d.ts.map +1 -0
  53. package/dist/src/utils/logger.js +40 -0
  54. package/dist/src/utils/logger.js.map +1 -0
  55. package/dist/src/utils/utils.d.ts +65 -0
  56. package/dist/src/utils/utils.d.ts.map +1 -0
  57. package/dist/src/utils/utils.js +214 -0
  58. package/dist/src/utils/utils.js.map +1 -0
  59. package/package.json +62 -0
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BALANCE_PROOF_VALIDITY_MS = exports.tokens = exports.USDC_MINT = exports.LSK_ENCRYPTED_OUTPUTS = exports.LSK_FETCH_OFFSET = exports.SIGN_MESSAGE = exports.RELAYER_API_URL = exports.ALT_ADDRESS = exports.MERKLE_TREE_DEPTH = exports.TRANSACT_SPL_IX_DISCRIMINATOR = exports.TRANSACT_IX_DISCRIMINATOR = exports.FETCH_UTXOS_GROUP_SIZE = exports.FEE_RECIPIENT = exports.PROGRAM_ID = exports.FIELD_SIZE = void 0;
7
+ const web3_js_1 = require("@solana/web3.js");
8
+ const bn_js_1 = __importDefault(require("bn.js"));
9
+ exports.FIELD_SIZE = new bn_js_1.default('21888242871839275222246405745257275088548364400416034343698204186575808495617');
10
+ exports.PROGRAM_ID = process.env.NEXT_PUBLIC_PROGRAM_ID ? new web3_js_1.PublicKey(process.env.NEXT_PUBLIC_PROGRAM_ID) : new web3_js_1.PublicKey('9fhQBbumKEFuXtMBDw8AaQyAjCorLGJQiS3skWZdQyQD');
11
+ exports.FEE_RECIPIENT = new web3_js_1.PublicKey('AWexibGxNFKTa1b5R5MN4PJr9HWnWRwf8EW9g8cLx3dM');
12
+ exports.FETCH_UTXOS_GROUP_SIZE = 20000;
13
+ exports.TRANSACT_IX_DISCRIMINATOR = Buffer.from([217, 149, 130, 143, 221, 52, 252, 119]);
14
+ exports.TRANSACT_SPL_IX_DISCRIMINATOR = Buffer.from([154, 66, 244, 204, 78, 225, 163, 151]);
15
+ exports.MERKLE_TREE_DEPTH = 26;
16
+ exports.ALT_ADDRESS = process.env.NEXT_PUBLIC_ALT_ADDRESS ? new web3_js_1.PublicKey(process.env.NEXT_PUBLIC_ALT_ADDRESS) : new web3_js_1.PublicKey('HEN49U2ySJ85Vc78qprSW9y6mFDhs1NczRxyppNHjofe');
17
+ exports.RELAYER_API_URL = process.env.NEXT_PUBLIC_RELAYER_API_URL ?? 'https://api3.privacycash.org';
18
+ exports.SIGN_MESSAGE = `Privacy Money account sign in`;
19
+ // localStorage cache keys
20
+ exports.LSK_FETCH_OFFSET = 'fetch_offset';
21
+ exports.LSK_ENCRYPTED_OUTPUTS = 'encrypted_outputs';
22
+ exports.USDC_MINT = process.env.NEXT_PUBLIC_USDC_MINT ? new web3_js_1.PublicKey(process.env.NEXT_PUBLIC_USDC_MINT) : new web3_js_1.PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v');
23
+ const tokenList = ['sol', 'usdc', 'usdt', 'zec', 'ore', 'store'];
24
+ const splList = ['usdc', 'usdt', 'zec', 'ore', 'store'];
25
+ exports.tokens = [
26
+ {
27
+ name: 'sol',
28
+ pubkey: new web3_js_1.PublicKey('So11111111111111111111111111111111111111112'),
29
+ prefix: '',
30
+ units_per_token: 1e9
31
+ },
32
+ {
33
+ name: 'usdc',
34
+ pubkey: process.env.NEXT_PUBLIC_USDC_MINT ? new web3_js_1.PublicKey(process.env.NEXT_PUBLIC_USDC_MINT) : new web3_js_1.PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'),
35
+ prefix: 'usdc_',
36
+ units_per_token: 1e6
37
+ },
38
+ {
39
+ name: 'usdt',
40
+ pubkey: process.env.NEXT_PUBLIC_USDT_MINT ? new web3_js_1.PublicKey(process.env.NEXT_PUBLIC_USDT_MINT) : new web3_js_1.PublicKey('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'),
41
+ prefix: 'usdt_',
42
+ units_per_token: 1e6
43
+ },
44
+ {
45
+ name: 'zec',
46
+ pubkey: process.env.NEXT_PUBLIC_ZEC_MINT ? new web3_js_1.PublicKey(process.env.NEXT_PUBLIC_ZEC_MINT) : new web3_js_1.PublicKey('A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS'),
47
+ prefix: 'zec_',
48
+ units_per_token: 1e8
49
+ },
50
+ {
51
+ name: 'ore',
52
+ pubkey: process.env.NEXT_PUBLIC_ORE_MINT ? new web3_js_1.PublicKey(process.env.NEXT_PUBLIC_ORE_MINT) : new web3_js_1.PublicKey('oreoU2P8bN6jkk3jbaiVxYnG1dCXcYxwhwyK9jSybcp'),
53
+ prefix: 'ore_',
54
+ units_per_token: 1e11
55
+ },
56
+ {
57
+ name: 'store',
58
+ pubkey: process.env.NEXT_PUBLIC_STORE_MINT ? new web3_js_1.PublicKey(process.env.NEXT_PUBLIC_STORE_MINT) : new web3_js_1.PublicKey('sTorERYB6xAZ1SSbwpK3zoK2EEwbBrc7TZAzg1uCGiH'),
59
+ prefix: 'store_',
60
+ units_per_token: 1e11
61
+ },
62
+ ];
63
+ // Default balance proof validity (5 minutes)
64
+ exports.BALANCE_PROOF_VALIDITY_MS = 5 * 60 * 1000;
65
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":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,CAAC,IAAI,mBAAS,CAAC,8CAA8C,CAAC;QAC1J,MAAM,EAAE,MAAM;QACd,eAAe,EAAE,GAAG;KACvB;IACD;QACI,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,6CAA6C,CAAC;QACzJ,MAAM,EAAE,MAAM;QACd,eAAe,EAAE,IAAI;KACxB;IACD;QACI,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,6CAA6C,CAAC;QAC7J,MAAM,EAAE,QAAQ;QAChB,eAAe,EAAE,IAAI;KACxB;CACJ,CAAA;AAED,6CAA6C;AAChC,QAAA,yBAAyB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC"}
@@ -0,0 +1,108 @@
1
+ import { Keypair } from '@solana/web3.js';
2
+ import { Utxo } from '../models/utxo';
3
+ /**
4
+ * Represents a UTXO with minimal required fields
5
+ */
6
+ export interface UtxoData {
7
+ amount: string;
8
+ blinding: string;
9
+ index: number | string;
10
+ [key: string]: any;
11
+ }
12
+ export interface EncryptionKey {
13
+ v1: Uint8Array;
14
+ v2: Uint8Array;
15
+ }
16
+ /**
17
+ * Service for handling encryption and decryption of UTXO data
18
+ */
19
+ export declare class EncryptionService {
20
+ static readonly ENCRYPTION_VERSION_V2: Buffer<ArrayBuffer>;
21
+ private encryptionKeyV1;
22
+ private encryptionKeyV2;
23
+ private utxoPrivateKeyV1;
24
+ private utxoPrivateKeyV2;
25
+ /**
26
+ * Generate an encryption key from a signature
27
+ * @param signature The user's signature
28
+ * @returns The generated encryption key
29
+ */
30
+ deriveEncryptionKeyFromSignature(signature: Uint8Array): EncryptionKey;
31
+ /**
32
+ * Generate an encryption key from a wallet keypair (V2 format)
33
+ * @param keypair The Solana keypair to derive the encryption key from
34
+ * @returns The generated encryption key
35
+ */
36
+ deriveEncryptionKeyFromWallet(keypair: Keypair): EncryptionKey;
37
+ /**
38
+ * Encrypt data with the stored encryption key
39
+ * @param data The data to encrypt
40
+ * @returns The encrypted data as a Buffer
41
+ * @throws Error if the encryption key has not been generated
42
+ */
43
+ encrypt(data: Buffer | string): Buffer;
44
+ encryptDecryptedDoNotUse(data: Buffer | string): Buffer;
45
+ /**
46
+ * Decrypt data with the stored encryption key
47
+ * @param encryptedData The encrypted data to decrypt
48
+ * @returns The decrypted data as a Buffer
49
+ * @throws Error if the encryption key has not been generated or if the wrong key is used
50
+ */
51
+ decrypt(encryptedData: Buffer): Buffer;
52
+ /**
53
+ * Decrypt data using the old V1 format (120-bit HMAC with SHA256)
54
+ * @param encryptedData The encrypted data to decrypt
55
+ * @param keypair Optional keypair to derive V1 key for backward compatibility
56
+ * @returns The decrypted data as a Buffer
57
+ */
58
+ private decryptV1;
59
+ private timingSafeEqual;
60
+ /**
61
+ * Decrypt data using the new V2 format (256-bit Keccak HMAC)
62
+ * @param encryptedData The encrypted data to decrypt
63
+ * @returns The decrypted data as a Buffer
64
+ */
65
+ private decryptV2;
66
+ /**
67
+ * Reset the encryption keys (mainly for testing purposes)
68
+ */
69
+ resetEncryptionKey(): void;
70
+ /**
71
+ * Encrypt a UTXO using a compact pipe-delimited format
72
+ * Always uses V2 encryption format. The UTXO's version property is used only for key derivation.
73
+ * @param utxo The UTXO to encrypt (includes version property)
74
+ * @returns The encrypted UTXO data as a Buffer
75
+ * @throws Error if the V2 encryption key has not been set
76
+ */
77
+ encryptUtxo(utxo: Utxo): Buffer;
78
+ encryptUtxoDecryptedDoNotUse(utxo: Utxo): Buffer;
79
+ getEncryptionKeyVersion(encryptedData: Buffer | string): 'v1' | 'v2';
80
+ /**
81
+ * Decrypt an encrypted UTXO and parse it to a Utxo instance
82
+ * Automatically detects the UTXO version based on the encryption format
83
+ * @param encryptedData The encrypted UTXO data
84
+ * @param keypair The UTXO keypair to use for the decrypted UTXO
85
+ * @param lightWasm Optional LightWasm instance. If not provided, a new one will be created
86
+ * @param walletKeypair Optional wallet keypair for V1 backward compatibility
87
+ * @returns Promise resolving to the decrypted Utxo instance
88
+ * @throws Error if the encryption key has not been set or if decryption fails
89
+ */
90
+ decryptUtxo(encryptedData: Buffer | string, lightWasm?: any): Promise<Utxo>;
91
+ getUtxoPrivateKeyWithVersion(version: 'v1' | 'v2'): string;
92
+ deriveUtxoPrivateKey(encryptedData?: Buffer | string): string;
93
+ hasUtxoPrivateKeyWithVersion(version: 'v1' | 'v2'): boolean;
94
+ /**
95
+ * Get the cached V1 UTXO private key
96
+ * @returns A private key in hex format that can be used to create a UTXO keypair
97
+ * @throws Error if V1 encryption key has not been set
98
+ */
99
+ getUtxoPrivateKeyV1(): string;
100
+ /**
101
+ * Get the cached V2 UTXO private key
102
+ * @returns A private key in hex format that can be used to create a UTXO keypair
103
+ * @throws Error if V2 encryption key has not been set
104
+ */
105
+ getUtxoPrivateKeyV2(): string;
106
+ }
107
+ export declare function serializeProofAndExtData(proof: any, extData: any, isSpl?: boolean): Buffer<ArrayBuffer>;
108
+ //# sourceMappingURL=encryption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../../../src/utils/encryption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAa,MAAM,iBAAiB,CAAC;AAGrD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAQtC;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC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AG,MAAM;IAQ7D,4BAA4B,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO;IAQlE;;;;OAIG;IACI,mBAAmB,IAAI,MAAM;IAOpC;;;;OAIG;IACI,mBAAmB,IAAI,MAAM;CAMrC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,GAAE,OAAe,uBAmCxF"}
@@ -0,0 +1,420 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
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
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.EncryptionService = void 0;
40
+ exports.serializeProofAndExtData = serializeProofAndExtData;
41
+ const tweetnacl_1 = __importDefault(require("tweetnacl"));
42
+ const crypto = __importStar(require("crypto"));
43
+ const utxo_1 = require("../models/utxo");
44
+ const hasher_rs_1 = require("@lightprotocol/hasher.rs");
45
+ const keypair_1 = require("../models/keypair");
46
+ const keccak256_1 = require("@ethersproject/keccak256");
47
+ const constants_1 = require("./constants");
48
+ const bn_js_1 = __importDefault(require("bn.js"));
49
+ /**
50
+ * Service for handling encryption and decryption of UTXO data
51
+ */
52
+ class EncryptionService {
53
+ constructor() {
54
+ this.encryptionKeyV1 = null;
55
+ this.encryptionKeyV2 = null;
56
+ this.utxoPrivateKeyV1 = null;
57
+ this.utxoPrivateKeyV2 = null;
58
+ }
59
+ /**
60
+ * Generate an encryption key from a signature
61
+ * @param signature The user's signature
62
+ * @returns The generated encryption key
63
+ */
64
+ deriveEncryptionKeyFromSignature(signature) {
65
+ // Extract the first 31 bytes of the signature to create a deterministic key (legacy method)
66
+ const encryptionKeyV1 = signature.slice(0, 31);
67
+ // Store the V1 key in the service
68
+ this.encryptionKeyV1 = encryptionKeyV1;
69
+ // Precompute and cache the UTXO private key
70
+ const hashedSeedV1 = crypto.createHash('sha256').update(encryptionKeyV1).digest();
71
+ this.utxoPrivateKeyV1 = '0x' + hashedSeedV1.toString('hex');
72
+ // Use Keccak256 to derive a full 32-byte encryption key from the signature
73
+ const encryptionKeyV2 = Buffer.from((0, keccak256_1.keccak256)(signature).slice(2), 'hex');
74
+ // Store the V2 key in the service
75
+ this.encryptionKeyV2 = encryptionKeyV2;
76
+ // Precompute and cache the UTXO private key
77
+ const hashedSeedV2 = Buffer.from((0, keccak256_1.keccak256)(encryptionKeyV2).slice(2), 'hex');
78
+ this.utxoPrivateKeyV2 = '0x' + hashedSeedV2.toString('hex');
79
+ return {
80
+ v1: this.encryptionKeyV1,
81
+ v2: this.encryptionKeyV2
82
+ };
83
+ }
84
+ /**
85
+ * Generate an encryption key from a wallet keypair (V2 format)
86
+ * @param keypair The Solana keypair to derive the encryption key from
87
+ * @returns The generated encryption key
88
+ */
89
+ deriveEncryptionKeyFromWallet(keypair) {
90
+ // Sign a constant message with the keypair
91
+ const message = Buffer.from('Privacy Money account sign in');
92
+ const signature = tweetnacl_1.default.sign.detached(message, keypair.secretKey);
93
+ return this.deriveEncryptionKeyFromSignature(signature);
94
+ }
95
+ /**
96
+ * Encrypt data with the stored encryption key
97
+ * @param data The data to encrypt
98
+ * @returns The encrypted data as a Buffer
99
+ * @throws Error if the encryption key has not been generated
100
+ */
101
+ encrypt(data) {
102
+ if (!this.encryptionKeyV2) {
103
+ throw new Error('Encryption key not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
104
+ }
105
+ // Convert string to Buffer if needed
106
+ const dataBuffer = typeof data === 'string' ? Buffer.from(data) : data;
107
+ // Generate a standard initialization vector (12 bytes for GCM)
108
+ const iv = crypto.randomBytes(12);
109
+ // Use the full 32-byte V2 encryption key for AES-256
110
+ const key = Buffer.from(this.encryptionKeyV2);
111
+ // Use AES-256-GCM for authenticated encryption
112
+ const cipher = crypto.createCipheriv('aes-256-gcm', key, iv);
113
+ const encryptedData = Buffer.concat([
114
+ cipher.update(dataBuffer),
115
+ cipher.final()
116
+ ]);
117
+ // Get the authentication tag from GCM (16 bytes)
118
+ const authTag = cipher.getAuthTag();
119
+ // Version 2 format: [version(8)] + [IV(12)] + [authTag(16)] + [encryptedData]
120
+ return Buffer.concat([
121
+ EncryptionService.ENCRYPTION_VERSION_V2,
122
+ iv,
123
+ authTag,
124
+ encryptedData
125
+ ]);
126
+ }
127
+ // v1 encryption, only used for testing now
128
+ encryptDecryptedDoNotUse(data) {
129
+ if (!this.encryptionKeyV1) {
130
+ throw new Error('Encryption key not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
131
+ }
132
+ // Convert string to Buffer if needed
133
+ const dataBuffer = typeof data === 'string' ? Buffer.from(data) : data;
134
+ // Generate a standard initialization vector (16 bytes)
135
+ const iv = crypto.randomBytes(16);
136
+ // Create a key from our encryption key (using only first 16 bytes for AES-128)
137
+ const key = Buffer.from(this.encryptionKeyV1).slice(0, 16);
138
+ // Use a more compact encryption algorithm (aes-128-ctr)
139
+ const cipher = crypto.createCipheriv('aes-128-ctr', key, iv);
140
+ const encryptedData = Buffer.concat([
141
+ cipher.update(dataBuffer),
142
+ cipher.final()
143
+ ]);
144
+ // Create an authentication tag (HMAC) to verify decryption with correct key
145
+ const hmacKey = Buffer.from(this.encryptionKeyV1).slice(16, 31);
146
+ const hmac = crypto.createHmac('sha256', hmacKey);
147
+ hmac.update(iv);
148
+ hmac.update(encryptedData);
149
+ const authTag = hmac.digest().slice(0, 16); // Use first 16 bytes of HMAC as auth tag
150
+ // Combine IV, auth tag and encrypted data
151
+ return Buffer.concat([iv, authTag, encryptedData]);
152
+ }
153
+ /**
154
+ * Decrypt data with the stored encryption key
155
+ * @param encryptedData The encrypted data to decrypt
156
+ * @returns The decrypted data as a Buffer
157
+ * @throws Error if the encryption key has not been generated or if the wrong key is used
158
+ */
159
+ decrypt(encryptedData) {
160
+ // Check if this is the new version format (starts with 8-byte version identifier)
161
+ if (encryptedData.length >= 8 && encryptedData.subarray(0, 8).equals(EncryptionService.ENCRYPTION_VERSION_V2)) {
162
+ if (!this.encryptionKeyV2) {
163
+ throw new Error('Encryption key not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
164
+ }
165
+ return this.decryptV2(encryptedData);
166
+ }
167
+ else {
168
+ // V1 format - need V1 key or keypair to derive it
169
+ if (!this.encryptionKeyV1) {
170
+ throw new Error('Encryption key not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
171
+ }
172
+ return this.decryptV1(encryptedData);
173
+ }
174
+ }
175
+ /**
176
+ * Decrypt data using the old V1 format (120-bit HMAC with SHA256)
177
+ * @param encryptedData The encrypted data to decrypt
178
+ * @param keypair Optional keypair to derive V1 key for backward compatibility
179
+ * @returns The decrypted data as a Buffer
180
+ */
181
+ decryptV1(encryptedData) {
182
+ if (!this.encryptionKeyV1) {
183
+ throw new Error('Encryption key not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
184
+ }
185
+ // Extract the IV from the first 16 bytes
186
+ const iv = encryptedData.slice(0, 16);
187
+ // Extract the auth tag from the next 16 bytes
188
+ const authTag = encryptedData.slice(16, 32);
189
+ // The rest is the actual encrypted data
190
+ const data = encryptedData.slice(32);
191
+ // Verify the authentication tag
192
+ const hmacKey = Buffer.from(this.encryptionKeyV1).slice(16, 31);
193
+ const hmac = crypto.createHmac('sha256', hmacKey);
194
+ hmac.update(iv);
195
+ hmac.update(data);
196
+ const calculatedTag = hmac.digest().slice(0, 16);
197
+ // Compare tags - if they don't match, the key is wrong
198
+ if (!this.timingSafeEqual(authTag, calculatedTag)) {
199
+ throw new Error('Failed to decrypt data. Invalid encryption key or corrupted data.');
200
+ }
201
+ // Create a key from our encryption key (using only first 16 bytes for AES-128)
202
+ const key = Buffer.from(this.encryptionKeyV1).slice(0, 16);
203
+ // Use the same algorithm as in encrypt
204
+ const decipher = crypto.createDecipheriv('aes-128-ctr', key, iv);
205
+ try {
206
+ return Buffer.concat([
207
+ decipher.update(data),
208
+ decipher.final()
209
+ ]);
210
+ }
211
+ catch (error) {
212
+ throw new Error('Failed to decrypt data. Invalid encryption key or corrupted data.');
213
+ }
214
+ }
215
+ // Custom timingSafeEqual for browser compatibility
216
+ timingSafeEqual(a, b) {
217
+ if (a.length !== b.length) {
218
+ return false;
219
+ }
220
+ let diff = 0;
221
+ for (let i = 0; i < a.length; i++) {
222
+ diff |= a[i] ^ b[i];
223
+ }
224
+ return diff === 0;
225
+ }
226
+ /**
227
+ * Decrypt data using the new V2 format (256-bit Keccak HMAC)
228
+ * @param encryptedData The encrypted data to decrypt
229
+ * @returns The decrypted data as a Buffer
230
+ */
231
+ decryptV2(encryptedData) {
232
+ if (!this.encryptionKeyV2) {
233
+ throw new Error('encryptionKeyV2 not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
234
+ }
235
+ // Skip 8-byte version identifier and extract components for GCM format
236
+ const iv = encryptedData.slice(8, 20); // bytes 8-19 (12 bytes for GCM)
237
+ const authTag = encryptedData.slice(20, 36); // bytes 20-35 (16 bytes for GCM)
238
+ const data = encryptedData.slice(36); // remaining bytes
239
+ // Use the full 32-byte V2 encryption key for AES-256
240
+ const key = Buffer.from(this.encryptionKeyV2);
241
+ // Use AES-256-GCM for authenticated decryption
242
+ const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv);
243
+ decipher.setAuthTag(authTag);
244
+ try {
245
+ return Buffer.concat([
246
+ decipher.update(data),
247
+ decipher.final()
248
+ ]);
249
+ }
250
+ catch (error) {
251
+ throw new Error('Failed to decrypt data. Invalid encryption key or corrupted data.');
252
+ }
253
+ }
254
+ /**
255
+ * Reset the encryption keys (mainly for testing purposes)
256
+ */
257
+ resetEncryptionKey() {
258
+ this.encryptionKeyV1 = null;
259
+ this.encryptionKeyV2 = null;
260
+ this.utxoPrivateKeyV1 = null;
261
+ this.utxoPrivateKeyV2 = null;
262
+ }
263
+ /**
264
+ * Encrypt a UTXO using a compact pipe-delimited format
265
+ * Always uses V2 encryption format. The UTXO's version property is used only for key derivation.
266
+ * @param utxo The UTXO to encrypt (includes version property)
267
+ * @returns The encrypted UTXO data as a Buffer
268
+ * @throws Error if the V2 encryption key has not been set
269
+ */
270
+ encryptUtxo(utxo) {
271
+ if (!this.encryptionKeyV2) {
272
+ throw new Error('Encryption key not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
273
+ }
274
+ // Create a compact string representation using pipe delimiter
275
+ // Version is stored in the UTXO model, not in the encrypted content
276
+ const utxoString = `${utxo.amount.toString()}|${utxo.blinding.toString()}|${utxo.index}|${utxo.mintAddress}`;
277
+ // Always use V2 encryption format (which adds version byte 0x02 at the beginning)
278
+ return this.encrypt(utxoString);
279
+ }
280
+ // Deprecated, only used for testing now
281
+ encryptUtxoDecryptedDoNotUse(utxo) {
282
+ if (!this.encryptionKeyV2) {
283
+ throw new Error('Encryption key not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
284
+ }
285
+ const utxoString = `${utxo.amount.toString()}|${utxo.blinding.toString()}|${utxo.index}|${utxo.mintAddress}`;
286
+ return this.encryptDecryptedDoNotUse(utxoString);
287
+ }
288
+ getEncryptionKeyVersion(encryptedData) {
289
+ const buffer = typeof encryptedData === 'string' ? Buffer.from(encryptedData, 'hex') : encryptedData;
290
+ if (buffer.length >= 8 && buffer.subarray(0, 8).equals(EncryptionService.ENCRYPTION_VERSION_V2)) {
291
+ // V2 encryption format → V2 UTXO
292
+ return 'v2';
293
+ }
294
+ else {
295
+ // V1 encryption format → UTXO
296
+ return 'v1';
297
+ }
298
+ }
299
+ /**
300
+ * Decrypt an encrypted UTXO and parse it to a Utxo instance
301
+ * Automatically detects the UTXO version based on the encryption format
302
+ * @param encryptedData The encrypted UTXO data
303
+ * @param keypair The UTXO keypair to use for the decrypted UTXO
304
+ * @param lightWasm Optional LightWasm instance. If not provided, a new one will be created
305
+ * @param walletKeypair Optional wallet keypair for V1 backward compatibility
306
+ * @returns Promise resolving to the decrypted Utxo instance
307
+ * @throws Error if the encryption key has not been set or if decryption fails
308
+ */
309
+ async decryptUtxo(encryptedData, lightWasm) {
310
+ // Convert hex string to Buffer if needed
311
+ const encryptedBuffer = typeof encryptedData === 'string'
312
+ ? Buffer.from(encryptedData, 'hex')
313
+ : encryptedData;
314
+ // Detect UTXO version based on encryption format
315
+ let utxoVersion = this.getEncryptionKeyVersion(encryptedBuffer);
316
+ // The decrypt() method already handles encryption format version detection (V1 vs V2)
317
+ // It checks the first byte to determine whether to use decryptV1() or decryptV2()
318
+ const decrypted = this.decrypt(encryptedBuffer);
319
+ // Parse the pipe-delimited format: amount|blinding|index|mintAddress
320
+ const decryptedStr = decrypted.toString();
321
+ const parts = decryptedStr.split('|');
322
+ if (parts.length !== 4) {
323
+ throw new Error('Invalid UTXO format after decryption');
324
+ }
325
+ const [amount, blinding, index, mintAddress] = parts;
326
+ if (!amount || !blinding || index === undefined || mintAddress === undefined) {
327
+ throw new Error('Invalid UTXO format after decryption');
328
+ }
329
+ // Get or create a LightWasm instance
330
+ const wasmInstance = lightWasm || await hasher_rs_1.WasmFactory.getInstance();
331
+ const privateKey = this.getUtxoPrivateKeyWithVersion(utxoVersion);
332
+ // Create a Utxo instance with the detected version
333
+ const utxo = new utxo_1.Utxo({
334
+ lightWasm: wasmInstance,
335
+ amount: amount,
336
+ blinding: blinding,
337
+ keypair: new keypair_1.Keypair(privateKey, wasmInstance),
338
+ index: Number(index),
339
+ mintAddress: mintAddress,
340
+ version: utxoVersion
341
+ });
342
+ return utxo;
343
+ }
344
+ getUtxoPrivateKeyWithVersion(version) {
345
+ if (version === 'v1') {
346
+ return this.getUtxoPrivateKeyV1();
347
+ }
348
+ return this.getUtxoPrivateKeyV2();
349
+ }
350
+ deriveUtxoPrivateKey(encryptedData) {
351
+ if (encryptedData && this.getEncryptionKeyVersion(encryptedData) === 'v2') {
352
+ return this.getUtxoPrivateKeyWithVersion('v2');
353
+ }
354
+ return this.getUtxoPrivateKeyWithVersion('v1');
355
+ }
356
+ hasUtxoPrivateKeyWithVersion(version) {
357
+ if (version === 'v1') {
358
+ return !!this.utxoPrivateKeyV1;
359
+ }
360
+ return !!this.utxoPrivateKeyV2;
361
+ }
362
+ /**
363
+ * Get the cached V1 UTXO private key
364
+ * @returns A private key in hex format that can be used to create a UTXO keypair
365
+ * @throws Error if V1 encryption key has not been set
366
+ */
367
+ getUtxoPrivateKeyV1() {
368
+ if (!this.utxoPrivateKeyV1) {
369
+ throw new Error('Encryption key not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
370
+ }
371
+ return this.utxoPrivateKeyV1;
372
+ }
373
+ /**
374
+ * Get the cached V2 UTXO private key
375
+ * @returns A private key in hex format that can be used to create a UTXO keypair
376
+ * @throws Error if V2 encryption key has not been set
377
+ */
378
+ getUtxoPrivateKeyV2() {
379
+ if (!this.utxoPrivateKeyV2) {
380
+ throw new Error('Encryption key not set. Call setEncryptionKey or deriveEncryptionKeyFromWallet first.');
381
+ }
382
+ return this.utxoPrivateKeyV2;
383
+ }
384
+ }
385
+ exports.EncryptionService = EncryptionService;
386
+ EncryptionService.ENCRYPTION_VERSION_V2 = Buffer.from([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02]); // Version 2
387
+ function serializeProofAndExtData(proof, extData, isSpl = false) {
388
+ // Create the ExtDataMinified object for the program call (only extAmount and fee)
389
+ const extDataMinified = {
390
+ extAmount: extData.extAmount,
391
+ fee: extData.fee
392
+ };
393
+ // Use the appropriate discriminator based on whether this is SPL or native SOL
394
+ const discriminator = isSpl ? constants_1.TRANSACT_SPL_IX_DISCRIMINATOR : constants_1.TRANSACT_IX_DISCRIMINATOR;
395
+ // Use the same serialization approach as deposit script
396
+ const instructionData = Buffer.concat([
397
+ discriminator,
398
+ // Serialize proof
399
+ Buffer.from(proof.proofA),
400
+ Buffer.from(proof.proofB),
401
+ Buffer.from(proof.proofC),
402
+ Buffer.from(proof.root),
403
+ Buffer.from(proof.publicAmount),
404
+ Buffer.from(proof.extDataHash),
405
+ Buffer.from(proof.inputNullifiers[0]),
406
+ Buffer.from(proof.inputNullifiers[1]),
407
+ Buffer.from(proof.outputCommitments[0]),
408
+ Buffer.from(proof.outputCommitments[1]),
409
+ // Serialize ExtDataMinified (only extAmount and fee)
410
+ Buffer.from(new bn_js_1.default(extDataMinified.extAmount).toTwos(64).toArray('le', 8)),
411
+ Buffer.from(new bn_js_1.default(extDataMinified.fee).toArray('le', 8)),
412
+ // Serialize encrypted outputs as separate parameters
413
+ Buffer.from(new bn_js_1.default(extData.encryptedOutput1.length).toArray('le', 4)),
414
+ extData.encryptedOutput1,
415
+ Buffer.from(new bn_js_1.default(extData.encryptedOutput2.length).toArray('le', 4)),
416
+ extData.encryptedOutput2,
417
+ ]);
418
+ return instructionData;
419
+ }
420
+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AC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;QACvC,qDAAqD;QACrD,MAAM,CAAC,IAAI,CAAC,IAAI,eAAE,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAC1E,MAAM,CAAC,IAAI,CAAC,IAAI,eAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACzD,qDAAqD;QACrD,MAAM,CAAC,IAAI,CAAC,IAAI,eAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACrE,OAAO,CAAC,gBAAgB;QACxB,MAAM,CAAC,IAAI,CAAC,IAAI,eAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACrE,OAAO,CAAC,gBAAgB;KACzB,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export type LogLevel = "debug" | "info" | "warn" | "error";
2
+ export type LoggerFn = (level: LogLevel, message: string) => void;
3
+ export declare function setLogger(logger: LoggerFn): void;
4
+ export declare const logger: {
5
+ debug: (...args: unknown[]) => void;
6
+ info: (...args: unknown[]) => void;
7
+ warn: (...args: unknown[]) => void;
8
+ error: (...args: unknown[]) => void;
9
+ };
10
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AASlE,wBAAgB,SAAS,CAAC,MAAM,EAAE,QAAQ,QAEzC;AAcD,eAAO,MAAM,MAAM;qBACE,OAAO,EAAE;oBAGV,OAAO,EAAE;oBAGT,OAAO,EAAE;qBAGR,OAAO,EAAE;CAG7B,CAAA"}