wallet-kit
wallet-kit copied to clipboard
Property '#private' in type 'TransactionBlock' refers to a different member that cannot be accessed from within type 'TransactionBlock'.
`
async function handleSignAndExecuteTxBlock() {
if (!wallet.connected) return;
// define a programmable transaction
const tx = new TransactionBlock();
const packageObjectId = "0xXXX";
tx.moveCall({
target: `${packageObjectId}::nft::mint`,
arguments: [tx.pure("Example NFT")],
});
try {
// execute the programmable transaction
const resData = await wallet.signAndExecuteTransactionBlock({
transactionBlock: tx,
});
console.log("nft minted successfully!", resData);
alert("Congrats! your nft is minted!");
} catch (e) {
console.error("nft mint failed", e);
}
}
`
This issue should be the version mismatch between @suiet/wallet-kit and @mysten/sui.js. So you could try to check these two versions and match them.