@bolt-liquidity-hq/sui-client 0.1.0-beta.23 → 0.1.0-beta.25
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 +24 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -29
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var MainnetContracts = {
|
|
|
23
23
|
oracle: "0xfa3975b98f3d0e3df18ed88ae6e69db31836b3f4212df02fae144b1e5a89ca8e",
|
|
24
24
|
router: " "
|
|
25
25
|
};
|
|
26
|
-
var MainnetPackageId = "
|
|
26
|
+
var MainnetPackageId = "0x71a61b841cc90a74607e99084e47818a7d1424649f4047ad375d9c2a4111e658";
|
|
27
27
|
var MainnetPoolGlobalConfigId = "0x7bcd5035a991f42fa84c5a42216b5638cb3f1a8c4f065063093b0a3d5f165d63";
|
|
28
28
|
var MainnetNativeTokenDenom = SUI_TOKEN_DENOM;
|
|
29
29
|
var MainnetAssets = {
|
|
@@ -674,37 +674,32 @@ var signAndExecuteTx = async (suiClient, signer, target, args, typeArguments, tr
|
|
|
674
674
|
arguments: txArgs,
|
|
675
675
|
typeArguments
|
|
676
676
|
});
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
return result;
|
|
686
|
-
} else {
|
|
687
|
-
throw new TransactionFailedError2(result.digest, result.effects?.status.error, { result });
|
|
688
|
-
}
|
|
677
|
+
if ("toSuiAddress" in signer) {
|
|
678
|
+
const result = await suiClient.signAndExecuteTransaction({
|
|
679
|
+
signer,
|
|
680
|
+
transaction: tx,
|
|
681
|
+
options
|
|
682
|
+
});
|
|
683
|
+
if (result.effects?.status.status === "success") {
|
|
684
|
+
return result;
|
|
689
685
|
} else {
|
|
690
|
-
|
|
691
|
-
transaction: tx
|
|
692
|
-
});
|
|
693
|
-
if (!result.digest) {
|
|
694
|
-
throw new TransactionFailedError2("not found");
|
|
695
|
-
}
|
|
696
|
-
const fullTx = await suiClient.waitForTransaction({
|
|
697
|
-
digest: result.digest,
|
|
698
|
-
options
|
|
699
|
-
});
|
|
700
|
-
return fullTx;
|
|
686
|
+
throw new TransactionFailedError2(result.digest, result.effects?.status.error, { result });
|
|
701
687
|
}
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
args,
|
|
706
|
-
typeArguments
|
|
688
|
+
} else {
|
|
689
|
+
const result = await signer.signAndExecuteTransaction({
|
|
690
|
+
transaction: tx
|
|
707
691
|
});
|
|
692
|
+
if (!result.digest) {
|
|
693
|
+
throw new TransactionFailedError2("not found");
|
|
694
|
+
}
|
|
695
|
+
const fullTx = await suiClient.waitForTransaction({
|
|
696
|
+
digest: result.digest,
|
|
697
|
+
options
|
|
698
|
+
});
|
|
699
|
+
if (fullTx.effects?.status.status !== "success") {
|
|
700
|
+
throw new TransactionFailedError2(result.digest, fullTx.effects?.status.error, { result });
|
|
701
|
+
}
|
|
702
|
+
return fullTx;
|
|
708
703
|
}
|
|
709
704
|
};
|
|
710
705
|
var estimateTxGasPrice = async (suiClient, senderAddress, target, args, typeArguments, transaction, gasAdjustment = DEFAULT_GAS_ADJUSTMENT) => {
|