privacycash 1.1.22 → 1.1.24
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/models/utxo.js +0 -5
- package/dist/withdrawSPL.js +3 -0
- package/package.json +2 -2
- package/src/models/utxo.ts +0 -5
- package/src/withdrawSPL.ts +3 -0
package/dist/models/utxo.js
CHANGED
|
@@ -64,17 +64,12 @@ export class Utxo {
|
|
|
64
64
|
// Prepare the UTXO data object
|
|
65
65
|
const utxoData = {
|
|
66
66
|
amount: this.amount.toString(),
|
|
67
|
-
blinding: this.blinding.toString(),
|
|
68
67
|
index: this.index,
|
|
69
68
|
mintAddress: this.mintAddress,
|
|
70
|
-
keypair: {
|
|
71
|
-
pubkey: this.keypair.pubkey.toString()
|
|
72
|
-
}
|
|
73
69
|
};
|
|
74
70
|
// Add derived values
|
|
75
71
|
try {
|
|
76
72
|
utxoData.commitment = await this.getCommitment();
|
|
77
|
-
utxoData.nullifier = await this.getNullifier();
|
|
78
73
|
}
|
|
79
74
|
catch (error) {
|
|
80
75
|
utxoData.error = error.message;
|
package/dist/withdrawSPL.js
CHANGED
|
@@ -53,6 +53,9 @@ export async function withdrawSPL({ recipient, lightWasm, storage, publicKey, co
|
|
|
53
53
|
let mintInfo = await getMint(connection, token.pubkey);
|
|
54
54
|
let units_per_token = 10 ** mintInfo.decimals;
|
|
55
55
|
let withdraw_fee_rate = await getConfig('withdraw_fee_rate');
|
|
56
|
+
if (token.name === 'store') {
|
|
57
|
+
withdraw_fee_rate = 0;
|
|
58
|
+
}
|
|
56
59
|
let withdraw_rent_fees = await getConfig('rent_fees');
|
|
57
60
|
let token_rent_fee = withdraw_rent_fees[token.name];
|
|
58
61
|
if (!token_rent_fee) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "privacycash",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "https://github.com/Privacy-Cash/privacy-cash-sdk",
|
|
@@ -48,4 +48,4 @@
|
|
|
48
48
|
"typescript": "^5.9.2",
|
|
49
49
|
"vitest": "^3.2.4"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|
package/src/models/utxo.ts
CHANGED
|
@@ -84,18 +84,13 @@ export class Utxo {
|
|
|
84
84
|
// Prepare the UTXO data object
|
|
85
85
|
const utxoData: any = {
|
|
86
86
|
amount: this.amount.toString(),
|
|
87
|
-
blinding: this.blinding.toString(),
|
|
88
87
|
index: this.index,
|
|
89
88
|
mintAddress: this.mintAddress,
|
|
90
|
-
keypair: {
|
|
91
|
-
pubkey: this.keypair.pubkey.toString()
|
|
92
|
-
}
|
|
93
89
|
};
|
|
94
90
|
|
|
95
91
|
// Add derived values
|
|
96
92
|
try {
|
|
97
93
|
utxoData.commitment = await this.getCommitment();
|
|
98
|
-
utxoData.nullifier = await this.getNullifier();
|
|
99
94
|
} catch (error: any) {
|
|
100
95
|
utxoData.error = error.message;
|
|
101
96
|
}
|
package/src/withdrawSPL.ts
CHANGED
|
@@ -80,6 +80,9 @@ export async function withdrawSPL({ recipient, lightWasm, storage, publicKey, co
|
|
|
80
80
|
let units_per_token = 10 ** mintInfo.decimals
|
|
81
81
|
|
|
82
82
|
let withdraw_fee_rate = await getConfig('withdraw_fee_rate')
|
|
83
|
+
if (token.name === 'store') {
|
|
84
|
+
withdraw_fee_rate = 0
|
|
85
|
+
}
|
|
83
86
|
let withdraw_rent_fees = await getConfig('rent_fees')
|
|
84
87
|
let token_rent_fee = withdraw_rent_fees[token.name]
|
|
85
88
|
if (!token_rent_fee) {
|