@t2000/sdk 0.2.0 → 0.2.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/dist/index.js CHANGED
@@ -722,10 +722,11 @@ function solveHashcash(challenge) {
722
722
 
723
723
  // src/gas/gasStation.ts
724
724
  async function requestGasSponsorship(txJson, sender, type) {
725
+ const txBytes = Buffer.from(txJson).toString("base64");
725
726
  const res = await fetch(`${API_BASE_URL}/api/gas`, {
726
727
  method: "POST",
727
728
  headers: { "Content-Type": "application/json" },
728
- body: JSON.stringify({ txJson, sender, type })
729
+ body: JSON.stringify({ txJson, txBytes, sender, type })
729
730
  });
730
731
  const data = await res.json();
731
732
  if (!res.ok) {