コード例 #1
0
    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);
    }
コード例 #2
0
    // 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);
    }
コード例 #3
0
    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);
    }
コード例 #4
0
    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()
        });
    }
コード例 #5
0
 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));
 }
コード例 #6
0
    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);
    }
コード例 #7
0
 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)));
 }
コード例 #8
0
 private static extern bool aergo_get_account_state(IntPtr _Instance, ref AergoAccount Account);
コード例 #9
0
 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));
 }
コード例 #10
0
 private static extern bool aergo_call_smart_contract_json(IntPtr _Instance, ref TransactionReceipt Receipt, ref AergoAccount Account, string ContractAddress, string Function, string JsonArgs);
コード例 #11
0
 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);
コード例 #12
0
 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);
コード例 #13
0
 private static extern bool aergo_transfer_str_async(IntPtr _Instance, [MarshalAs(UnmanagedType.FunctionPtr)] TransactionReceiptCallback Callback, CallbackState Context, ref AergoAccount Account, string ToAccount, string Value);
コード例 #14
0
 private static extern bool aergo_transfer_bignum(IntPtr _Instance, ref TransactionReceipt Receipt, ref AergoAccount Account, string ToAccount, byte[] BigNumber, int Size);
コード例 #15
0
 private static extern bool aergo_transfer_str(IntPtr _Instance, ref TransactionReceipt Receipt, ref AergoAccount Account, string ToAccount, string Value);
コード例 #16
0
 private static extern bool aergo_transfer_int(IntPtr _Instance, ref TransactionReceipt Receipt, ref AergoAccount Account, string ToAccount, UInt64 IntegerPart, UInt64 DecimalPart);
コード例 #17
0
 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));
 }
コード例 #18
0
 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);
コード例 #19
0
 public bool CheckPrivateKey(AergoAccount account)
 {
     return(aergo_check_privkey(_Instance, account));
 }
コード例 #20
0
 private static extern bool aergo_check_privkey(IntPtr _Instance, AergoAccount Account);