@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.js
CHANGED
|
@@ -795,8 +795,8 @@ async function executeAutoTopUp(client, keypair) {
|
|
|
795
795
|
toAsset: "SUI",
|
|
796
796
|
amount: topupAmountHuman
|
|
797
797
|
});
|
|
798
|
-
const
|
|
799
|
-
const txBytesBase64 = Buffer.from(
|
|
798
|
+
const txJson = tx.serialize();
|
|
799
|
+
const txBytesBase64 = Buffer.from(txJson).toString("base64");
|
|
800
800
|
const sponsoredResult = await requestGasSponsorship(txBytesBase64, address, "auto-topup");
|
|
801
801
|
const sponsoredTxBytes = Buffer.from(sponsoredResult.txBytes, "base64");
|
|
802
802
|
const { signature: agentSig } = await keypair.signTransaction(sponsoredTxBytes);
|
|
@@ -872,8 +872,8 @@ async function tryAutoTopUpThenSelfFund(client, keypair, tx) {
|
|
|
872
872
|
async function trySponsored(client, keypair, tx) {
|
|
873
873
|
const address = keypair.getPublicKey().toSuiAddress();
|
|
874
874
|
tx.setSender(address);
|
|
875
|
-
const
|
|
876
|
-
const txBytesBase64 = Buffer.from(
|
|
875
|
+
const txJson = tx.serialize();
|
|
876
|
+
const txBytesBase64 = Buffer.from(txJson).toString("base64");
|
|
877
877
|
const sponsoredResult = await requestGasSponsorship(txBytesBase64, address);
|
|
878
878
|
const sponsoredTxBytes = Buffer.from(sponsoredResult.txBytes, "base64");
|
|
879
879
|
const { signature: agentSig } = await keypair.signTransaction(sponsoredTxBytes);
|