privacycash 1.1.20 → 1.1.21
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/deposit.js +2 -2
- package/dist/depositSPL.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/package.json +1 -1
- package/src/deposit.ts +2 -2
- package/src/depositSPL.ts +1 -1
- package/src/utils/constants.ts +1 -1
package/dist/deposit.js
CHANGED
|
@@ -229,7 +229,7 @@ export async function deposit({ lightWasm, storage, keyBasePath, publicKey, conn
|
|
|
229
229
|
// Create the deposit ExtData with real encrypted outputs
|
|
230
230
|
const extData = {
|
|
231
231
|
// recipient - just a placeholder, not actually used for deposits.
|
|
232
|
-
recipient: new PublicKey(
|
|
232
|
+
recipient: new PublicKey(FEE_RECIPIENT).toString(), // Using fee recipient as dummy recipient for deposit
|
|
233
233
|
extAmount: new BN(extAmount),
|
|
234
234
|
encryptedOutput1: encryptedOutput1,
|
|
235
235
|
encryptedOutput2: encryptedOutput2,
|
|
@@ -306,7 +306,7 @@ export async function deposit({ lightWasm, storage, keyBasePath, publicKey, conn
|
|
|
306
306
|
{ pubkey: treeTokenAccount, isSigner: false, isWritable: true },
|
|
307
307
|
{ pubkey: globalConfigAccount, isSigner: false, isWritable: false },
|
|
308
308
|
// recipient - just a placeholder, not actually used for deposits. using an ALT address to save bytes
|
|
309
|
-
{ pubkey: new PublicKey(
|
|
309
|
+
{ pubkey: new PublicKey(FEE_RECIPIENT.toString()), isSigner: false, isWritable: true },
|
|
310
310
|
// fee recipient
|
|
311
311
|
{ pubkey: FEE_RECIPIENT, isSigner: false, isWritable: true },
|
|
312
312
|
// signer
|
package/dist/depositSPL.js
CHANGED
|
@@ -72,7 +72,7 @@ export async function depositSPL({ lightWasm, storage, keyBasePath, publicKey, c
|
|
|
72
72
|
}
|
|
73
73
|
// let mintInfo = await getMint(connection, token.pubkey)
|
|
74
74
|
// let units_per_token = 10 ** mintInfo.decimals
|
|
75
|
-
let recipient = new PublicKey(
|
|
75
|
+
let recipient = new PublicKey(FEE_RECIPIENT.toString()); // Using fee recipient as dummy recipient for deposit
|
|
76
76
|
let recipient_ata = getAssociatedTokenAddressSync(token.pubkey, recipient, true);
|
|
77
77
|
let feeRecipientTokenAccount = getAssociatedTokenAddressSync(token.pubkey, FEE_RECIPIENT, true);
|
|
78
78
|
let signerTokenAccount = getAssociatedTokenAddressSync(token.pubkey, signer);
|
package/dist/utils/constants.js
CHANGED
|
@@ -2,7 +2,7 @@ import { PublicKey } from '@solana/web3.js';
|
|
|
2
2
|
import BN from 'bn.js';
|
|
3
3
|
export const FIELD_SIZE = new BN('21888242871839275222246405745257275088548364400416034343698204186575808495617');
|
|
4
4
|
export const PROGRAM_ID = process.env.NEXT_PUBLIC_PROGRAM_ID ? new PublicKey(process.env.NEXT_PUBLIC_PROGRAM_ID) : new PublicKey('9fhQBbumKEFuXtMBDw8AaQyAjCorLGJQiS3skWZdQyQD');
|
|
5
|
-
export const FEE_RECIPIENT = new PublicKey('
|
|
5
|
+
export const FEE_RECIPIENT = new PublicKey('97rSMQUukMDjA7PYErccyx7ZxbHvSDaeXp2ig5BwSrTf');
|
|
6
6
|
export const FETCH_UTXOS_GROUP_SIZE = 20_000;
|
|
7
7
|
export const TRANSACT_IX_DISCRIMINATOR = Buffer.from([217, 149, 130, 143, 221, 52, 252, 119]);
|
|
8
8
|
export const TRANSACT_SPL_IX_DISCRIMINATOR = Buffer.from([154, 66, 244, 204, 78, 225, 163, 151]);
|
package/package.json
CHANGED
package/src/deposit.ts
CHANGED
|
@@ -284,7 +284,7 @@ export async function deposit({ lightWasm, storage, keyBasePath, publicKey, conn
|
|
|
284
284
|
// Create the deposit ExtData with real encrypted outputs
|
|
285
285
|
const extData = {
|
|
286
286
|
// recipient - just a placeholder, not actually used for deposits.
|
|
287
|
-
recipient: new PublicKey(
|
|
287
|
+
recipient: new PublicKey(FEE_RECIPIENT).toString(), // Using fee recipient as dummy recipient for deposit
|
|
288
288
|
extAmount: new BN(extAmount),
|
|
289
289
|
encryptedOutput1: encryptedOutput1,
|
|
290
290
|
encryptedOutput2: encryptedOutput2,
|
|
@@ -375,7 +375,7 @@ export async function deposit({ lightWasm, storage, keyBasePath, publicKey, conn
|
|
|
375
375
|
{ pubkey: treeTokenAccount, isSigner: false, isWritable: true },
|
|
376
376
|
{ pubkey: globalConfigAccount, isSigner: false, isWritable: false },
|
|
377
377
|
// recipient - just a placeholder, not actually used for deposits. using an ALT address to save bytes
|
|
378
|
-
{ pubkey: new PublicKey(
|
|
378
|
+
{ pubkey: new PublicKey(FEE_RECIPIENT.toString()), isSigner: false, isWritable: true },
|
|
379
379
|
// fee recipient
|
|
380
380
|
{ pubkey: FEE_RECIPIENT, isSigner: false, isWritable: true },
|
|
381
381
|
// signer
|
package/src/depositSPL.ts
CHANGED
|
@@ -104,7 +104,7 @@ export async function depositSPL({ lightWasm, storage, keyBasePath, publicKey, c
|
|
|
104
104
|
// let mintInfo = await getMint(connection, token.pubkey)
|
|
105
105
|
// let units_per_token = 10 ** mintInfo.decimals
|
|
106
106
|
|
|
107
|
-
let recipient = new PublicKey(
|
|
107
|
+
let recipient = new PublicKey(FEE_RECIPIENT.toString()) // Using fee recipient as dummy recipient for deposit
|
|
108
108
|
let recipient_ata = getAssociatedTokenAddressSync(
|
|
109
109
|
token.pubkey,
|
|
110
110
|
recipient,
|
package/src/utils/constants.ts
CHANGED
|
@@ -5,7 +5,7 @@ export const FIELD_SIZE = new BN('2188824287183927522224640574525727508854836440
|
|
|
5
5
|
|
|
6
6
|
export const PROGRAM_ID = process.env.NEXT_PUBLIC_PROGRAM_ID ? new PublicKey(process.env.NEXT_PUBLIC_PROGRAM_ID) : new PublicKey('9fhQBbumKEFuXtMBDw8AaQyAjCorLGJQiS3skWZdQyQD');
|
|
7
7
|
|
|
8
|
-
export const FEE_RECIPIENT = new PublicKey('
|
|
8
|
+
export const FEE_RECIPIENT = new PublicKey('97rSMQUukMDjA7PYErccyx7ZxbHvSDaeXp2ig5BwSrTf')
|
|
9
9
|
|
|
10
10
|
export const FETCH_UTXOS_GROUP_SIZE = 20_000
|
|
11
11
|
|