nulltrace-sdk 1.0.2 → 1.0.4
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/index.cjs +6 -10
- package/dist/index.mjs +6 -10
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -166,7 +166,9 @@ async function _signSendConfirm(connection, wallet, transactions) {
|
|
|
166
166
|
const signed = await wallet.signAllTransactions(transactions);
|
|
167
167
|
const sigs = [];
|
|
168
168
|
for (const tx of signed) {
|
|
169
|
-
const sig = await connection.sendRawTransaction(tx.serialize()
|
|
169
|
+
const sig = await connection.sendRawTransaction(tx.serialize(), {
|
|
170
|
+
skipPreflight: true
|
|
171
|
+
});
|
|
170
172
|
await connection.confirmTransaction(sig);
|
|
171
173
|
sigs.push(sig);
|
|
172
174
|
}
|
|
@@ -434,14 +436,6 @@ var NullTrace = class _NullTrace {
|
|
|
434
436
|
}
|
|
435
437
|
})
|
|
436
438
|
);
|
|
437
|
-
const operatorAta = await (0, import_spl_token.getAssociatedTokenAddress)(mintPk, OPERATOR_PUBLIC_KEY, false, tokenProgram);
|
|
438
|
-
const operatorInfo = await this.connection.getAccountInfo(operatorAta);
|
|
439
|
-
if (!operatorInfo) {
|
|
440
|
-
ixs.push((0, import_spl_token.createAssociatedTokenAccountInstruction)(owner, operatorAta, OPERATOR_PUBLIC_KEY, mintPk, tokenProgram));
|
|
441
|
-
}
|
|
442
|
-
ixs.push(
|
|
443
|
-
(0, import_spl_token.createTransferCheckedInstruction)(sourceAta, mintPk, operatorAta, owner, feeLamports, decimals, [], tokenProgram)
|
|
444
|
-
);
|
|
445
439
|
}
|
|
446
440
|
const adl = await this._getAlt();
|
|
447
441
|
const txs = await _packTransactions(this.connection, owner, ixs, adl);
|
|
@@ -864,7 +858,9 @@ var NullTrace = class _NullTrace {
|
|
|
864
858
|
});
|
|
865
859
|
const preSigs = [];
|
|
866
860
|
for (let i = 0; i < preTransactions.length; i++) {
|
|
867
|
-
const sig = await this.connection.sendRawTransaction(signed[i].serialize()
|
|
861
|
+
const sig = await this.connection.sendRawTransaction(signed[i].serialize(), {
|
|
862
|
+
skipPreflight: true
|
|
863
|
+
});
|
|
868
864
|
await this.connection.confirmTransaction(sig);
|
|
869
865
|
preSigs.push(sig);
|
|
870
866
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -155,7 +155,9 @@ async function _signSendConfirm(connection, wallet, transactions) {
|
|
|
155
155
|
const signed = await wallet.signAllTransactions(transactions);
|
|
156
156
|
const sigs = [];
|
|
157
157
|
for (const tx of signed) {
|
|
158
|
-
const sig = await connection.sendRawTransaction(tx.serialize()
|
|
158
|
+
const sig = await connection.sendRawTransaction(tx.serialize(), {
|
|
159
|
+
skipPreflight: true
|
|
160
|
+
});
|
|
159
161
|
await connection.confirmTransaction(sig);
|
|
160
162
|
sigs.push(sig);
|
|
161
163
|
}
|
|
@@ -423,14 +425,6 @@ var NullTrace = class _NullTrace {
|
|
|
423
425
|
}
|
|
424
426
|
})
|
|
425
427
|
);
|
|
426
|
-
const operatorAta = await getAssociatedTokenAddress(mintPk, OPERATOR_PUBLIC_KEY, false, tokenProgram);
|
|
427
|
-
const operatorInfo = await this.connection.getAccountInfo(operatorAta);
|
|
428
|
-
if (!operatorInfo) {
|
|
429
|
-
ixs.push(createAssociatedTokenAccountInstruction(owner, operatorAta, OPERATOR_PUBLIC_KEY, mintPk, tokenProgram));
|
|
430
|
-
}
|
|
431
|
-
ixs.push(
|
|
432
|
-
createTransferCheckedInstruction(sourceAta, mintPk, operatorAta, owner, feeLamports, decimals, [], tokenProgram)
|
|
433
|
-
);
|
|
434
428
|
}
|
|
435
429
|
const adl = await this._getAlt();
|
|
436
430
|
const txs = await _packTransactions(this.connection, owner, ixs, adl);
|
|
@@ -853,7 +847,9 @@ var NullTrace = class _NullTrace {
|
|
|
853
847
|
});
|
|
854
848
|
const preSigs = [];
|
|
855
849
|
for (let i = 0; i < preTransactions.length; i++) {
|
|
856
|
-
const sig = await this.connection.sendRawTransaction(signed[i].serialize()
|
|
850
|
+
const sig = await this.connection.sendRawTransaction(signed[i].serialize(), {
|
|
851
|
+
skipPreflight: true
|
|
852
|
+
});
|
|
857
853
|
await this.connection.confirmTransaction(sig);
|
|
858
854
|
preSigs.push(sig);
|
|
859
855
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nulltrace-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "NullTrace SDK - Privacy-focused Solana transactions powered by ZK compression",
|
|
5
5
|
"author": "NullTrace",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
|
53
|
-
"url": "https://github.com/NullTraceBot/null-trace-local
|
|
53
|
+
"url": "https://github.com/NullTraceBot/null-trace-local",
|
|
54
54
|
"directory": "sdk"
|
|
55
55
|
},
|
|
56
56
|
"homepage": "https://nulltrace.app"
|