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