@t2000/sdk 0.1.8 → 0.1.9
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 +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -797,8 +797,8 @@ async function executeAutoTopUp(client, keypair) {
|
|
|
797
797
|
toAsset: "SUI",
|
|
798
798
|
amount: topupAmountHuman
|
|
799
799
|
});
|
|
800
|
-
const
|
|
801
|
-
const txBytesBase64 = Buffer.from(
|
|
800
|
+
const txJson = tx.serialize();
|
|
801
|
+
const txBytesBase64 = Buffer.from(txJson).toString("base64");
|
|
802
802
|
const sponsoredResult = await requestGasSponsorship(txBytesBase64, address, "auto-topup");
|
|
803
803
|
const sponsoredTxBytes = Buffer.from(sponsoredResult.txBytes, "base64");
|
|
804
804
|
const { signature: agentSig } = await keypair.signTransaction(sponsoredTxBytes);
|
|
@@ -874,8 +874,8 @@ async function tryAutoTopUpThenSelfFund(client, keypair, tx) {
|
|
|
874
874
|
async function trySponsored(client, keypair, tx) {
|
|
875
875
|
const address = keypair.getPublicKey().toSuiAddress();
|
|
876
876
|
tx.setSender(address);
|
|
877
|
-
const
|
|
878
|
-
const txBytesBase64 = Buffer.from(
|
|
877
|
+
const txJson = tx.serialize();
|
|
878
|
+
const txBytesBase64 = Buffer.from(txJson).toString("base64");
|
|
879
879
|
const sponsoredResult = await requestGasSponsorship(txBytesBase64, address);
|
|
880
880
|
const sponsoredTxBytes = Buffer.from(sponsoredResult.txBytes, "base64");
|
|
881
881
|
const { signature: agentSig } = await keypair.signTransaction(sponsoredTxBytes);
|