@joai/warps-adapter-evm 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1936,10 +1936,7 @@ var WarpEvmExplorer = class {
1936
1936
  import {
1937
1937
  getProviderConfig as getProviderConfig4
1938
1938
  } from "@joai/warps";
1939
- import { toClientEvmSigner } from "@x402/evm";
1940
- import { registerExactEvmScheme } from "@x402/evm/exact/client";
1941
1939
  import { ethers as ethers7 } from "ethers";
1942
- import { createPublicClient, http } from "viem";
1943
1940
  import { privateKeyToAccount } from "viem/accounts";
1944
1941
  var WarpEvmWallet = class {
1945
1942
  constructor(config, chain) {
@@ -2046,26 +2043,14 @@ var WarpEvmWallet = class {
2046
2043
  getPublicKey() {
2047
2044
  return this.cachedPublicKey;
2048
2045
  }
2049
- async registerX402Handlers(client) {
2046
+ async getMppAccount() {
2050
2047
  if (!this.walletProvider) throw new Error("No wallet provider available");
2051
2048
  const provider = this.walletProvider;
2052
2049
  const getInstance = provider.getWalletInstance;
2053
- if (typeof getInstance !== "function") throw new Error("Wallet provider does not have getWalletInstance method");
2050
+ if (typeof getInstance !== "function") throw new Error("Wallet provider does not support getMppAccount");
2054
2051
  const wallet = getInstance();
2055
- if (!wallet || !wallet.privateKey) throw new Error("Wallet instance does not have private key");
2056
- const signer = toClientEvmSigner(
2057
- privateKeyToAccount(wallet.privateKey),
2058
- createPublicClient({
2059
- transport: http(getProviderConfig4(this.config, this.chain.name, this.config.env, this.chain.defaultApiUrl).url)
2060
- })
2061
- );
2062
- const handlers = {};
2063
- for (const chainId of SupportedEvmChainIds) {
2064
- handlers[`eip155:${chainId}`] = () => {
2065
- registerExactEvmScheme(client, { signer });
2066
- };
2067
- }
2068
- return handlers;
2052
+ if (!wallet?.privateKey) throw new Error("Wallet instance does not have a private key");
2053
+ return privateKeyToAccount(wallet.privateKey);
2069
2054
  }
2070
2055
  createProvider() {
2071
2056
  const wallet = this.config.user?.wallets?.[this.chain.name];