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MAAM,mCAAmC,EAAM,UAAU,MAAM,SAAW,EAAM,UAC5F,CACF,CACA,6BAAM,CAAwB,GAC5B,IACE,MAAM,EAAU,CACd,OAAQ,+BAA+B,kCAAkC,wBACzE,SACA,YAAa,KAAK,OAEd,QAAiB,KAAK,OAAO,WAAW,GAE9C,OADe,EAAS,KAAK,MAE/B,CAAE,MAAO,GAEP,MADA,QAAQ,MAAM,uCAAwC,EAAM,UAAU,MAAQ,EAAM,SAC9E,IAAI,MAAM,wCAAwC,EAAM,UAAU,MAAM,SAAW,EAAM,UACjG,CACF,CAIA,sBAAM,CAAiB,GACrB,IACE,MAAM,EAAU,CACd,OAAQ,mBACR,OAAQ,CACN,eAAgB,EAAO,eACvB,IAAK,EAAO,IACZ,gBAAiB,EAAO,iBAE1B,YAAa,KAAK,OAEd,QAAiB,KAAK,OAAO,WAAW,GAE9C,OADe,EAAS,KAAK,MAE/B,CAAE,MAAO,GAEP,MADA,QAAQ,MAAM,iCAAkC,EAAM,UAAU,MAAQ,EAAM,SACxE,IAAI,MAAM,kCAAkC,EAAM,UAAU,MAAM,SAAW,EAAM,UAC3F,CACF,CAIA,kBAAM,CAAa,EAAQ,GACzB,MAAM,EAAqC,iBAAhB,EAAO,KAAoB,EAAO,UAAuB,IAAhB,EAAO,KAAkB,GAAK,KAAK,UAAU,EAAO,MAClH,EAAW,cAAc,OAAO,KAAK,EAAa,QAClD,QAAc,EAAQ,MAAM,CAChC,KAAM,IAIR,OAFA,EAAO,QAAU,EAAO,SAAW,CAAC,EACpC,EAAO,QAAQ,mBAAqB,EAC7B,CACT,GAIE,cAAgB,QAAQ,mBACxB,kBAAoB,QAAQ,sBAC5B,+BAAiC,QAAQ","file":"/npm/@phantom/client@0.1.11/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@phantom/client@0.1.11/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n  mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n  AddressType: () => import_openapi_wallet_service3.DerivationInfoAddressFormatEnum,\n  DerivationPath: () => DerivationPath,\n  NetworkId: () => import_constants4.NetworkId,\n  PhantomClient: () => PhantomClient,\n  deriveSubmissionConfig: () => deriveSubmissionConfig,\n  generateKeyPair: () => import_crypto.generateKeyPair,\n  getDerivationPathForNetwork: () => getDerivationPathForNetwork,\n  getNetworkConfig: () => getNetworkConfig,\n  getNetworkDescription: () => getNetworkDescription,\n  getNetworkIdsByChain: () => getNetworkIdsByChain,\n  getSupportedNetworkIds: () => getSupportedNetworkIds,\n  supportsTransactionSubmission: () => supportsTransactionSubmission\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/PhantomClient.ts\nvar import_axios = __toESM(require(\"axios\"));\nvar import_buffer = require(\"buffer\");\nvar import_openapi_wallet_service2 = require(\"@phantom/openapi-wallet-service\");\n\n// src/constants.ts\nvar import_openapi_wallet_service = require(\"@phantom/openapi-wallet-service\");\nvar DerivationPath = {\n  // Solana - BIP44 standard for Solana (coin type 501)\n  Solana: (accountIndex = 0) => `m/44'/501'/${accountIndex}'/0'`,\n  // Ethereum - BIP44 standard for Ethereum and all EVM-compatible chains (coin type 60)\n  Ethereum: (accountIndex = 0) => `m/44'/60'/0'/0/${accountIndex}`,\n  // Bitcoin - BIP84 standard for Bitcoin (coin type 0)\n  Bitcoin: (accountIndex = 0) => `m/84'/0'/${accountIndex}'/0`,\n  // Sui - BIP44 standard for Sui (coin type 784)\n  Sui: (accountIndex = 0) => `m/44'/784'/${accountIndex}'/0'/0'`\n};\nfunction getDerivationPathForNetwork(networkId, accountIndex = 0) {\n  const network = networkId.split(\":\")[0].toLowerCase();\n  switch (network) {\n    case \"solana\":\n      return DerivationPath.Solana(accountIndex);\n    case \"sui\":\n      return DerivationPath.Sui(accountIndex);\n    case \"bitcoin\":\n    case \"btc\":\n      return DerivationPath.Bitcoin(accountIndex);\n    case \"eip155\":\n    case \"ethereum\":\n    case \"eth\":\n    default:\n      return DerivationPath.Ethereum(accountIndex);\n  }\n}\nfunction getNetworkConfig(networkId, accountIndex = 0) {\n  const network = networkId.split(\":\")[0].toLowerCase();\n  switch (network) {\n    case \"solana\":\n      return {\n        derivationPath: DerivationPath.Solana(accountIndex),\n        curve: import_openapi_wallet_service.DerivationInfoCurveEnum.ed25519,\n        algorithm: import_openapi_wallet_service.Algorithm.ed25519,\n        addressFormat: import_openapi_wallet_service.DerivationInfoAddressFormatEnum.solana\n      };\n    case \"sui\":\n      return {\n        derivationPath: DerivationPath.Sui(accountIndex),\n        curve: import_openapi_wallet_service.DerivationInfoCurveEnum.ed25519,\n        algorithm: import_openapi_wallet_service.Algorithm.ed25519,\n        addressFormat: import_openapi_wallet_service.DerivationInfoAddressFormatEnum.sui\n      };\n    case \"bitcoin\":\n    case \"btc\":\n      return {\n        derivationPath: DerivationPath.Bitcoin(accountIndex),\n        curve: import_openapi_wallet_service.DerivationInfoCurveEnum.secp256k1,\n        algorithm: import_openapi_wallet_service.Algorithm.secp256k1,\n        addressFormat: import_openapi_wallet_service.DerivationInfoAddressFormatEnum.bitcoinSegwit\n        // Bitcoin uses a different format, but for SDK consistency we use Ethereum format\n      };\n    case \"eip155\":\n      return {\n        derivationPath: DerivationPath.Ethereum(accountIndex),\n        curve: import_openapi_wallet_service.DerivationInfoCurveEnum.secp256k1,\n        algorithm: import_openapi_wallet_service.Algorithm.secp256k1,\n        addressFormat: import_openapi_wallet_service.DerivationInfoAddressFormatEnum.ethereum\n        // EVM chains use Ethereum address format\n      };\n    default:\n      return null;\n  }\n}\n\n// src/caip2-mappings.ts\nvar import_constants = require(\"@phantom/constants\");\nvar CAIP2_NETWORK_MAPPINGS = {\n  // Solana networks\n  [import_constants.NetworkId.SOLANA_MAINNET]: {\n    chain: \"solana\",\n    network: \"mainnet\",\n    description: \"Solana Mainnet-Beta\"\n  },\n  [import_constants.NetworkId.SOLANA_DEVNET]: {\n    chain: \"solana\",\n    network: \"devnet\",\n    description: \"Solana Devnet\"\n  },\n  [import_constants.NetworkId.SOLANA_TESTNET]: {\n    chain: \"solana\",\n    network: \"testnet\",\n    description: \"Solana Testnet\"\n  },\n  // Ethereum/EVM networks\n  [import_constants.NetworkId.ETHEREUM_MAINNET]: {\n    chain: \"ethereum\",\n    network: \"mainnet\",\n    description: \"Ethereum Mainnet\"\n  },\n  [import_constants.NetworkId.ETHEREUM_GOERLI]: {\n    chain: \"ethereum\",\n    network: \"goerli\",\n    description: \"Goerli Testnet\"\n  },\n  [import_constants.NetworkId.ETHEREUM_SEPOLIA]: {\n    chain: \"ethereum\",\n    network: \"sepolia\",\n    description: \"Sepolia Testnet\"\n  },\n  [import_constants.NetworkId.POLYGON_MAINNET]: {\n    chain: \"polygon\",\n    network: \"mainnet\",\n    description: \"Polygon Mainnet\"\n  },\n  [import_constants.NetworkId.POLYGON_MUMBAI]: {\n    chain: \"polygon\",\n    network: \"mumbai\",\n    description: \"Polygon Mumbai Testnet\"\n  },\n  [import_constants.NetworkId.OPTIMISM_MAINNET]: {\n    chain: \"optimism\",\n    network: \"mainnet\",\n    description: \"Optimism Mainnet\"\n  },\n  [import_constants.NetworkId.OPTIMISM_GOERLI]: {\n    chain: \"optimism\",\n    network: \"goerli\",\n    description: \"Optimism Goerli Testnet\"\n  },\n  [import_constants.NetworkId.ARBITRUM_ONE]: {\n    chain: \"arbitrum\",\n    network: \"mainnet\",\n    description: \"Arbitrum One\"\n  },\n  [import_constants.NetworkId.ARBITRUM_GOERLI]: {\n    chain: \"arbitrum\",\n    network: \"goerli\",\n    description: \"Arbitrum Goerli\"\n  },\n  [import_constants.NetworkId.BASE_MAINNET]: {\n    chain: \"base\",\n    network: \"mainnet\",\n    description: \"Base Mainnet\"\n  },\n  [import_constants.NetworkId.BASE_GOERLI]: {\n    chain: \"base\",\n    network: \"goerli\",\n    description: \"Base Goerli Testnet\"\n  },\n  [import_constants.NetworkId.BASE_SEPOLIA]: {\n    chain: \"base\",\n    network: \"sepolia\",\n    description: \"Base Sepolia Testnet\"\n  },\n  // Bitcoin networks (for future support)\n  [import_constants.NetworkId.BITCOIN_MAINNET]: {\n    chain: \"bitcoin\",\n    network: \"mainnet\",\n    description: \"Bitcoin Mainnet\"\n  },\n  [import_constants.NetworkId.BITCOIN_TESTNET]: {\n    chain: \"bitcoin\",\n    network: \"testnet\",\n    description: \"Bitcoin Testnet\"\n  },\n  // Sui networks (for future support)\n  [import_constants.NetworkId.SUI_MAINNET]: {\n    chain: \"sui\",\n    network: \"mainnet\",\n    description: \"Sui Mainnet\"\n  },\n  [import_constants.NetworkId.SUI_TESTNET]: {\n    chain: \"sui\",\n    network: \"testnet\",\n    description: \"Sui Testnet\"\n  }\n};\nfunction deriveSubmissionConfig(networkId) {\n  const mapping = CAIP2_NETWORK_MAPPINGS[networkId];\n  if (!mapping) {\n    return void 0;\n  }\n  return {\n    chain: mapping.chain,\n    network: mapping.network\n  };\n}\nfunction supportsTransactionSubmission(networkId) {\n  return networkId in CAIP2_NETWORK_MAPPINGS;\n}\nfunction getNetworkDescription(networkId) {\n  return CAIP2_NETWORK_MAPPINGS[networkId]?.description;\n}\nfunction getSupportedNetworkIds() {\n  return Object.keys(CAIP2_NETWORK_MAPPINGS);\n}\nfunction getNetworkIdsByChain(chain) {\n  return Object.entries(CAIP2_NETWORK_MAPPINGS).filter(([_, mapping]) => mapping.chain.toLowerCase() === chain.toLowerCase()).map(([networkId]) => networkId);\n}\n\n// src/PhantomClient.ts\nvar PhantomClient = class {\n  constructor(config, stamper) {\n    this.config = config;\n    if (!config.apiBaseUrl) {\n      throw new Error(\"apiBaseUrl is required\");\n    }\n    this.axiosInstance = import_axios.default.create();\n    if (stamper) {\n      this.axiosInstance.interceptors.request.use(async (config2) => {\n        return await this.stampRequest(config2, stamper);\n      });\n      this.stamper = stamper;\n    }\n    const configuration = new import_openapi_wallet_service2.Configuration({\n      basePath: config.apiBaseUrl\n    });\n    this.kmsApi = new import_openapi_wallet_service2.KMSRPCApi(configuration, config.apiBaseUrl, this.axiosInstance);\n  }\n  setOrganizationId(organizationId) {\n    if (!organizationId) {\n      throw new Error(\"organizationId is required\");\n    }\n    this.config.organizationId = organizationId;\n  }\n  async createWallet(walletName) {\n    try {\n      if (!this.config.organizationId) {\n        throw new Error(\"organizationId is required to create a wallet\");\n      }\n      const walletRequest = {\n        organizationId: this.config.organizationId,\n        walletName: walletName || `Wallet ${Date.now()}`,\n        accounts: [DerivationPath.Solana(), DerivationPath.Ethereum(), DerivationPath.Bitcoin(), DerivationPath.Sui()]\n      };\n      const request = {\n        method: import_openapi_wallet_service2.CreateWalletMethodEnum.createWallet,\n        params: walletRequest,\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const walletResult = response.data.result;\n      const requestAccounts = {\n        method: import_openapi_wallet_service2.GetAccountsMethodEnum.getAccounts,\n        params: {\n          accounts: [DerivationPath.Solana(), DerivationPath.Ethereum(), DerivationPath.Bitcoin(), DerivationPath.Sui()],\n          organizationId: this.config.organizationId,\n          walletId: walletResult.walletId\n        },\n        timestampMs: Date.now()\n      };\n      const accountsResponse = await this.kmsApi.postKmsRpc(requestAccounts);\n      const accountsResult = accountsResponse.data.result;\n      return {\n        walletId: walletResult.walletId,\n        addresses: accountsResult.map((account) => ({\n          addressType: account.addressFormat,\n          address: account.address\n        }))\n      };\n    } catch (error) {\n      console.error(\"Failed to create wallet:\", error.response?.data || error.message);\n      throw new Error(`Failed to create wallet: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  /**\n   * Sign and send a transaction\n   */\n  async signAndSendTransaction(params) {\n    const walletId = params.walletId;\n    const transactionParam = params.transaction;\n    const networkIdParam = params.networkId;\n    const derivationIndex = params.derivationIndex ?? 0;\n    try {\n      if (!this.config.organizationId) {\n        throw new Error(\"organizationId is required to sign and send a transaction\");\n      }\n      const encodedTransaction = transactionParam;\n      const submissionConfig = deriveSubmissionConfig(networkIdParam);\n      if (!submissionConfig) {\n        console.error(\n          `No submission config available for network ${networkIdParam}. Transaction will be signed but not submitted.`\n        );\n      }\n      const networkConfig = getNetworkConfig(networkIdParam, derivationIndex);\n      if (!networkConfig) {\n        throw new Error(`Unsupported network ID: ${networkIdParam}`);\n      }\n      const derivationInfo = {\n        derivationPath: networkConfig.derivationPath,\n        curve: networkConfig.curve,\n        addressFormat: networkConfig.addressFormat\n      };\n      const signRequest = {\n        organizationId: this.config.organizationId,\n        walletId,\n        transaction: encodedTransaction,\n        derivationInfo\n      };\n      if (submissionConfig) {\n        signRequest.submissionConfig = submissionConfig;\n      }\n      const request = {\n        method: import_openapi_wallet_service2.SignTransactionMethodEnum.signTransaction,\n        params: signRequest,\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const result = response.data.result;\n      const rpcSubmissionResult = response.data[\"rpc_submission_result\"];\n      const hash = rpcSubmissionResult ? rpcSubmissionResult.result : null;\n      return {\n        rawTransaction: result.transaction,\n        // Base64 encoded signed transaction\n        hash\n      };\n    } catch (error) {\n      console.error(\"Failed to sign and send transaction:\", error.response?.data || error.message);\n      throw new Error(`Failed to sign and send transaction: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  async getWalletAddresses(walletId, derivationPaths, derivationIndex) {\n    try {\n      const accountIndex = derivationIndex ?? 0;\n      const paths = derivationPaths || [\n        DerivationPath.Solana(accountIndex),\n        DerivationPath.Ethereum(accountIndex),\n        DerivationPath.Bitcoin(accountIndex),\n        DerivationPath.Sui(accountIndex)\n      ];\n      const requestAccounts = {\n        method: import_openapi_wallet_service2.GetAccountsMethodEnum.getAccounts,\n        params: {\n          accounts: paths,\n          organizationId: this.config.organizationId,\n          walletId\n        },\n        timestampMs: Date.now()\n      };\n      const accountsResponse = await this.kmsApi.postKmsRpc(requestAccounts);\n      const accountsResult = accountsResponse.data.result;\n      return accountsResult.map((account) => ({\n        addressType: account.addressFormat,\n        address: account.address\n      }));\n    } catch (error) {\n      console.error(\"Failed to get wallet addresses:\", error.response?.data || error.message);\n      throw new Error(`Failed to get wallet addresses: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  /**\n   * Sign a message\n   */\n  async signMessage(params) {\n    const walletId = params.walletId;\n    const messageParam = params.message;\n    const networkIdParam = params.networkId;\n    const derivationIndex = params.derivationIndex ?? 0;\n    try {\n      if (!this.config.organizationId) {\n        throw new Error(\"organizationId is required to sign a message\");\n      }\n      const networkConfig = getNetworkConfig(networkIdParam, derivationIndex);\n      if (!networkConfig) {\n        throw new Error(`Unsupported network ID: ${networkIdParam}`);\n      }\n      const derivationInfo = {\n        derivationPath: networkConfig.derivationPath,\n        curve: networkConfig.curve,\n        addressFormat: networkConfig.addressFormat\n      };\n      const base64StringMessage = messageParam;\n      const signRequest = {\n        organizationId: this.config.organizationId,\n        walletId,\n        payload: base64StringMessage,\n        algorithm: networkConfig.algorithm,\n        derivationInfo\n      };\n      const request = {\n        method: import_openapi_wallet_service2.SignRawPayloadMethodEnum.signRawPayload,\n        params: signRequest,\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const result = response.data.result;\n      return result.signature;\n    } catch (error) {\n      console.error(\"Failed to sign message:\", error.response?.data || error.message);\n      throw new Error(`Failed to sign message: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  async getWallets(limit, offset) {\n    try {\n      const request = {\n        method: \"getOrganizationWallets\",\n        params: {\n          organizationId: this.config.organizationId,\n          limit: limit || 20,\n          offset: offset || 0\n        },\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const result = response.data.result;\n      return {\n        wallets: result.wallets.map((wallet) => ({\n          walletId: wallet.walletId,\n          walletName: wallet.walletName\n        })),\n        totalCount: result.totalCount,\n        limit: result.limit,\n        offset: result.offset\n      };\n    } catch (error) {\n      console.error(\"Failed to get wallets:\", error.response?.data || error.message);\n      throw new Error(`Failed to get wallets: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  /**\n   * Get organization details by organization ID\n   */\n  async getOrganization(organizationId) {\n    try {\n      const request = {\n        method: \"getOrganization\",\n        params: {\n          organizationId\n        },\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const result = response.data.result;\n      return result;\n    } catch (error) {\n      console.error(\"Failed to get organization:\", error.response?.data || error.message);\n      throw new Error(`Failed to get organization: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  async getOrCreateOrganization(tag, publicKey) {\n    try {\n      return await this.createOrganization(tag, [\n        {\n          username: `user-${Date.now()}`,\n          role: import_openapi_wallet_service2.KmsUserRole.admin,\n          authenticators: [\n            {\n              authenticatorName: `auth-${Date.now()}`,\n              authenticatorKind: \"keypair\",\n              publicKey,\n              algorithm: \"Ed25519\"\n            }\n          ]\n        }\n      ]);\n    } catch (error) {\n      console.error(\"Failed to get or create organization:\", error.response?.data || error.message);\n      throw new Error(`Failed to get or create organization: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  /**\n   * Create a new organization with the specified name and users\n   * @param name Organization name\n   * @param users Array of users with their authenticators\n   */\n  async createOrganization(name, users, tags) {\n    try {\n      if (!name) {\n        throw new Error(\"Organization name is required\");\n      }\n      if (!users || users.length === 0) {\n        throw new Error(\"At least one user is required\");\n      }\n      const params = {\n        organizationName: name,\n        users: users.map((userConfig) => ({\n          role: userConfig.role === \"ADMIN\" ? import_openapi_wallet_service2.KmsUserRole.admin : import_openapi_wallet_service2.KmsUserRole.user,\n          username: userConfig.username || `user-${Date.now()}`,\n          authenticators: userConfig.authenticators\n        })),\n        tags\n      };\n      const request = {\n        method: import_openapi_wallet_service2.CreateOrganizationMethodEnum.createOrganization,\n        params,\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const result = response.data.result;\n      return result;\n    } catch (error) {\n      console.error(\"Failed to create organization:\", error.response?.data || error.message);\n      throw new Error(`Failed to create organization: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  /**\n   * Create an authenticator for a user in an organization\n   */\n  async createAuthenticator(params) {\n    try {\n      const requestParams = {\n        organizationId: params.organizationId,\n        username: params.username,\n        authenticatorName: params.authenticatorName,\n        authenticator: params.authenticator,\n        replaceExpirable: params.replaceExpirable\n      };\n      const request = {\n        method: import_openapi_wallet_service2.CreateAuthenticatorMethodEnum.createAuthenticator,\n        params: requestParams,\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const result = response.data.result;\n      return result;\n    } catch (error) {\n      console.error(\"Failed to create authenticator:\", error.response?.data || error.message);\n      throw new Error(`Failed to create authenticator: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  /**\n   * Delete an authenticator for a user in an organization\n   */\n  async deleteAuthenticator(params) {\n    try {\n      const requestParams = {\n        organizationId: params.organizationId,\n        username: params.username,\n        authenticatorId: params.authenticatorId\n      };\n      const request = {\n        method: import_openapi_wallet_service2.DeleteAuthenticatorMethodEnum.deleteAuthenticator,\n        params: requestParams,\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const result = response.data.result;\n      return result;\n    } catch (error) {\n      console.error(\"Failed to delete authenticator:\", error.response?.data || error.message);\n      throw new Error(`Failed to delete authenticator: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  async grantOrganizationAccess(params) {\n    try {\n      const request = {\n        method: import_openapi_wallet_service2.GrantOrganizationAccessMethodEnum.grantOrganizationAccess,\n        params,\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const result = response.data.result;\n      return result;\n    } catch (error) {\n      console.error(\"Failed to grant organization access:\", error.response?.data || error.message);\n      throw new Error(`Failed to grant organization access: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  /**\n   * Get a wallet by tag from the specified organization\n   */\n  async getWalletWithTag(params) {\n    try {\n      const request = {\n        method: \"getWalletWithTag\",\n        params: {\n          organizationId: params.organizationId,\n          tag: params.tag,\n          derivationPaths: params.derivationPaths\n        },\n        timestampMs: Date.now()\n      };\n      const response = await this.kmsApi.postKmsRpc(request);\n      const result = response.data.result;\n      return result;\n    } catch (error) {\n      console.error(\"Failed to get wallet with tag:\", error.response?.data || error.message);\n      throw new Error(`Failed to get wallet with tag: ${error.response?.data?.message || error.message}`);\n    }\n  }\n  /**\n   * Stamp an axios request with the provided stamper\n   */\n  async stampRequest(config, stamper) {\n    const requestBody = typeof config.data === \"string\" ? config.data : config.data === void 0 ? \"\" : JSON.stringify(config.data);\n    const dataUtf8 = import_buffer.Buffer.from(requestBody, \"utf8\");\n    const stamp = await stamper.stamp({\n      data: dataUtf8\n    });\n    config.headers = config.headers || {};\n    config.headers[\"X-Phantom-Stamp\"] = stamp;\n    return config;\n  }\n};\n\n// src/index.ts\nvar import_crypto = require(\"@phantom/crypto\");\nvar import_constants4 = require(\"@phantom/constants\");\nvar import_openapi_wallet_service3 = require(\"@phantom/openapi-wallet-service\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  AddressType,\n  DerivationPath,\n  NetworkId,\n  PhantomClient,\n  deriveSubmissionConfig,\n  generateKeyPair,\n  getDerivationPathForNetwork,\n  getNetworkConfig,\n  getNetworkDescription,\n  getNetworkIdsByChain,\n  getSupportedNetworkIds,\n  supportsTransactionSubmission\n});\n"]}