@primuslabs/fund-js-sdk 0.1.28 → 0.1.29
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.js +4 -3
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5949,8 +5949,11 @@ async function reClaim({
|
|
|
5949
5949
|
tx = new import_web33.Transaction().add(instruction);
|
|
5950
5950
|
tx.feePayer = userKey;
|
|
5951
5951
|
tx.recentBlockhash = (await provider.connection.getLatestBlockhash()).blockhash;
|
|
5952
|
+
signatureStr = await provider.sendAndConfirm(tx);
|
|
5953
|
+
return resolve(signatureStr);
|
|
5952
5954
|
console.log("UnSigned tx size:", tx.serialize({ requireAllSignatures: false, verifySignatures: false }).length, "bytes");
|
|
5953
5955
|
const signedTx = await provider.wallet.signTransaction(tx);
|
|
5956
|
+
signedTx.partialSign();
|
|
5954
5957
|
signatureStr = getTxSigStrFromTx(signedTx);
|
|
5955
5958
|
const isOnChain = await getTxIsOnChain(signatureStr, provider.connection);
|
|
5956
5959
|
if (isOnChain) {
|
|
@@ -5959,9 +5962,7 @@ async function reClaim({
|
|
|
5959
5962
|
} else {
|
|
5960
5963
|
const serializeSignedTx = signedTx.serialize();
|
|
5961
5964
|
console.log("Signed tx size:", serializeSignedTx.length, "bytes");
|
|
5962
|
-
|
|
5963
|
-
const rpcConnection = new import_web33.Connection(rpc);
|
|
5964
|
-
signatureStr = await rpcConnection.sendRawTransaction(serializeSignedTx);
|
|
5965
|
+
signatureStr = await provider.connection.sendRawTransaction(serializeSignedTx);
|
|
5965
5966
|
console.log("reClaim done ", signatureStr);
|
|
5966
5967
|
return resolve(signatureStr);
|
|
5967
5968
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -5531,7 +5531,6 @@ var zktlsIdl_default = {
|
|
|
5531
5531
|
import * as anchor2 from "@coral-xyz/anchor";
|
|
5532
5532
|
import {
|
|
5533
5533
|
PublicKey as PublicKey3,
|
|
5534
|
-
Connection as Connection2,
|
|
5535
5534
|
SystemProgram,
|
|
5536
5535
|
Transaction,
|
|
5537
5536
|
Keypair
|
|
@@ -5923,8 +5922,11 @@ async function reClaim({
|
|
|
5923
5922
|
tx = new Transaction().add(instruction);
|
|
5924
5923
|
tx.feePayer = userKey;
|
|
5925
5924
|
tx.recentBlockhash = (await provider.connection.getLatestBlockhash()).blockhash;
|
|
5925
|
+
signatureStr = await provider.sendAndConfirm(tx);
|
|
5926
|
+
return resolve(signatureStr);
|
|
5926
5927
|
console.log("UnSigned tx size:", tx.serialize({ requireAllSignatures: false, verifySignatures: false }).length, "bytes");
|
|
5927
5928
|
const signedTx = await provider.wallet.signTransaction(tx);
|
|
5929
|
+
signedTx.partialSign();
|
|
5928
5930
|
signatureStr = getTxSigStrFromTx(signedTx);
|
|
5929
5931
|
const isOnChain = await getTxIsOnChain(signatureStr, provider.connection);
|
|
5930
5932
|
if (isOnChain) {
|
|
@@ -5933,9 +5935,7 @@ async function reClaim({
|
|
|
5933
5935
|
} else {
|
|
5934
5936
|
const serializeSignedTx = signedTx.serialize();
|
|
5935
5937
|
console.log("Signed tx size:", serializeSignedTx.length, "bytes");
|
|
5936
|
-
|
|
5937
|
-
const rpcConnection = new Connection2(rpc);
|
|
5938
|
-
signatureStr = await rpcConnection.sendRawTransaction(serializeSignedTx);
|
|
5938
|
+
signatureStr = await provider.connection.sendRawTransaction(serializeSignedTx);
|
|
5939
5939
|
console.log("reClaim done ", signatureStr);
|
|
5940
5940
|
return resolve(signatureStr);
|
|
5941
5941
|
}
|