@wireio/stake 1.0.0 → 1.0.1
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/lib/stake.browser.js +15 -20
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.js +15 -20
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +15 -20
- package/lib/stake.m.js.map +1 -1
- package/package.json +1 -1
- package/src/networks/solana/solana.ts +29 -23
package/lib/stake.m.js
CHANGED
|
@@ -8567,13 +8567,12 @@ const _SolanaStakingClient = class _SolanaStakingClient {
|
|
|
8567
8567
|
throw new Error("Deposit amount must be greater than zero.");
|
|
8568
8568
|
}
|
|
8569
8569
|
try {
|
|
8570
|
-
const
|
|
8571
|
-
const
|
|
8572
|
-
const
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
});
|
|
8570
|
+
const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 4e5 });
|
|
8571
|
+
const ix = await this.depositClient.buildDepositTx(amountLamports);
|
|
8572
|
+
const tx = new Transaction().add(cuIx, ix);
|
|
8573
|
+
const prepared = await this.prepareTx(tx);
|
|
8574
|
+
const signed = await this.signTransaction(prepared.tx);
|
|
8575
|
+
return this.sendAndConfirmHttp(signed, prepared);
|
|
8577
8576
|
} catch (err) {
|
|
8578
8577
|
throw new Error(`Failed to deposit Solana: ${err}`);
|
|
8579
8578
|
}
|
|
@@ -8584,13 +8583,12 @@ const _SolanaStakingClient = class _SolanaStakingClient {
|
|
|
8584
8583
|
throw new Error("Withdraw amount must be greater than zero.");
|
|
8585
8584
|
}
|
|
8586
8585
|
try {
|
|
8587
|
-
const
|
|
8588
|
-
const
|
|
8589
|
-
const
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
});
|
|
8586
|
+
const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 4e5 });
|
|
8587
|
+
const ix = await this.depositClient.buildWithdrawTx(amountLamports);
|
|
8588
|
+
const tx = new Transaction().add(cuIx, ix);
|
|
8589
|
+
const prepared = await this.prepareTx(tx);
|
|
8590
|
+
const signed = await this.signTransaction(prepared.tx);
|
|
8591
|
+
return this.sendAndConfirmHttp(signed, prepared);
|
|
8594
8592
|
} catch (err) {
|
|
8595
8593
|
throw new Error(`Failed to withdraw Solana: ${err}`);
|
|
8596
8594
|
}
|
|
@@ -8639,12 +8637,9 @@ const _SolanaStakingClient = class _SolanaStakingClient {
|
|
|
8639
8637
|
const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 4e5 });
|
|
8640
8638
|
const ix = await this.tokenClient.buildPurchaseIx(amountLamports, user);
|
|
8641
8639
|
const tx = new Transaction().add(cuIx, ix);
|
|
8642
|
-
const
|
|
8643
|
-
const signed = await this.signTransaction(prepared);
|
|
8644
|
-
return
|
|
8645
|
-
blockhash,
|
|
8646
|
-
lastValidBlockHeight
|
|
8647
|
-
});
|
|
8640
|
+
const prepared = await this.prepareTx(tx);
|
|
8641
|
+
const signed = await this.signTransaction(prepared.tx);
|
|
8642
|
+
return this.sendAndConfirmHttp(signed, prepared);
|
|
8648
8643
|
} catch (err) {
|
|
8649
8644
|
throw new Error(`Failed to buy liqSOL pretokens: ${err}`);
|
|
8650
8645
|
}
|