"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const src_1 = require("../../src");
const BtcMccConnection = {
    url: process.env.BTC_URL || "",
    username: process.env.BTC_USERNAME || "",
    password: process.env.BTC_PASSWORD || "",
    apiTokenKey: process.env.FLARE_API_PORTAL_KEY || "",
};
describe("Template test ", function () {
    let MccClient;
    before(async function () {
        MccClient = new src_1.MCC.BTC(BtcMccConnection);
    });
    // A test to find some transactions on btc node that have op-return script entry and are not block mining transactions
    it.skip("Should find op return trans", async () => {
        const h = await MccClient.getBlockHeight();
        const block = await MccClient.getBlock(h);
        console.log(block === null || block === void 0 ? void 0 : block.blockHash);
        for (let i = 7; i < 20; i++) {
            const bl = await MccClient.getBlock(h - i);
            if (bl) {
                for (const tran of bl.stdTransactionIds) {
                    const t = await MccClient.getTransaction(tran);
                    if (t) {
                        if (t.type !== "coinbase" && t.reference.length > 0) {
                            console.log(t.stdTxid);
                            break;
                        }
                    }
                }
            }
        }
    });
});
//# sourceMappingURL=template.test.js.map