"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.chainType = void 0;
const definitions_1 = require("@equilab/definitions");
exports.chainType = "Eq";
exports.default = (specName = "Equilibrium") => {
    const typesBundle = {
        spec: {
            [specName]: { instances: definitions_1.equilibrium.instances },
        },
    };
    return {
        typesBundle,
        rpc: {
            equilibriumCurveAmm: {
                getDy: {
                    description: "Calculates the exchange outcome `dy` for a given `i`, `j` and `dx` values",
                    params: [
                        {
                            name: "pool_id",
                            type: "PoolId",
                        },
                        {
                            name: "i",
                            type: "PoolTokenIndex",
                        },
                        {
                            name: "j",
                            type: "PoolTokenIndex",
                        },
                        {
                            name: "dx",
                            type: "Balance",
                        },
                    ],
                    type: "Balance",
                },
                getWithdrawOneCoin: {
                    description: "Calculates the amount received when withdrawing a single coin",
                    params: [
                        {
                            name: "pool_id",
                            type: "PoolId",
                        },
                        {
                            name: "token_amount",
                            type: "Balance",
                        },
                        {
                            name: "i",
                            type: "PoolTokenIndex",
                        },
                    ],
                    type: "Balance",
                },
            },
        },
        types: definitions_1.equilibrium.types,
    };
};
