Get Transaction by Hash
public void GetTransactionByHash()
{
var api = new PhantasmaAPI("https://testnet.phantasma.info/rpc");
var hash = "9749DCDAA37A53397AFB4EA30547C40BBF6ACC5B89B0234737C7A5AF71B0D4F2";
StartCoroutine(api.GetTransaction(hash,
(txResult) =>
{
Debug.Log($"[Tx] Hash: {txResult.Hash}, State: {txResult.State}");
},
(errorCode, errorMessage) =>
{
Debug.LogError($"[Error][{errorCode}] {errorMessage}");
}
));
}Last updated