"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("../interfaces/types-lookup");
require("../interfaces/augment-api");
require("../interfaces/augment-types");
const util_1 = require("../util");
exports.default = (api) => ({
    batch: api.tx.utility?.batch,
    sudo: api.tx.sudo?.sudo,
    fromSubaccount: api.tx.subaccounts.transferFromSubaccount,
    toSubaccount: api.tx.subaccounts.transferToSubaccount,
    dexCreateOrder: api.tx.eqDex?.createOrder,
    // Balance
    transfer: (asset, to, value) => api.tx.eqBalances.transfer((0, util_1.u64FromCurrency)(asset), to, value),
    // Balance Sudo
    deposit: (...args) => api.tx.sudo.sudo(api.tx.eqBalances.deposit(...args)),
    withdraw: (...args) => api.tx.sudo.sudo(api.tx.eqBalances.burn(...args)),
    // Bridge
    withdrawExternal: api.tx.eqBridge.transferNative,
    // Claim
    // @ts-ignore
    claim: api.tx.claims?.claim,
    // @ts-ignore
    claimAttest: api.tx.claims?.claimAttest,
    // Claim Sudo
    // @ts-ignore
    mintClaim: (...args) => 
    // @ts-ignore
    api.tx.sudo.sudo(api.tx.claims?.mintClaim(...args)),
    // Curve
    curveExchange: api.tx.curveAmm?.exchange,
    curveAdd: api.tx.curveAmm?.addLiquidity,
    curveRemove: api.tx.curveAmm?.removeLiquidity,
    curveRemoveImbalance: api.tx.curveAmm?.removeLiquidityImbalance,
    curveRemoveOne: api.tx.curveAmm?.removeLiquidityOneCoin,
    // Lockgrop
    // @ts-ignore
    lockdrop: api.tx.eqLockdrop?.lock,
    unlockExternal: api.tx.eqLockdrop?.unlockExternal,
    // Subaccounts
    transferFrom: (subaccType, asset, amount) => api.tx.subaccounts.transferFromSubaccount(subaccType, (0, util_1.u64FromCurrency)(asset), amount),
    transferTo: (subaccType, asset, value) => api.tx.subaccounts.transferToSubaccount(subaccType, (0, util_1.u64FromCurrency)(asset), value),
    // Vesting
    vest: api.tx.vesting.vest,
    vestTo: api.tx.vesting.vestOther,
    vesting: api.tx.vesting,
    vesting2: api.tx.vesting2,
    // Whitelist Sudo
    whitelist: (...args) => api.tx.sudo.sudo(api.tx.whitelists.addToWhitelist(...args)),
    // Oracle
    setPrice: api.tx.oracle?.setPrice,
});
