"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../../../src/utils");
const chai_1 = require("../../chai");
const bitcoinjs = __importStar(require("bitcoinjs-lib"));
describe("Bitcoin", () => {
    it("should get correct hash for address", () => {
        // compare hex because type lib has trouble with this enum
        chai_1.assert.deepEqual(utils_1.decodeBtcAddress("bcrt1qjvmc5dtm4qxgtug8faa5jdedlyq4v76ngpqgrl", bitcoinjs.networks.regtest), {
            p2wpkhv0: "0x93378a357ba80c85f1074f7b49372df901567b53",
        });
        chai_1.assert.deepEqual(utils_1.decodeBtcAddress("tb1q45uq0q4v22fspeg3xjnkgf8a0v7pqgjks4k6sz", bitcoinjs.networks.testnet), {
            p2wpkhv0: "0xad380782ac529300e51134a76424fd7b3c102256",
        });
        chai_1.assert.deepEqual(utils_1.decodeBtcAddress("bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq", bitcoinjs.networks.bitcoin), {
            p2wpkhv0: "0xe8df018c7e326cc253faac7e46cdc51e68542c42",
        });
    });
});
//# sourceMappingURL=bitcoin.test.js.map