"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const long_1 = __importDefault(require("long"));
const src_1 = require("../src");
const constants_1 = require("../src/clients/constants");
const local_wallet_1 = __importDefault(require("../src/clients/modules/local-wallet"));
const subaccount_1 = require("../src/clients/subaccount");
const validator_client_1 = require("../src/clients/validator-client");
const constants_2 = require("./constants");
// TODO: Test after testnet deploy latest transfer contracts.
async function test() {
    const wallet = await local_wallet_1.default.fromMnemonic(constants_2.TEST_MNEMONIC, src_1.BECH32_PREFIX);
    console.log(wallet);
    const client = await validator_client_1.ValidatorClient.connect(constants_1.Network.testnet().validatorConfig);
    console.log('**Client**');
    console.log(client);
    const subaccount = subaccount_1.SubaccountInfo.forLocalWallet(wallet, 0);
    const tx = await client.post.withdraw(subaccount, 0, new long_1.default(100000000));
    console.log('**Withdraw Tx**');
    console.log(tx);
}
test()
    .then(() => { })
    .catch((error) => {
    console.log(error.message);
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmZXJfZXhhbXBsZV93aXRoZHJhdy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2V4YW1wbGVzL3RyYW5zZmVyX2V4YW1wbGVfd2l0aGRyYXcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxnREFBd0I7QUFFeEIsZ0NBQXVDO0FBQ3ZDLHdEQUFtRDtBQUNuRCx1RkFBOEQ7QUFDOUQsMERBQTJEO0FBQzNELHNFQUFrRTtBQUNsRSwyQ0FBNEM7QUFFNUMsNkRBQTZEO0FBRTdELEtBQUssVUFBVSxJQUFJO0lBQ2pCLE1BQU0sTUFBTSxHQUFHLE1BQU0sc0JBQVcsQ0FBQyxZQUFZLENBQUMseUJBQWEsRUFBRSxtQkFBYSxDQUFDLENBQUM7SUFDNUUsT0F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