dop-wallet-v6 1.2.7 → 1.2.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.
|
@@ -5,4 +5,28 @@ export declare const generateTransferProofForExplorer: (txidVersion: TXIDVersion
|
|
|
5
5
|
* Generate transfer proof and return the raw proved transactions for explorer verification
|
|
6
6
|
* This function generates the proof and returns the complete proved transaction data
|
|
7
7
|
*/
|
|
8
|
-
export declare const generateTransferProof: (txidVersion: TXIDVersion, networkName: NetworkName, dopWalletID: string, encryptionKey: string, showSenderAddressToRecipient: boolean, memoText: Optional<string>, erc20AmountRecipients: DopERC20AmountRecipient[], nftAmountRecipients: DopNFTAmountRecipient[], broadcasterFeeERC20AmountRecipient: Optional<DopERC20AmountRecipient>, sendWithPublicWallet: boolean, overallBatchMinGasPrice: Optional<bigint>, progressCallback: GenerateTransactionsProgressCallback) => Promise<
|
|
8
|
+
export declare const generateTransferProof: (txidVersion: TXIDVersion, networkName: NetworkName, dopWalletID: string, encryptionKey: string, showSenderAddressToRecipient: boolean, memoText: Optional<string>, erc20AmountRecipients: DopERC20AmountRecipient[], nftAmountRecipients: DopNFTAmountRecipient[], broadcasterFeeERC20AmountRecipient: Optional<DopERC20AmountRecipient>, sendWithPublicWallet: boolean, overallBatchMinGasPrice: Optional<bigint>, progressCallback: GenerateTransactionsProgressCallback) => Promise<{
|
|
9
|
+
memo: never[];
|
|
10
|
+
memoText: string;
|
|
11
|
+
serializedCommitment: {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
blindedReceiverViewingKey?: string | undefined;
|
|
14
|
+
} | null;
|
|
15
|
+
commitmentTreeIndex: number;
|
|
16
|
+
hash: import("ethers").BytesLike;
|
|
17
|
+
shieldKeyHash: string;
|
|
18
|
+
boundParams: {
|
|
19
|
+
adaptContract: string;
|
|
20
|
+
adaptParams: string;
|
|
21
|
+
chainID: string | bigint;
|
|
22
|
+
commitmentCiphertext: {
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
blindedReceiverViewingKey?: string | undefined;
|
|
25
|
+
}[];
|
|
26
|
+
decrypt: bigint;
|
|
27
|
+
};
|
|
28
|
+
merkleRoot: import("ethers").BytesLike;
|
|
29
|
+
nullifiers: import("ethers").BytesLike[];
|
|
30
|
+
proof: import("dop-engine-v3/dist/abi/typechain/DopSmartWallet").SnarkProofStruct;
|
|
31
|
+
txidVersion: import("dop-engine-v3").TXIDVersion;
|
|
32
|
+
}[]>;
|
|
@@ -48,8 +48,53 @@ const generateTransferProof = async (txidVersion, networkName, dopWalletID, encr
|
|
|
48
48
|
const { provedTransactions } = await (0, tx_generator_1.generateProofTransactions)(dop_sharedmodels_v3_1.ProofType.Transfer, networkName, dopWalletID, txidVersion, encryptionKey, showSenderAddressToRecipient, memoText, erc20AmountRecipients, nftAmountRecipients, broadcasterFeeERC20AmountRecipient, sendWithPublicWallet, undefined, // relayAdaptID
|
|
49
49
|
false, // useDummyProof
|
|
50
50
|
overallBatchMinGasPrice, progressCallback);
|
|
51
|
-
//
|
|
52
|
-
|
|
51
|
+
// Transform the proved transactions to the format expected by the explorer
|
|
52
|
+
const transformedTransactions = provedTransactions.map((transaction) => {
|
|
53
|
+
// Type-safe access to boundParams properties with proper type checking
|
|
54
|
+
const boundParams = transaction.boundParams;
|
|
55
|
+
// Calculate commitment tree index and other derived fields
|
|
56
|
+
let commitmentTreeIndex = 0;
|
|
57
|
+
if (typeof boundParams.treeNumber === 'number') {
|
|
58
|
+
commitmentTreeIndex = boundParams.treeNumber;
|
|
59
|
+
}
|
|
60
|
+
else if (typeof boundParams.treeNumber === 'bigint') {
|
|
61
|
+
commitmentTreeIndex = Number(boundParams.treeNumber);
|
|
62
|
+
}
|
|
63
|
+
// Extract hash from the transaction
|
|
64
|
+
const hash = Array.isArray(transaction.commitments) && transaction.commitments.length > 0
|
|
65
|
+
? transaction.commitments[0]
|
|
66
|
+
: transaction.merkleRoot;
|
|
67
|
+
// Create shield key hash from the bound params
|
|
68
|
+
const firstCommitmentCiphertext = boundParams.commitmentCiphertext?.[0];
|
|
69
|
+
const shieldKeyHash = firstCommitmentCiphertext?.blindedReceiverViewingKey ?? '0x0';
|
|
70
|
+
// Get serialized commitment from the bound params
|
|
71
|
+
const serializedCommitment = firstCommitmentCiphertext ?? null;
|
|
72
|
+
return {
|
|
73
|
+
// Add the wanted fields
|
|
74
|
+
memo: [],
|
|
75
|
+
memoText: memoText ?? '',
|
|
76
|
+
serializedCommitment,
|
|
77
|
+
commitmentTreeIndex,
|
|
78
|
+
hash,
|
|
79
|
+
shieldKeyHash,
|
|
80
|
+
// Keep essential transaction data from boundParams
|
|
81
|
+
boundParams: {
|
|
82
|
+
adaptContract: boundParams.adaptContract ?? '0x0000000000000000000000000000000000000000',
|
|
83
|
+
adaptParams: boundParams.adaptParams ?? '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
84
|
+
chainID: boundParams.chainID ?? '0x0000000000000089',
|
|
85
|
+
commitmentCiphertext: boundParams.commitmentCiphertext ?? [],
|
|
86
|
+
decrypt: 0n,
|
|
87
|
+
},
|
|
88
|
+
// Keep core proof data
|
|
89
|
+
merkleRoot: transaction.merkleRoot,
|
|
90
|
+
nullifiers: transaction.nullifiers,
|
|
91
|
+
proof: transaction.proof,
|
|
92
|
+
txidVersion: transaction.txidVersion,
|
|
93
|
+
// Remove the unwanted fields by not including them:
|
|
94
|
+
// decryptPreimage, minGasPrice, treeNumber, commitments are not included
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
return transformedTransactions;
|
|
53
98
|
}
|
|
54
99
|
catch (err) {
|
|
55
100
|
throw (0, error_1.reportAndSanitizeError)(exports.generateTransferProof.name, err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tx-proof-transfer-with-data.js","sourceRoot":"","sources":["../../../src/services/transactions/tx-proof-transfer-with-data.ts"],"names":[],"mappings":";;;AAAA,6DAM6B;AAC7B,iDAKwB;AACxB,+CAA2D;AAC3D,6CAA2D;AAEp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C,CAAC;AAlEW,QAAA,gCAAgC,oCAkE3C;AAEF;;;GAGG;AACI,MAAM,qBAAqB,GAAG,KAAK,EACxC,WAAwB,EACxB,WAAwB,EACxB,WAAmB,EACnB,aAAqB,EACrB,4BAAqC,EACrC,QAA0B,EAC1B,qBAAgD,EAChD,mBAA4C,EAC5C,kCAAqE,EACrE,oBAA6B,EAC7B,uBAAyC,EACzC,gBAAsD,EACtD,EAAE;IACF,IAAI;QACF,2CAA2C;QAC3C,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAA,wCAAyB,EAC5D,+BAAS,CAAC,QAAQ,EAClB,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,4BAA4B,EAC5B,QAAQ,EACR,qBAAqB,EACrB,mBAAmB,EACnB,kCAAkC,EAClC,oBAAoB,EACpB,SAAS,EAAE,eAAe;QAC1B,KAAK,EAAE,gBAAgB;QACvB,uBAAuB,EACvB,gBAAgB,CACjB,CAAC;QAEF,
|
|
1
|
+
{"version":3,"file":"tx-proof-transfer-with-data.js","sourceRoot":"","sources":["../../../src/services/transactions/tx-proof-transfer-with-data.ts"],"names":[],"mappings":";;;AAAA,6DAM6B;AAC7B,iDAKwB;AACxB,+CAA2D;AAC3D,6CAA2D;AAEpD,MAAM,gCAAgC,GAAG,KAAK,EACnD,WAAwB,EACxB,WAAwB,EACxB,WAAmB,EACnB,aAAqB,EACrB,4BAAqC,EACrC,QAA0B,EAC1B,qBAAgD,EAChD,mBAA4C,EAC5C,kCAAqE,EACrE,oBAA6B,EAC7B,uBAAyC,EACzC,gBAAsD,EACvC,EAAE;IACjB,IAAI;QACF,IAAA,wCAA0B,EAAC,SAAS,CAAC,CAAC;QAEtC,MAAM,EAAE,kBAAkB,EAAE,GAC1B,MAAM,IAAA,wCAAyB,EAC7B,+BAAS,CAAC,QAAQ,EAClB,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,4BAA4B,EAC5B,QAAQ,EACR,qBAAqB,EACrB,m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,WAAW,EAAE;oBACX,aAAa,EAAE,WAAW,CAAC,aAAa,IAAI,4CAA4C;oBACxF,WAAW,EAAE,WAAW,CAAC,WAAW,IAAI,oEAAoE;oBAC5G,OAAO,EAAE,WAAW,CAAC,OAAO,IAAI,oBAAoB;oBACpD,oBAAoB,EAAE,WAAW,CAAC,oBAAoB,IAAI,EAAE;oBAC5D,OAAO,EAAE,EAAE;iBACZ;gBAED,uBAAuB;gBACvB,UAAU,EAAE,WAAW,CAAC,UAAU;gBAClC,UAAU,EAAE,WAAW,CAAC,UAAU;gBAClC,KAAK,EAAE,WAAW,CAAC,KAAK;gBACxB,WAAW,EAAE,WAAW,CAAC,WAAW;gBAEpC,oDAAoD;gBACpD,yEAAyE;aAC1E,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,uBAAuB,CAAC;KAChC;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,IAAA,8BAAsB,EAAC,6BAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;KAC/D;AACH,CAAC,CAAC;AAtGW,QAAA,qBAAqB,yBAsGhC","sourcesContent":["import {\n NetworkName,\n ProofType,\n DopERC20AmountRecipient,\n DopNFTAmountRecipient,\n TXIDVersion,\n} from 'dop-sharedmodels-v3';\nimport {\n GenerateTransactionsProgressCallback,\n generateProofTransactions,\n generateTransact,\n nullifiersForTransactions,\n} from './tx-generator';\nimport { setCachedProvedTransaction } from './proof-cache';\nimport { reportAndSanitizeError } from '../../utils/error';\n\nexport const generateTransferProofForExplorer = async (\n txidVersion: TXIDVersion,\n networkName: NetworkName,\n dopWalletID: string,\n encryptionKey: string,\n showSenderAddressToRecipient: boolean,\n memoText: Optional<string>,\n erc20AmountRecipients: DopERC20AmountRecipient[],\n nftAmountRecipients: DopNFTAmountRecipient[],\n broadcasterFeeERC20AmountRecipient: Optional<DopERC20AmountRecipient>,\n sendWithPublicWallet: boolean,\n overallBatchMinGasPrice: Optional<bigint>,\n progressCallback: GenerateTransactionsProgressCallback,\n): Promise<void> => {\n try {\n setCachedProvedTransaction(undefined);\n\n const { provedTransactions } =\n await generateProofTransactions(\n ProofType.Transfer,\n networkName,\n dopWalletID,\n txidVersion,\n encryptionKey,\n showSenderAddressToRecipient,\n memoText,\n erc20AmountRecipients,\n nftAmountRecipients,\n broadcasterFeeERC20AmountRecipient,\n sendWithPublicWallet,\n undefined, // relayAdaptID\n false, // useDummyProof\n overallBatchMinGasPrice,\n progressCallback,\n );\n const transaction = await generateTransact(\n txidVersion,\n provedTransactions,\n networkName,\n 0n\n );\n\n const nullifiers = nullifiersForTransactions(provedTransactions);\n\n setCachedProvedTransaction({\n proofType: ProofType.Transfer,\n txidVersion,\n dopWalletID,\n showSenderAddressToRecipient,\n memoText,\n erc20AmountRecipients,\n nftAmountRecipients,\n relayAdaptDecryptERC20Amounts: undefined,\n relayAdaptDecryptNFTAmounts: undefined,\n relayAdaptEncryptERC20Recipients: undefined,\n relayAdaptEncryptNFTRecipients: undefined,\n crossContractCalls: undefined,\n broadcasterFeeERC20AmountRecipient,\n sendWithPublicWallet,\n transaction,\n overallBatchMinGasPrice,\n nullifiers,\n });\n } catch (err) {\n throw reportAndSanitizeError(generateTransferProofForExplorer.name, err);\n }\n};\n\n/**\n * Generate transfer proof and return the raw proved transactions for explorer verification\n * This function generates the proof and returns the complete proved transaction data\n */\nexport const generateTransferProof = async (\n txidVersion: TXIDVersion,\n networkName: NetworkName,\n dopWalletID: string,\n encryptionKey: string,\n showSenderAddressToRecipient: boolean,\n memoText: Optional<string>,\n erc20AmountRecipients: DopERC20AmountRecipient[],\n nftAmountRecipients: DopNFTAmountRecipient[],\n broadcasterFeeERC20AmountRecipient: Optional<DopERC20AmountRecipient>,\n sendWithPublicWallet: boolean,\n overallBatchMinGasPrice: Optional<bigint>,\n progressCallback: GenerateTransactionsProgressCallback,\n) => {\n try {\n // Generate the proof transactions directly\n const { provedTransactions } = await generateProofTransactions(\n ProofType.Transfer,\n networkName,\n dopWalletID,\n txidVersion,\n encryptionKey,\n showSenderAddressToRecipient,\n memoText,\n erc20AmountRecipients,\n nftAmountRecipients,\n broadcasterFeeERC20AmountRecipient,\n sendWithPublicWallet,\n undefined, // relayAdaptID\n false, // useDummyProof\n overallBatchMinGasPrice,\n progressCallback,\n );\n\n // Transform the proved transactions to the format expected by the explorer\n const transformedTransactions = provedTransactions.map((transaction) => {\n // Type-safe access to boundParams properties with proper type checking\n const boundParams = transaction.boundParams as {\n treeNumber?: number | bigint;\n adaptContract?: string;\n adaptParams?: string;\n chainID?: string | bigint;\n commitmentCiphertext?: Array<{\n blindedReceiverViewingKey?: string;\n [key: string]: unknown;\n }>;\n [key: string]: unknown;\n };\n \n // Calculate commitment tree index and other derived fields\n let commitmentTreeIndex = 0;\n if (typeof boundParams.treeNumber === 'number') {\n commitmentTreeIndex = boundParams.treeNumber;\n } else if (typeof boundParams.treeNumber === 'bigint') {\n commitmentTreeIndex = Number(boundParams.treeNumber);\n }\n \n // Extract hash from the transaction\n const hash = Array.isArray(transaction.commitments) && transaction.commitments.length > 0 \n ? transaction.commitments[0] \n : transaction.merkleRoot;\n \n // Create shield key hash from the bound params\n const firstCommitmentCiphertext = boundParams.commitmentCiphertext?.[0];\n const shieldKeyHash = firstCommitmentCiphertext?.blindedReceiverViewingKey ?? '0x0';\n \n // Get serialized commitment from the bound params\n const serializedCommitment = firstCommitmentCiphertext ?? null;\n\n return {\n // Add the wanted fields\n memo: [], // Empty array as requested\n memoText: memoText ?? '', // Use the provided memo text\n serializedCommitment,\n commitmentTreeIndex,\n hash,\n shieldKeyHash,\n \n // Keep essential transaction data from boundParams\n boundParams: {\n adaptContract: boundParams.adaptContract ?? '0x0000000000000000000000000000000000000000',\n adaptParams: boundParams.adaptParams ?? '0x0000000000000000000000000000000000000000000000000000000000000000',\n chainID: boundParams.chainID ?? '0x0000000000000089',\n commitmentCiphertext: boundParams.commitmentCiphertext ?? [],\n decrypt: 0n,\n },\n \n // Keep core proof data\n merkleRoot: transaction.merkleRoot,\n nullifiers: transaction.nullifiers,\n proof: transaction.proof,\n txidVersion: transaction.txidVersion,\n \n // Remove the unwanted fields by not including them:\n // decryptPreimage, minGasPrice, treeNumber, commitments are not included\n };\n });\n\n return transformedTransactions;\n } catch (err) {\n throw reportAndSanitizeError(generateTransferProof.name, err);\n }\n};\n"]}
|