Instantiate a Connect Wallet
private const string API_KEY = "my_api_key";
private int _chainId = 80001;
private ConnectAdaptor _connectAuthAdaptor;
private ComethWallet _wallet;
private void Start()
{
if (string.IsNullOrEmpty(apiKey) || chainId == 0)
{
Debug.LogError("Please set the apiKey and chainId serialised variables");
return;
}
_connectAuthAdaptor = new ConnectAdaptor(chainId, apiKey, baseUrl);
_wallet = string.IsNullOrEmpty(baseUrl)
? new ComethWallet(_connectAuthAdaptor, apiKey)
: new ComethWallet(_connectAuthAdaptor, apiKey, baseUrl);
}
await _wallet.Connect(WALLET_ADDRESS)
await _wallet.GetAddress()
var safeTxHash = await _wallet.SendTransaction(to, value, data);
var transactionReceipt = await _wallet.Wait(safeTxHash);
var messageSigned = await _wallet.SignMessage("Hello World!");
var addSignerRequest = await connectAuthAdaptor.InitNewSignerRequest(walletAddress);
var newSignerRequests = await connectAuthAdaptor.GetNewSignerRequests();