Replies: 2 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@MoonNone you can follow the setup tutorial: https://solana.unity-sdk.gg/docs/installation Afterwards, you can build a transaction and sign it with the cross platform method: Here is an example for creating and signing a minting transaction: https://solana.unity-sdk.gg/docs/mint-an-nft |
Beta Was this translation helpful? Give feedback.
-
How do you sign a transaction using Wallet class?
I tried to replicate WalletBase code but do not succeed in that :
public static async Task<RequestResult> SignAndSendTransaction(
Transaction transaction, bool skipPreflight = false, Commitment commitment = Commitment.Confirmed)
{
transaction.Sign(m_walletAccount);
transaction.Signatures = DeduplicateTransactionSignatures(transaction.Signatures, allowEmptySignatures: true);
var txSign = await m_walletAccount.Sign(transaction);
txSign.Signatures = DeduplicateTransactionSignatures(tx.Signatures);
return await m_clientRPC.SendTransactionAsync(Convert.ToBase64String(txSign.Serialize()), skipPreflight: skipPreflight, preFlightCommitment: commitment);
}
Beta Was this translation helpful? Give feedback.
All reactions