Any operation contracting with AIXCHAIN network is a transaction. A transaction can be Aixchain transfer, ARC-10 transfer, freezing & unfreezing, voting, Etc.
The routine for sending
A normal routine for sending a transaction is:
Create -> Sign -> Broadcast -> (wait) -> Lookup and get receipt
Aixchain SDK defines the same protobufs include all RPC APIs and transaction related classes, also, Aixchain SDK wraps the functions in AixcClient.class.
An simple example
public static void sendTrx()
{
System.out.println("============= TRC transfer =============");
AixcClient client = new AixcClient("172.104.51.182:16669","172.104.51.182:16669","private key");
try {
TransactionExtention transactionExtention = client.transfer("414203485a535a4072C9FBFaADDfe2A010AD0BcdB0", "41a9c46373aEB4749E3CE45acA242b027A46f486f9", 20_000_000);
Transaction signedTxn = client.signTransaction(transactionExtention);
String ret = client.broadcastTransaction(signedTxn);
System.out.println("======== Result ========\n" + ret.toString());
}
catch (Exception e) {
System.out.println("error: " + e);
}
}