public TransactionReceipt Transfer(ref AergoAccount account, string ToAccount, string Value) { TransactionReceipt receipt = new TransactionReceipt(); receipt.Sent = aergo_transfer_str(_Instance, ref receipt, ref account, ToAccount, Value); return(receipt); }
// Call Smart Contract public TransactionReceipt CallSmartContract(ref AergoAccount account, string pContractAddress, string pFunction, params object[] parameters) { TransactionReceipt receipt = new TransactionReceipt(); receipt.Sent = aergo_call_smart_contract_json(_Instance, ref receipt, ref account, pContractAddress, pFunction, ToJsonArray(parameters)); return(receipt); }
public TransactionReceipt Transfer(ref AergoAccount account, string ToAccount, UInt64 IntegerPart, UInt64 DecimalPart) { TransactionReceipt receipt = new TransactionReceipt(); receipt.Sent = aergo_transfer_int(_Instance, ref receipt, ref account, ToAccount, IntegerPart, DecimalPart); return(receipt); }
public StateResult GetAccountInfo(ref AergoAccount account) { StringBuilder sb = new StringBuilder(256); Boolean success = aergo_get_account_state(_Instance, ref account, sb); return(new StateResult { success = success, error = sb.ToString() }); }
public bool TransferAsync(ref AergoAccount account, string ToAccount, BigInteger Value, TransactionReceiptCallback Callback, CallbackState Context) { byte[] buf = Value.ToByteArray(); // convert to big endian for (int i = 0, j = buf.Length - 1; i < j; i++, j--) { byte temp = buf[i]; buf[i] = buf[j]; buf[j] = temp; } return(aergo_transfer_bignum_async(_Instance, Callback, Context, ref account, ToAccount, buf, buf.Length)); }
public TransactionReceipt Transfer(ref AergoAccount account, string ToAccount, BigInteger Value) { TransactionReceipt receipt = new TransactionReceipt(); byte[] buf = Value.ToByteArray(); // convert to big endian for (int i = 0, j = buf.Length - 1; i < j; i++, j--) { byte temp = buf[i]; buf[i] = buf[j]; buf[j] = temp; } receipt.Sent = aergo_transfer_bignum(_Instance, ref receipt, ref account, ToAccount, buf, buf.Length); return(receipt); }
public bool CallSmartContractAsync(TransactionReceiptCallback Callback, CallbackState Context, ref AergoAccount account, string pContractAddress, string pFunction, params object[] parameters) { return(aergo_call_smart_contract_json_async(_Instance, Callback, Context, ref account, pContractAddress, pFunction, ToJsonArray(parameters))); }
private static extern bool aergo_get_account_state(IntPtr _Instance, ref AergoAccount Account);
public bool TransferAsync(ref AergoAccount account, string ToAccount, UInt64 IntegerPart, UInt64 DecimalPart, TransactionReceiptCallback Callback, CallbackState Context) { return(aergo_transfer_int_async(_Instance, Callback, Context, ref account, ToAccount, IntegerPart, DecimalPart)); }
private static extern bool aergo_call_smart_contract_json(IntPtr _Instance, ref TransactionReceipt Receipt, ref AergoAccount Account, string ContractAddress, string Function, string JsonArgs);
private static extern bool aergo_transfer_bignum_async(IntPtr _Instance, [MarshalAs(UnmanagedType.FunctionPtr)] TransactionReceiptCallback Callback, CallbackState Context, ref AergoAccount Account, string ToAccount, byte[] BigNumber, int Size);
private static extern bool aergo_transfer_int_async(IntPtr _Instance, [MarshalAs(UnmanagedType.FunctionPtr)] TransactionReceiptCallback Callback, CallbackState Context, ref AergoAccount Account, string ToAccount, UInt64 IntegerPart, UInt64 DecimalPart);
private static extern bool aergo_transfer_str_async(IntPtr _Instance, [MarshalAs(UnmanagedType.FunctionPtr)] TransactionReceiptCallback Callback, CallbackState Context, ref AergoAccount Account, string ToAccount, string Value);
private static extern bool aergo_transfer_bignum(IntPtr _Instance, ref TransactionReceipt Receipt, ref AergoAccount Account, string ToAccount, byte[] BigNumber, int Size);
private static extern bool aergo_transfer_str(IntPtr _Instance, ref TransactionReceipt Receipt, ref AergoAccount Account, string ToAccount, string Value);
private static extern bool aergo_transfer_int(IntPtr _Instance, ref TransactionReceipt Receipt, ref AergoAccount Account, string ToAccount, UInt64 IntegerPart, UInt64 DecimalPart);
public bool TransferAsync(ref AergoAccount account, string ToAccount, string Value, TransactionReceiptCallback Callback, CallbackState Context) { return(aergo_transfer_str_async(_Instance, Callback, Context, ref account, ToAccount, Value)); }
private static extern bool aergo_call_smart_contract_json_async(IntPtr _Instance, [MarshalAs(UnmanagedType.FunctionPtr)] TransactionReceiptCallback Callback, CallbackState Context, ref AergoAccount Account, string ContractAddress, string Function, string JsonArgs);
public bool CheckPrivateKey(AergoAccount account) { return(aergo_check_privkey(_Instance, account)); }
private static extern bool aergo_check_privkey(IntPtr _Instance, AergoAccount Account);