 PrivateKey = require '../src/ecc/key_private'
 PublicKey = require '../src/ecc/key_public'
 Signature = require '../src/ecc/signature'
+Aes = require 'ecc/aes'
 WebSocketRpc = require '../src/rpc_api/WebSocketRpc'
 GrapheneApi = require '../src/rpc_api/GrapheneApi'
 
 Promise = require '../src/common/Promise'
 ByteBuffer = require '../src/common/bytebuffer'
 secureRandom = require 'secure-random'
+assert = require 'assert'
 
 tr_helper = require '../src/chain/transaction_helper'
 th = require './test_helper'
 
+hash = require 'common/hash'
 so_type = require '../src/chain/serializer_operation_types'
 account_create_type = so_type.account_create
 transaction_type = so_type.transaction

    
    #it "update account transaction", ->
    it "wallet.transfer nomemo", (done)->
        wallet.transfer(
            "1.2.15", "1.2.14", 1, "1.3.0", memo = null
            broadcast
        ).then (result)->
            #th.print_result result
            #th.print_hex ""
            done()
        .catch th.log_error
        return
    
    it "wallet.transfer encmemo", (done)->
        wallet.transfer(
            "1.2.15", "1.2.14", 1, "1.3.0", memo = "memo"
            broadcast
        ).then (result)->
            #th.print_result result
            #th.print_hex ""
            done()
        .catch th.log_error
        return
    
    it "app.transfer_extended textmemo", (done)->
        tr = app.transfer_extended(
            "1.2.15", "1.2.14", 1, "1.3.0", "memo"
            "1.2.11", null #genesis_private
            "1.2.14"
            10, PrivateKey.fromSeed("nathan")
            broadcast
        ).then (result)->
            #th.print_result result
            #th.print_hex ""
            done()
        .catch th.log_error
        return
    
    it "app.transfer_extended encmemo", (done)->
        app.transfer_extended(
            from = "1.2.15"
            to = "1.2.14"
            amount = 1
            asset = "1.3.0"
            memo = "memo"
            memo_from = "1.2.11"
            memo_from_private = genesis_private
            memo_to = "1.2.14"
            expire = 10
            signer_private_key = PrivateKey.fromSeed("nathan")
            broadcast
        ).then (result)->
            #th.print_result result
            #th.print_hex ""
            done()
        , (e)-> th.log_error(e)
        return
    
    ###


ApiInstances = require('../src/rpc_api/ApiInstances')
WalletApi = require '../src/rpc_api/WalletApi'
WalletDb = require 'stores/WalletDb'
PrivateKeyStore = require "stores/PrivateKeyStore"
ApplicationApi = require '../src/rpc_api/ApplicationApi'
wallet = new WalletApi()
app = new ApplicationApi()

helper = require "./test_helper"
iDB = require "../src/idb-instance"
fakeIndexedDB = require "fake-indexeddb"

###
import_key "1.2.15" "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
