"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/types/token.ts
var token_exports = {};
__export(token_exports, {
  SupportedToken: () => SupportedToken,
  TOKEN_ADDRESSES: () => TOKEN_ADDRESSES,
  TOKEN_DECIMALS: () => TOKEN_DECIMALS,
  TokenUtils: () => TokenUtils
});
module.exports = __toCommonJS(token_exports);
var SupportedToken = /* @__PURE__ */ ((SupportedToken2) => {
  SupportedToken2["USDT"] = "USDT";
  return SupportedToken2;
})(SupportedToken || {});
var TOKEN_ADDRESSES = {
  // [SupportedToken.USDC]: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyB7u6T',
  ["USDT" /* USDT */]: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
};
var TOKEN_DECIMALS = {
  // [SupportedToken.USDC]: 6, // USDC has 6 decimal places
  ["USDT" /* USDT */]: 6
  // USDT has 6 decimal places
};
var TokenUtils = class {
  /**
   * Get the SPL token address from a token enum
   */
  static getTokenAddress(token) {
    return TOKEN_ADDRESSES[token];
  }
  /**
   * Get token enum from SPL address
   */
  static getTokenFromAddress(address) {
    for (const [token, addr] of Object.entries(TOKEN_ADDRESSES)) {
      if (addr === address) {
        return token;
      }
    }
    return null;
  }
  /**
   * Get the number of decimal places for a given token
   */
  static getTokenDecimals(token) {
    return TOKEN_DECIMALS[token] || 6;
  }
  /**
   * Check if a token is supported
   */
  static isTokenSupported(token) {
    return Object.values(SupportedToken).includes(token);
  }
  /**
   * Get the default token (USDT)
   */
  static getDefaultToken() {
    return "USDT" /* USDT */;
  }
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  SupportedToken,
  TOKEN_ADDRESSES,
  TOKEN_DECIMALS,
  TokenUtils
});
