"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tx_factory_1 = require("./tx-factory");
describe('txFactory', () => {
    it('created a RegisterNamespace tx', () => {
        const rawTx = [
            30,
            4,
            4,
            'c2910e881fa0618a7d7fdf05e2b93158678eb5ea1a5f831e897bf422a2587985',
            19,
            true,
            '3059301306072a8648ce3d020106082a8648ce3d030107034200045bc4e0d5a6f92b197006ab5ea629f6e77e418d441d8e84ff2706ac68bfbc0f3f4e5bb7e3ea73eb399220e5bb75d4d4b55e8239a6c6af63f5fa483a2a3922c97d',
            'ABQ0Du7VYM8qqBCpxcNk1HBmoEbxDViyyw',
            1599731638,
            '',
            'test9b591ede',
            '',
            'MEUCIAs4EuQPpTnBpo8OXLejP4Rg2B5H+p/ojZzYLbUZFbskAiEAikN9OD3/Boj93DhzKzKsNDqiWb8w34Y4LhcOp7M0uVs=',
            25
        ];
        const expected = {
            chainId: 30,
            version: 4,
            txType: 'NAMESPACE_REGISTER',
            hash: 'c2910e881fa0618a7d7fdf05e2b93158678eb5ea1a5f831e897bf422a2587985',
            nonce: 19,
            updated: true,
            fromPublicKey: '3059301306072a8648ce3d020106082a8648ce3d030107034200045bc4e0d5a6f92b197006ab5ea629f6e77e418d441d8e84ff2706ac68bfbc0f3f4e5bb7e3ea73eb399220e5bb75d4d4b55e8239a6c6af63f5fa483a2a3922c97d',
            fromAddress: 'ABQ0Du7VYM8qqBCpxcNk1HBmoEbxDViyyw',
            timestamp: 1599731638,
            powerOfAttorney: '',
            namespace: 'test9b591ede',
            metadata: '',
            signature: 'MEUCIAs4EuQPpTnBpo8OXLejP4Rg2B5H+p/ojZzYLbUZFbskAiEAikN9OD3/Boj93DhzKzKsNDqiWb8w34Y4LhcOp7M0uVs=',
            height: 25,
        };
        const tx = tx_factory_1.createTx(rawTx);
        expect(tx).toEqual(expected);
    });
});
