@vleap/warps-adapter-evm 0.2.0-beta.54 → 0.2.0-beta.56

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.js CHANGED
@@ -26,9 +26,11 @@ __export(index_exports, {
26
26
  EvmExplorers: () => EvmExplorers,
27
27
  ExplorerUrls: () => ExplorerUrls,
28
28
  KnownTokens: () => KnownTokens,
29
+ MnemonicWalletProvider: () => MnemonicWalletProvider,
29
30
  NativeTokenArb: () => NativeTokenArb,
30
31
  NativeTokenBase: () => NativeTokenBase,
31
32
  NativeTokenEth: () => NativeTokenEth,
33
+ PrivateKeyWalletProvider: () => PrivateKeyWalletProvider,
32
34
  UniswapService: () => UniswapService,
33
35
  WarpEvmConstants: () => WarpEvmConstants,
34
36
  WarpEvmDataLoader: () => WarpEvmDataLoader,
@@ -49,11 +51,11 @@ __export(index_exports, {
49
51
  module.exports = __toCommonJS(index_exports);
50
52
 
51
53
  // src/chains/arbitrum.ts
52
- var import_warps13 = require("@vleap/warps");
54
+ var import_warps15 = require("@vleap/warps");
53
55
 
54
56
  // src/WarpEvmDataLoader.ts
55
- var import_warps8 = require("@vleap/warps");
56
- var import_ethers = require("ethers");
57
+ var import_warps10 = require("@vleap/warps");
58
+ var import_ethers3 = require("ethers");
57
59
 
58
60
  // src/providers/UniswapService.ts
59
61
  var import_warps = require("@vleap/warps");
@@ -141,9 +143,129 @@ var _UniswapService = class _UniswapService {
141
143
  _UniswapService.UNISWAP_TOKEN_LIST_URL = "https://tokens.uniswap.org";
142
144
  var UniswapService = _UniswapService;
143
145
 
144
- // src/tokens/arbitrum.ts
146
+ // src/providers/PrivateKeyWalletProvider.ts
147
+ var import_ethers = require("ethers");
145
148
  var import_warps2 = require("@vleap/warps");
146
- var ArbitrumChain = import_warps2.WarpChainName.Arbitrum;
149
+ var PrivateKeyWalletProvider = class {
150
+ constructor(config, chain, rpcProvider) {
151
+ this.config = config;
152
+ this.chain = chain;
153
+ this.rpcProvider = rpcProvider;
154
+ this.wallet = null;
155
+ }
156
+ async getAddress() {
157
+ try {
158
+ const wallet = this.getWallet();
159
+ return wallet.address;
160
+ } catch {
161
+ return null;
162
+ }
163
+ }
164
+ async getPublicKey() {
165
+ try {
166
+ const wallet = this.getWallet();
167
+ const publicKey = wallet.signingKey.publicKey;
168
+ return publicKey.startsWith("0x") ? publicKey.slice(2) : publicKey;
169
+ } catch {
170
+ return null;
171
+ }
172
+ }
173
+ async signTransaction(tx) {
174
+ const wallet = this.getWallet();
175
+ const txRequest = {
176
+ to: tx.to,
177
+ data: tx.data,
178
+ value: tx.value || 0,
179
+ gasLimit: tx.gasLimit,
180
+ maxFeePerGas: tx.maxFeePerGas,
181
+ maxPriorityFeePerGas: tx.maxPriorityFeePerGas,
182
+ nonce: tx.nonce,
183
+ chainId: tx.chainId
184
+ };
185
+ const signedTx = await wallet.signTransaction(txRequest);
186
+ return { ...tx, signature: signedTx };
187
+ }
188
+ async signMessage(message) {
189
+ const wallet = this.getWallet();
190
+ return await wallet.signMessage(message);
191
+ }
192
+ getWalletInstance() {
193
+ return this.getWallet();
194
+ }
195
+ getWallet() {
196
+ if (this.wallet) return this.wallet;
197
+ const privateKey = (0, import_warps2.getWarpWalletPrivateKeyFromConfig)(this.config, this.chain.name);
198
+ if (!privateKey) {
199
+ throw new Error("No private key provided");
200
+ }
201
+ this.wallet = new import_ethers.ethers.Wallet(privateKey);
202
+ return this.wallet;
203
+ }
204
+ };
205
+
206
+ // src/providers/MnemonicWalletProvider.ts
207
+ var import_ethers2 = require("ethers");
208
+ var import_warps3 = require("@vleap/warps");
209
+ var MnemonicWalletProvider = class {
210
+ constructor(config, chain, rpcProvider) {
211
+ this.config = config;
212
+ this.chain = chain;
213
+ this.rpcProvider = rpcProvider;
214
+ this.wallet = null;
215
+ }
216
+ async getAddress() {
217
+ try {
218
+ const wallet = this.getWallet();
219
+ return wallet.address;
220
+ } catch {
221
+ return null;
222
+ }
223
+ }
224
+ async getPublicKey() {
225
+ try {
226
+ const wallet = this.getWallet();
227
+ const publicKey = wallet.signingKey.publicKey;
228
+ return publicKey.startsWith("0x") ? publicKey.slice(2) : publicKey;
229
+ } catch {
230
+ return null;
231
+ }
232
+ }
233
+ async signTransaction(tx) {
234
+ const wallet = this.getWallet();
235
+ const txRequest = {
236
+ to: tx.to,
237
+ data: tx.data,
238
+ value: tx.value || 0,
239
+ gasLimit: tx.gasLimit,
240
+ maxFeePerGas: tx.maxFeePerGas,
241
+ maxPriorityFeePerGas: tx.maxPriorityFeePerGas,
242
+ nonce: tx.nonce,
243
+ chainId: tx.chainId
244
+ };
245
+ const signedTx = await wallet.signTransaction(txRequest);
246
+ return { ...tx, signature: signedTx };
247
+ }
248
+ async signMessage(message) {
249
+ const wallet = this.getWallet();
250
+ return await wallet.signMessage(message);
251
+ }
252
+ getWalletInstance() {
253
+ return this.getWallet();
254
+ }
255
+ getWallet() {
256
+ if (this.wallet) return this.wallet;
257
+ const mnemonic = (0, import_warps3.getWarpWalletMnemonicFromConfig)(this.config, this.chain.name);
258
+ if (!mnemonic) {
259
+ throw new Error("No mnemonic provided");
260
+ }
261
+ this.wallet = import_ethers2.ethers.Wallet.fromPhrase(mnemonic);
262
+ return this.wallet;
263
+ }
264
+ };
265
+
266
+ // src/tokens/arbitrum.ts
267
+ var import_warps4 = require("@vleap/warps");
268
+ var ArbitrumChain = import_warps4.WarpChainName.Arbitrum;
147
269
  var ArbitrumTokens = [
148
270
  {
149
271
  chain: ArbitrumChain,
@@ -180,8 +302,8 @@ var ArbitrumTokens = [
180
302
  ];
181
303
 
182
304
  // src/tokens/arbitrum-sepolia.ts
183
- var import_warps3 = require("@vleap/warps");
184
- var ArbitrumChain2 = import_warps3.WarpChainName.Arbitrum;
305
+ var import_warps5 = require("@vleap/warps");
306
+ var ArbitrumChain2 = import_warps5.WarpChainName.Arbitrum;
185
307
  var ArbitrumSepoliaTokens = [
186
308
  {
187
309
  chain: ArbitrumChain2,
@@ -205,13 +327,13 @@ var ArbitrumSepoliaTokens = [
205
327
  name: "Wrapped SET",
206
328
  symbol: "WSET",
207
329
  decimals: 18,
208
- logoUrl: "https://vleap.ai/images/tokens/set.svg"
330
+ logoUrl: "https://joai.ai/images/tokens/set-black.svg"
209
331
  }
210
332
  ];
211
333
 
212
334
  // src/tokens/base.ts
213
- var import_warps4 = require("@vleap/warps");
214
- var BaseChain = import_warps4.WarpChainName.Base;
335
+ var import_warps6 = require("@vleap/warps");
336
+ var BaseChain = import_warps6.WarpChainName.Base;
215
337
  var BaseTokens = [
216
338
  {
217
339
  chain: BaseChain,
@@ -256,8 +378,8 @@ var BaseTokens = [
256
378
  ];
257
379
 
258
380
  // src/tokens/base-sepolia.ts
259
- var import_warps5 = require("@vleap/warps");
260
- var BaseChain2 = import_warps5.WarpChainName.Base;
381
+ var import_warps7 = require("@vleap/warps");
382
+ var BaseChain2 = import_warps7.WarpChainName.Base;
261
383
  var BaseSepoliaTokens = [
262
384
  {
263
385
  chain: BaseChain2,
@@ -294,8 +416,8 @@ var BaseSepoliaTokens = [
294
416
  ];
295
417
 
296
418
  // src/tokens/ethereum.ts
297
- var import_warps6 = require("@vleap/warps");
298
- var EthereumChain = import_warps6.WarpChainName.Ethereum;
419
+ var import_warps8 = require("@vleap/warps");
420
+ var EthereumChain = import_warps8.WarpChainName.Ethereum;
299
421
  var EthereumTokens = [
300
422
  {
301
423
  chain: EthereumChain,
@@ -348,8 +470,8 @@ var EthereumTokens = [
348
470
  ];
349
471
 
350
472
  // src/tokens/ethereum-sepolia.ts
351
- var import_warps7 = require("@vleap/warps");
352
- var EthereumChain2 = import_warps7.WarpChainName.Ethereum;
473
+ var import_warps9 = require("@vleap/warps");
474
+ var EthereumChain2 = import_warps9.WarpChainName.Ethereum;
353
475
  var EthereumSepoliaTokens = [
354
476
  {
355
477
  chain: EthereumChain2,
@@ -389,7 +511,7 @@ var EthereumSepoliaTokens = [
389
511
  name: "Wrapped SET",
390
512
  symbol: "WSET",
391
513
  decimals: 18,
392
- logoUrl: "https://vleap.ai/images/tokens/set.svg"
514
+ logoUrl: "https://joai.ai/images/tokens/set-black.svg"
393
515
  }
394
516
  ];
395
517
 
@@ -431,10 +553,10 @@ var WarpEvmDataLoader = class {
431
553
  constructor(config, chain) {
432
554
  this.config = config;
433
555
  this.chain = chain;
434
- const providerConfig = (0, import_warps8.getProviderConfig)(this.config, this.chain.name, this.config.env, this.chain.defaultApiUrl);
435
- const network = new import_ethers.ethers.Network(this.chain.name, parseInt(this.chain.chainId));
436
- this.provider = new import_ethers.ethers.JsonRpcProvider(providerConfig.url, network);
437
- this.cache = new import_warps8.WarpCache(config.cache?.type);
556
+ const providerConfig = (0, import_warps10.getProviderConfig)(this.config, this.chain.name, this.config.env, this.chain.defaultApiUrl);
557
+ const network = new import_ethers3.ethers.Network(this.chain.name, parseInt(this.chain.chainId));
558
+ this.provider = new import_ethers3.ethers.JsonRpcProvider(providerConfig.url, network);
559
+ this.cache = new import_warps10.WarpCache(config.cache?.type);
438
560
  this.uniswapService = new UniswapService(this.cache, parseInt(this.chain.chainId));
439
561
  }
440
562
  async getAccount(address) {
@@ -470,7 +592,7 @@ var WarpEvmDataLoader = class {
470
592
  if (identifier === this.chain.nativeToken.identifier) {
471
593
  return this.chain.nativeToken;
472
594
  }
473
- const cacheKey = import_warps8.WarpCacheKey.Asset(this.config.env, this.chain.name, identifier);
595
+ const cacheKey = import_warps10.WarpCacheKey.Asset(this.config.env, this.chain.name, identifier);
474
596
  const cachedAsset = this.cache.get(cacheKey);
475
597
  if (cachedAsset) {
476
598
  return cachedAsset;
@@ -498,7 +620,7 @@ var WarpEvmDataLoader = class {
498
620
  decimals: metadata.decimals,
499
621
  logoUrl: metadata.logoUrl
500
622
  };
501
- this.cache.set(cacheKey, asset, import_warps8.CacheTtl.OneHour);
623
+ this.cache.set(cacheKey, asset, import_warps10.CacheTtl.OneHour);
502
624
  return asset;
503
625
  } catch (error) {
504
626
  return null;
@@ -558,7 +680,7 @@ var WarpEvmDataLoader = class {
558
680
  }));
559
681
  }
560
682
  async getTokenBalance(address, tokenAddress) {
561
- const contract = new import_ethers.ethers.Contract(tokenAddress, ERC20_ABI, this.provider);
683
+ const contract = new import_ethers3.ethers.Contract(tokenAddress, ERC20_ABI, this.provider);
562
684
  const balance = await contract.balanceOf(address);
563
685
  return balance;
564
686
  }
@@ -567,7 +689,7 @@ var WarpEvmDataLoader = class {
567
689
  if (uniswapMetadata) {
568
690
  return uniswapMetadata;
569
691
  }
570
- const contract = new import_ethers.ethers.Contract(tokenAddress, ERC20_ABI, this.provider);
692
+ const contract = new import_ethers3.ethers.Contract(tokenAddress, ERC20_ABI, this.provider);
571
693
  const [name, symbol, decimals] = await Promise.all([
572
694
  contract.name().catch(() => "Unknown Token"),
573
695
  contract.symbol().catch(() => "UNKNOWN"),
@@ -583,8 +705,8 @@ var WarpEvmDataLoader = class {
583
705
  };
584
706
 
585
707
  // src/WarpEvmExecutor.ts
586
- var import_warps11 = require("@vleap/warps");
587
- var import_ethers4 = require("ethers");
708
+ var import_warps13 = require("@vleap/warps");
709
+ var import_ethers6 = require("ethers");
588
710
 
589
711
  // src/constants.ts
590
712
  var WarpEvmConstants = {
@@ -662,23 +784,23 @@ var ExplorerUrls = {
662
784
  };
663
785
 
664
786
  // src/WarpEvmOutput.ts
665
- var import_warps10 = require("@vleap/warps");
666
- var import_ethers3 = require("ethers");
787
+ var import_warps12 = require("@vleap/warps");
788
+ var import_ethers5 = require("ethers");
667
789
 
668
790
  // src/WarpEvmSerializer.ts
669
- var import_warps9 = require("@vleap/warps");
670
- var import_ethers2 = require("ethers");
671
- var SplitParamsRegex = new RegExp(`${import_warps9.WarpConstants.ArgParamsSeparator}(.*)`);
791
+ var import_warps11 = require("@vleap/warps");
792
+ var import_ethers4 = require("ethers");
793
+ var SplitParamsRegex = new RegExp(`${import_warps11.WarpConstants.ArgParamsSeparator}(.*)`);
672
794
  var WarpEvmSerializer = class {
673
795
  constructor() {
674
- this.coreSerializer = new import_warps9.WarpSerializer();
796
+ this.coreSerializer = new import_warps11.WarpSerializer();
675
797
  }
676
798
  typedToString(value) {
677
799
  if (typeof value === "string") {
678
- if (import_ethers2.ethers.isAddress(value)) {
800
+ if (import_ethers4.ethers.isAddress(value)) {
679
801
  return `address:${value}`;
680
802
  }
681
- if (import_ethers2.ethers.isHexString(value) && !import_ethers2.ethers.isAddress(value)) {
803
+ if (import_ethers4.ethers.isHexString(value) && !import_ethers4.ethers.isAddress(value)) {
682
804
  return `hex:${value}`;
683
805
  }
684
806
  return `string:${value}`;
@@ -700,9 +822,9 @@ var WarpEvmSerializer = class {
700
822
  }
701
823
  if (Array.isArray(value)) {
702
824
  if (value.length === 0) return `list:string:`;
703
- const types = value.map((item) => this.typedToString(item).split(import_warps9.WarpConstants.ArgParamsSeparator)[0]);
825
+ const types = value.map((item) => this.typedToString(item).split(import_warps11.WarpConstants.ArgParamsSeparator)[0]);
704
826
  const type = types[0];
705
- const values = value.map((item) => this.typedToString(item).split(import_warps9.WarpConstants.ArgParamsSeparator)[1]);
827
+ const values = value.map((item) => this.typedToString(item).split(import_warps11.WarpConstants.ArgParamsSeparator)[1]);
706
828
  return `list:${type}:${values.join(",")}`;
707
829
  }
708
830
  if (value === null || value === void 0) {
@@ -712,8 +834,8 @@ var WarpEvmSerializer = class {
712
834
  }
713
835
  typedToNative(value) {
714
836
  const stringValue = this.typedToString(value);
715
- const [type, ...valueParts] = stringValue.split(import_warps9.WarpConstants.ArgParamsSeparator);
716
- const nativeValue = valueParts.join(import_warps9.WarpConstants.ArgParamsSeparator);
837
+ const [type, ...valueParts] = stringValue.split(import_warps11.WarpConstants.ArgParamsSeparator);
838
+ const nativeValue = valueParts.join(import_warps11.WarpConstants.ArgParamsSeparator);
717
839
  return [type, this.parseNativeValue(type, nativeValue)];
718
840
  }
719
841
  nativeToTyped(type, value) {
@@ -765,7 +887,7 @@ var WarpEvmSerializer = class {
765
887
  }
766
888
  }
767
889
  stringToTyped(value) {
768
- const parts = value.split(import_warps9.WarpConstants.ArgParamsSeparator, 2);
890
+ const parts = value.split(import_warps11.WarpConstants.ArgParamsSeparator, 2);
769
891
  if (parts.length < 2) {
770
892
  return value;
771
893
  }
@@ -824,14 +946,14 @@ var WarpEvmOutput = class {
824
946
  this.config = config;
825
947
  this.chain = chain;
826
948
  this.serializer = new WarpEvmSerializer();
827
- const providerConfig = (0, import_warps10.getProviderConfig)(this.config, this.chain.name, this.config.env, this.chain.defaultApiUrl);
828
- const network = new import_ethers3.ethers.Network(this.chain.name, parseInt(this.chain.chainId));
829
- this.provider = new import_ethers3.ethers.JsonRpcProvider(providerConfig.url, network);
830
- this.cache = new import_warps10.WarpCache(config.cache?.type);
949
+ const providerConfig = (0, import_warps12.getProviderConfig)(this.config, this.chain.name, this.config.env, this.chain.defaultApiUrl);
950
+ const network = new import_ethers5.ethers.Network(this.chain.name, parseInt(this.chain.chainId));
951
+ this.provider = new import_ethers5.ethers.JsonRpcProvider(providerConfig.url, network);
952
+ this.cache = new import_warps12.WarpCache(config.cache?.type);
831
953
  }
832
954
  async getActionExecution(warp, actionIndex, tx) {
833
- const inputs = this.cache.get(import_warps10.WarpCacheKey.WarpExecutable(this.config.env, warp.meta?.hash || "", actionIndex)) ?? [];
834
- const resolvedInputs = (0, import_warps10.extractResolvedInputValues)(inputs);
955
+ const inputs = this.cache.get(import_warps12.WarpCacheKey.WarpExecutable(this.config.env, warp.meta?.hash || "", actionIndex)) ?? [];
956
+ const resolvedInputs = (0, import_warps12.extractResolvedInputValues)(inputs);
835
957
  if (!tx) {
836
958
  return this.createFailedExecution(warp, actionIndex, resolvedInputs);
837
959
  }
@@ -845,7 +967,7 @@ var WarpEvmOutput = class {
845
967
  status: "error",
846
968
  warp,
847
969
  action: actionIndex,
848
- user: (0, import_warps10.getWarpWalletAddressFromConfig)(this.config, this.chain.name),
970
+ user: (0, import_warps12.getWarpWalletAddressFromConfig)(this.config, this.chain.name),
849
971
  txHash: "",
850
972
  tx: null,
851
973
  next: null,
@@ -868,7 +990,7 @@ var WarpEvmOutput = class {
868
990
  status: success ? "success" : "error",
869
991
  warp,
870
992
  action: actionIndex,
871
- user: (0, import_warps10.getWarpWalletAddressFromConfig)(this.config, this.chain.name),
993
+ user: (0, import_warps12.getWarpWalletAddressFromConfig)(this.config, this.chain.name),
872
994
  txHash: transactionHash,
873
995
  tx,
874
996
  next: null,
@@ -899,7 +1021,7 @@ var WarpEvmOutput = class {
899
1021
  status: success ? "success" : "error",
900
1022
  warp,
901
1023
  action: actionIndex,
902
- user: (0, import_warps10.getWarpWalletAddressFromConfig)(this.config, this.chain.name),
1024
+ user: (0, import_warps12.getWarpWalletAddressFromConfig)(this.config, this.chain.name),
903
1025
  txHash: transactionHash,
904
1026
  tx,
905
1027
  next: null,
@@ -927,8 +1049,8 @@ var WarpEvmOutput = class {
927
1049
  return value;
928
1050
  };
929
1051
  for (const [key, path] of Object.entries(warp.output)) {
930
- if (path.startsWith(import_warps10.WarpConstants.Transform.Prefix)) continue;
931
- const currentActionIndex = (0, import_warps10.parseOutputOutIndex)(path);
1052
+ if (path.startsWith(import_warps12.WarpConstants.Transform.Prefix)) continue;
1053
+ const currentActionIndex = (0, import_warps12.parseOutputOutIndex)(path);
932
1054
  if (currentActionIndex !== null && currentActionIndex !== actionIndex) {
933
1055
  output[key] = null;
934
1056
  continue;
@@ -939,7 +1061,7 @@ var WarpEvmOutput = class {
939
1061
  output[key] = path;
940
1062
  }
941
1063
  }
942
- return { values, output: await (0, import_warps10.evaluateOutputCommon)(warp, output, actionIndex, inputs, this.serializer.coreSerializer, this.config) };
1064
+ return { values, output: await (0, import_warps12.evaluateOutputCommon)(warp, output, actionIndex, inputs, this.serializer.coreSerializer, this.config) };
943
1065
  }
944
1066
  async getTransactionStatus(txHash) {
945
1067
  try {
@@ -971,13 +1093,13 @@ var WarpEvmExecutor = class {
971
1093
  this.config = config;
972
1094
  this.chain = chain;
973
1095
  this.serializer = new WarpEvmSerializer();
974
- const providerConfig = (0, import_warps11.getProviderConfig)(this.config, chain.name, this.config.env, this.chain.defaultApiUrl);
975
- const network = new import_ethers4.ethers.Network(this.chain.name, parseInt(this.chain.chainId));
976
- this.provider = new import_ethers4.ethers.JsonRpcProvider(providerConfig.url, network);
1096
+ const providerConfig = (0, import_warps13.getProviderConfig)(this.config, chain.name, this.config.env, this.chain.defaultApiUrl);
1097
+ const network = new import_ethers6.ethers.Network(this.chain.name, parseInt(this.chain.chainId));
1098
+ this.provider = new import_ethers6.ethers.JsonRpcProvider(providerConfig.url, network);
977
1099
  this.output = new WarpEvmOutput(config, this.chain);
978
1100
  }
979
1101
  async createTransaction(executable) {
980
- const action = (0, import_warps11.getWarpActionByIndex)(executable.warp, executable.action);
1102
+ const action = (0, import_warps13.getWarpActionByIndex)(executable.warp, executable.action);
981
1103
  let tx = null;
982
1104
  if (action.type === "transfer") {
983
1105
  tx = await this.createTransferTransaction(executable);
@@ -992,9 +1114,9 @@ var WarpEvmExecutor = class {
992
1114
  return tx;
993
1115
  }
994
1116
  async createTransferTransaction(executable) {
995
- const userWallet = (0, import_warps11.getWarpWalletAddressFromConfig)(this.config, executable.chain.name);
1117
+ const userWallet = (0, import_warps13.getWarpWalletAddressFromConfig)(this.config, executable.chain.name);
996
1118
  if (!userWallet) throw new Error("WarpEvmExecutor: createTransfer - user address not set");
997
- if (!import_ethers4.ethers.isAddress(executable.destination)) {
1119
+ if (!import_ethers6.ethers.isAddress(executable.destination)) {
998
1120
  throw new Error(`WarpEvmExecutor: Invalid destination address: ${executable.destination}`);
999
1121
  }
1000
1122
  if (executable.transfers && executable.transfers.length > 0) {
@@ -1008,17 +1130,17 @@ var WarpEvmExecutor = class {
1008
1130
  return this.estimateGasAndSetDefaults(tx, userWallet);
1009
1131
  }
1010
1132
  async createContractCallTransaction(executable) {
1011
- const userWallet = (0, import_warps11.getWarpWalletAddressFromConfig)(this.config, executable.chain.name);
1133
+ const userWallet = (0, import_warps13.getWarpWalletAddressFromConfig)(this.config, executable.chain.name);
1012
1134
  if (!userWallet) throw new Error("WarpEvmExecutor: createContractCall - user address not set");
1013
- const action = (0, import_warps11.getWarpActionByIndex)(executable.warp, executable.action);
1135
+ const action = (0, import_warps13.getWarpActionByIndex)(executable.warp, executable.action);
1014
1136
  if (!action || !("func" in action) || !action.func) throw new Error("WarpEvmExecutor: Contract action must have a function name");
1015
- if (!import_ethers4.ethers.isAddress(executable.destination)) throw new Error(`WarpEvmExecutor: Invalid contract address: ${executable.destination}`);
1137
+ if (!import_ethers6.ethers.isAddress(executable.destination)) throw new Error(`WarpEvmExecutor: Invalid contract address: ${executable.destination}`);
1016
1138
  try {
1017
1139
  let iface;
1018
1140
  try {
1019
- iface = new import_ethers4.ethers.Interface(JSON.parse(action.abi));
1141
+ iface = new import_ethers6.ethers.Interface(JSON.parse(action.abi));
1020
1142
  } catch {
1021
- iface = new import_ethers4.ethers.Interface([action.abi]);
1143
+ iface = new import_ethers6.ethers.Interface([action.abi]);
1022
1144
  }
1023
1145
  const funcFragment = iface.getFunction(action.func);
1024
1146
  if (!funcFragment) throw new Error(`WarpEvmExecutor: Function ${action.func} not found in ABI`);
@@ -1060,10 +1182,10 @@ var WarpEvmExecutor = class {
1060
1182
  throw new Error("WarpEvmExecutor: Invalid transfer configuration");
1061
1183
  }
1062
1184
  async createSingleTokenTransfer(executable, transfer, userWallet) {
1063
- if (!import_ethers4.ethers.isAddress(transfer.identifier)) {
1185
+ if (!import_ethers6.ethers.isAddress(transfer.identifier)) {
1064
1186
  throw new Error(`WarpEvmExecutor: Invalid token address: ${transfer.identifier}`);
1065
1187
  }
1066
- const transferInterface = new import_ethers4.ethers.Interface(["function transfer(address to, uint256 amount) returns (bool)"]);
1188
+ const transferInterface = new import_ethers6.ethers.Interface(["function transfer(address to, uint256 amount) returns (bool)"]);
1067
1189
  const encodedData = transferInterface.encodeFunctionData("transfer", [executable.destination, transfer.amount]);
1068
1190
  const tx = {
1069
1191
  to: transfer.identifier,
@@ -1073,16 +1195,16 @@ var WarpEvmExecutor = class {
1073
1195
  return this.estimateGasAndSetDefaults(tx, userWallet);
1074
1196
  }
1075
1197
  async executeQuery(executable) {
1076
- const action = (0, import_warps11.getWarpActionByIndex)(executable.warp, executable.action);
1198
+ const action = (0, import_warps13.getWarpActionByIndex)(executable.warp, executable.action);
1077
1199
  if (action.type !== "query") throw new Error(`WarpEvmExecutor: Invalid action type for executeQuery: ${action.type}`);
1078
1200
  if (!action.func) throw new Error("WarpEvmExecutor: Query action must have a function name");
1079
- if (!import_ethers4.ethers.isAddress(executable.destination)) throw new Error(`WarpEvmExecutor: Invalid address for query: ${executable.destination}`);
1201
+ if (!import_ethers6.ethers.isAddress(executable.destination)) throw new Error(`WarpEvmExecutor: Invalid address for query: ${executable.destination}`);
1080
1202
  try {
1081
1203
  let iface;
1082
1204
  try {
1083
- iface = new import_ethers4.ethers.Interface(JSON.parse(action.abi));
1205
+ iface = new import_ethers6.ethers.Interface(JSON.parse(action.abi));
1084
1206
  } catch {
1085
- iface = new import_ethers4.ethers.Interface([action.abi]);
1207
+ iface = new import_ethers6.ethers.Interface([action.abi]);
1086
1208
  }
1087
1209
  const funcFragment = iface.getFunction(action.func);
1088
1210
  if (!funcFragment) throw new Error(`WarpEvmExecutor: Function ${action.func} not found in ABI`);
@@ -1100,33 +1222,33 @@ var WarpEvmExecutor = class {
1100
1222
  executable.action,
1101
1223
  executable.resolvedInputs
1102
1224
  );
1103
- const next = (0, import_warps11.getNextInfo)(this.config, [], executable.warp, executable.action, output);
1225
+ const next = (0, import_warps13.getNextInfo)(this.config, [], executable.warp, executable.action, output);
1104
1226
  const destinationInput = executable.resolvedInputs.find((i) => i.input.position === "receiver" || i.input.position === "destination");
1105
1227
  const destination = destinationInput?.value || executable.destination;
1106
- const resolvedInputs = (0, import_warps11.extractResolvedInputValues)(executable.resolvedInputs);
1228
+ const resolvedInputs = (0, import_warps13.extractResolvedInputValues)(executable.resolvedInputs);
1107
1229
  return {
1108
1230
  status: isSuccess ? "success" : "error",
1109
1231
  warp: executable.warp,
1110
1232
  action: executable.action,
1111
- user: (0, import_warps11.getWarpWalletAddressFromConfig)(this.config, executable.chain.name),
1233
+ user: (0, import_warps13.getWarpWalletAddressFromConfig)(this.config, executable.chain.name),
1112
1234
  txHash: null,
1113
1235
  tx: null,
1114
1236
  next,
1115
1237
  values,
1116
1238
  output: { ...output, _DATA: decodedResult },
1117
- messages: (0, import_warps11.applyOutputToMessages)(executable.warp, output, this.config),
1239
+ messages: (0, import_warps13.applyOutputToMessages)(executable.warp, output, this.config),
1118
1240
  destination,
1119
1241
  resolvedInputs
1120
1242
  };
1121
1243
  } catch (error) {
1122
1244
  const destinationInput = executable.resolvedInputs.find((i) => i.input.position === "receiver" || i.input.position === "destination");
1123
1245
  const destination = destinationInput?.value || executable.destination;
1124
- const resolvedInputs = (0, import_warps11.extractResolvedInputValues)(executable.resolvedInputs);
1246
+ const resolvedInputs = (0, import_warps13.extractResolvedInputValues)(executable.resolvedInputs);
1125
1247
  return {
1126
1248
  status: "error",
1127
1249
  warp: executable.warp,
1128
1250
  action: executable.action,
1129
- user: (0, import_warps11.getWarpWalletAddressFromConfig)(this.config, executable.chain.name),
1251
+ user: (0, import_warps13.getWarpWalletAddressFromConfig)(this.config, executable.chain.name),
1130
1252
  txHash: null,
1131
1253
  tx: null,
1132
1254
  next: null,
@@ -1167,7 +1289,7 @@ var WarpEvmExecutor = class {
1167
1289
  ...tx,
1168
1290
  chainId: parseInt(this.chain.chainId),
1169
1291
  gasLimit: gasEstimate,
1170
- gasPrice: import_ethers4.ethers.parseUnits(WarpEvmConstants.GasPrice.Default, "wei")
1292
+ gasPrice: import_ethers6.ethers.parseUnits(WarpEvmConstants.GasPrice.Default, "wei")
1171
1293
  };
1172
1294
  }
1173
1295
  } catch (error) {
@@ -1185,13 +1307,13 @@ var WarpEvmExecutor = class {
1185
1307
  ...tx,
1186
1308
  chainId: parseInt(this.chain.chainId),
1187
1309
  gasLimit: defaultGasLimit,
1188
- gasPrice: import_ethers4.ethers.parseUnits(WarpEvmConstants.GasPrice.Default, "wei")
1310
+ gasPrice: import_ethers6.ethers.parseUnits(WarpEvmConstants.GasPrice.Default, "wei")
1189
1311
  };
1190
1312
  }
1191
1313
  }
1192
1314
  async verifyMessage(message, signature) {
1193
1315
  try {
1194
- const recoveredAddress = import_ethers4.ethers.verifyMessage(message, signature);
1316
+ const recoveredAddress = import_ethers6.ethers.verifyMessage(message, signature);
1195
1317
  return recoveredAddress;
1196
1318
  } catch (error) {
1197
1319
  throw new Error(`Failed to verify message: ${error}`);
@@ -1237,7 +1359,7 @@ var WarpEvmExecutor = class {
1237
1359
  hexValue = "0x" + hexValue;
1238
1360
  }
1239
1361
  if (hexValue.length !== 66) {
1240
- hexValue = import_ethers4.ethers.zeroPadValue(hexValue, 32);
1362
+ hexValue = import_ethers6.ethers.zeroPadValue(hexValue, 32);
1241
1363
  }
1242
1364
  return hexValue;
1243
1365
  }
@@ -1366,105 +1488,105 @@ var WarpEvmExplorer = class {
1366
1488
  };
1367
1489
 
1368
1490
  // src/WarpEvmWallet.ts
1369
- var import_warps12 = require("@vleap/warps");
1370
- var import_ethers5 = require("ethers");
1491
+ var import_warps14 = require("@vleap/warps");
1492
+ var import_ethers7 = require("ethers");
1371
1493
  var WarpEvmWallet = class {
1372
- constructor(config, chain) {
1494
+ constructor(config, chain, walletProvider) {
1373
1495
  this.config = config;
1374
1496
  this.chain = chain;
1375
- const providerConfig = (0, import_warps12.getProviderConfig)(config, chain.name, config.env, chain.defaultApiUrl);
1376
- this.provider = new import_ethers5.ethers.JsonRpcProvider(providerConfig.url);
1497
+ this.cachedAddress = null;
1498
+ this.cachedPublicKey = null;
1499
+ const providerConfig = (0, import_warps14.getProviderConfig)(config, chain.name, config.env, chain.defaultApiUrl);
1500
+ this.provider = new import_ethers7.ethers.JsonRpcProvider(providerConfig.url);
1501
+ this.walletProvider = walletProvider || this.createDefaultProvider();
1502
+ this.initializeCache();
1503
+ }
1504
+ createDefaultProvider() {
1505
+ const privateKey = (0, import_warps14.getWarpWalletPrivateKeyFromConfig)(this.config, this.chain.name);
1506
+ if (privateKey) {
1507
+ return new PrivateKeyWalletProvider(this.config, this.chain, this.provider);
1508
+ }
1509
+ const mnemonic = (0, import_warps14.getWarpWalletMnemonicFromConfig)(this.config, this.chain.name);
1510
+ if (mnemonic) {
1511
+ return new MnemonicWalletProvider(this.config, this.chain, this.provider);
1512
+ }
1513
+ return null;
1514
+ }
1515
+ initializeCache() {
1516
+ (0, import_warps14.initializeWalletCache)(this.walletProvider).then((cache) => {
1517
+ this.cachedAddress = cache.address;
1518
+ this.cachedPublicKey = cache.publicKey;
1519
+ });
1377
1520
  }
1378
1521
  async signTransaction(tx) {
1379
1522
  if (!tx || typeof tx !== "object") throw new Error("Invalid transaction object");
1380
- const wallet = this.getWallet();
1381
- const txRequest = {
1382
- to: tx.to,
1383
- data: tx.data,
1384
- value: tx.value || 0,
1385
- gasLimit: tx.gasLimit,
1386
- maxFeePerGas: tx.maxFeePerGas,
1387
- maxPriorityFeePerGas: tx.maxPriorityFeePerGas,
1388
- nonce: tx.nonce,
1389
- chainId: tx.chainId
1390
- };
1391
- const signedTx = await wallet.signTransaction(txRequest);
1392
- return { ...tx, signature: signedTx };
1523
+ if (!this.walletProvider) throw new Error("No wallet provider available");
1524
+ return await this.walletProvider.signTransaction(tx);
1393
1525
  }
1394
1526
  async signTransactions(txs) {
1395
1527
  if (txs.length === 0) return [];
1396
- if (txs.length > 1) {
1397
- const wallet = this.getWallet();
1528
+ if (!this.walletProvider) throw new Error("No wallet provider available");
1529
+ if (this.walletProvider instanceof PrivateKeyWalletProvider || this.walletProvider instanceof MnemonicWalletProvider) {
1530
+ const wallet = this.walletProvider.getWalletInstance();
1398
1531
  const address = wallet.address;
1399
- const currentNonce = await this.provider.getTransactionCount(address, "pending");
1400
- const signedTxs = [];
1401
- for (let i = 0; i < txs.length; i++) {
1402
- const tx = { ...txs[i] };
1403
- tx.nonce = currentNonce + i;
1404
- if (i > 0) {
1405
- const priorityReduction = BigInt(i * 1e9);
1406
- const minGasPrice = BigInt(1e9);
1407
- if (tx.maxFeePerGas && tx.maxPriorityFeePerGas) {
1408
- tx.maxFeePerGas = tx.maxFeePerGas > priorityReduction ? tx.maxFeePerGas - priorityReduction : minGasPrice;
1409
- tx.maxPriorityFeePerGas = tx.maxPriorityFeePerGas > priorityReduction ? tx.maxPriorityFeePerGas - priorityReduction : minGasPrice;
1410
- delete tx.gasPrice;
1411
- } else if (tx.gasPrice) {
1412
- tx.gasPrice = tx.gasPrice > priorityReduction ? tx.gasPrice - priorityReduction : minGasPrice;
1413
- delete tx.maxFeePerGas;
1414
- delete tx.maxPriorityFeePerGas;
1532
+ if (txs.length > 1) {
1533
+ const currentNonce = await this.provider.getTransactionCount(address, "pending");
1534
+ const signedTxs = [];
1535
+ for (let i = 0; i < txs.length; i++) {
1536
+ const tx = { ...txs[i] };
1537
+ tx.nonce = currentNonce + i;
1538
+ if (i > 0) {
1539
+ const priorityReduction = BigInt(i * 1e9);
1540
+ const minGasPrice = BigInt(1e9);
1541
+ if (tx.maxFeePerGas && tx.maxPriorityFeePerGas) {
1542
+ tx.maxFeePerGas = tx.maxFeePerGas > priorityReduction ? tx.maxFeePerGas - priorityReduction : minGasPrice;
1543
+ tx.maxPriorityFeePerGas = tx.maxPriorityFeePerGas > priorityReduction ? tx.maxPriorityFeePerGas - priorityReduction : minGasPrice;
1544
+ delete tx.gasPrice;
1545
+ } else if (tx.gasPrice) {
1546
+ tx.gasPrice = tx.gasPrice > priorityReduction ? tx.gasPrice - priorityReduction : minGasPrice;
1547
+ delete tx.maxFeePerGas;
1548
+ delete tx.maxPriorityFeePerGas;
1549
+ }
1415
1550
  }
1551
+ signedTxs.push(await this.signTransaction(tx));
1416
1552
  }
1417
- const signedTx = await this.signTransaction(tx);
1418
- signedTxs.push(signedTx);
1553
+ return signedTxs;
1419
1554
  }
1420
- return signedTxs;
1421
1555
  }
1422
1556
  return Promise.all(txs.map(async (tx) => this.signTransaction(tx)));
1423
1557
  }
1424
1558
  async signMessage(message) {
1425
- const wallet = this.getWallet();
1426
- const signature = await wallet.signMessage(message);
1427
- return signature;
1559
+ if (!this.walletProvider) throw new Error("No wallet provider available");
1560
+ return await this.walletProvider.signMessage(message);
1428
1561
  }
1429
1562
  async sendTransaction(tx) {
1430
1563
  if (!tx || typeof tx !== "object") throw new Error("Invalid transaction object");
1431
1564
  if (!tx.signature) throw new Error("Transaction must be signed before sending");
1432
- const wallet = this.getWallet();
1433
- if (!wallet) throw new Error("Wallet not initialized - no private key provided");
1434
- const connectedWallet = wallet.connect(this.provider);
1435
- const txResponse = await connectedWallet.sendTransaction(tx);
1436
- return txResponse.hash;
1565
+ if (!this.walletProvider) throw new Error("No wallet provider available");
1566
+ if (this.walletProvider instanceof PrivateKeyWalletProvider || this.walletProvider instanceof MnemonicWalletProvider) {
1567
+ const wallet = this.walletProvider.getWalletInstance();
1568
+ const connectedWallet = wallet.connect(this.provider);
1569
+ const txResponse = await connectedWallet.sendTransaction(tx);
1570
+ return txResponse.hash;
1571
+ }
1572
+ throw new Error("Wallet provider does not support sending transactions");
1437
1573
  }
1438
1574
  async sendTransactions(txs) {
1439
1575
  return Promise.all(txs.map(async (tx) => this.sendTransaction(tx)));
1440
1576
  }
1441
1577
  create(mnemonic) {
1442
- const wallet = import_ethers5.ethers.Wallet.fromPhrase(mnemonic);
1578
+ const wallet = import_ethers7.ethers.Wallet.fromPhrase(mnemonic);
1443
1579
  return { address: wallet.address, privateKey: wallet.privateKey, mnemonic };
1444
1580
  }
1445
1581
  generate() {
1446
- const wallet = import_ethers5.ethers.Wallet.createRandom();
1582
+ const wallet = import_ethers7.ethers.Wallet.createRandom();
1447
1583
  return { address: wallet.address, privateKey: wallet.privateKey, mnemonic: wallet.mnemonic?.phrase || "" };
1448
1584
  }
1449
1585
  getAddress() {
1450
- const wallet = this.getWallet();
1451
- return wallet.address;
1586
+ return this.cachedAddress;
1452
1587
  }
1453
1588
  getPublicKey() {
1454
- try {
1455
- const wallet = this.getWallet();
1456
- const publicKey = wallet.signingKey.publicKey;
1457
- return publicKey.startsWith("0x") ? publicKey.slice(2) : publicKey;
1458
- } catch {
1459
- return null;
1460
- }
1461
- }
1462
- getWallet() {
1463
- const privateKey = (0, import_warps12.getWarpWalletPrivateKeyFromConfig)(this.config, this.chain.name);
1464
- if (privateKey) return new import_ethers5.ethers.Wallet(privateKey);
1465
- const mnemonic = (0, import_warps12.getWarpWalletMnemonicFromConfig)(this.config, this.chain.name);
1466
- if (mnemonic) return import_ethers5.ethers.Wallet.fromPhrase(mnemonic);
1467
- throw new Error("No private key or mnemonic provided");
1589
+ return this.cachedPublicKey;
1468
1590
  }
1469
1591
  };
1470
1592
 
@@ -1490,139 +1612,139 @@ var createEvmAdapter = (chainName, chainInfos) => {
1490
1612
 
1491
1613
  // src/chains/arbitrum.ts
1492
1614
  var NativeTokenArb = {
1493
- chain: import_warps13.WarpChainName.Arbitrum,
1615
+ chain: import_warps15.WarpChainName.Arbitrum,
1494
1616
  identifier: "ARB",
1495
1617
  symbol: "ARB",
1496
1618
  name: "Arbitrum",
1497
1619
  decimals: 18,
1498
- logoUrl: "https://vleap.ai/images/tokens/arb.svg"
1620
+ logoUrl: "https://joai.ai/images/tokens/arb.svg"
1499
1621
  };
1500
- var getArbitrumAdapter = createEvmAdapter(import_warps13.WarpChainName.Arbitrum, {
1622
+ var getArbitrumAdapter = createEvmAdapter(import_warps15.WarpChainName.Arbitrum, {
1501
1623
  mainnet: {
1502
- name: import_warps13.WarpChainName.Arbitrum,
1624
+ name: import_warps15.WarpChainName.Arbitrum,
1503
1625
  displayName: "Arbitrum",
1504
1626
  chainId: "42161",
1505
1627
  blockTime: 1e3,
1506
1628
  addressHrp: "0x",
1507
1629
  defaultApiUrl: "https://arb1.arbitrum.io/rpc",
1508
- logoUrl: "https://vleap.ai/images/chains/arbitrum.svg",
1630
+ logoUrl: "https://joai.ai/images/chains/arbitrum.svg",
1509
1631
  nativeToken: NativeTokenArb
1510
1632
  },
1511
1633
  testnet: {
1512
- name: import_warps13.WarpChainName.Arbitrum,
1634
+ name: import_warps15.WarpChainName.Arbitrum,
1513
1635
  displayName: "Arbitrum Sepolia",
1514
1636
  chainId: "421614",
1515
1637
  blockTime: 1e3,
1516
1638
  addressHrp: "0x",
1517
1639
  defaultApiUrl: "https://sepolia-rollup.arbitrum.io/rpc",
1518
- logoUrl: "https://vleap.ai/images/chains/arbitrum.svg",
1640
+ logoUrl: "https://joai.ai/images/chains/arbitrum.svg",
1519
1641
  nativeToken: NativeTokenArb
1520
1642
  },
1521
1643
  devnet: {
1522
- name: import_warps13.WarpChainName.Arbitrum,
1644
+ name: import_warps15.WarpChainName.Arbitrum,
1523
1645
  displayName: "Arbitrum Sepolia",
1524
1646
  chainId: "421614",
1525
1647
  blockTime: 1e3,
1526
1648
  addressHrp: "0x",
1527
1649
  defaultApiUrl: "https://sepolia-rollup.arbitrum.io/rpc",
1528
- logoUrl: "https://vleap.ai/images/chains/arbitrum.svg",
1650
+ logoUrl: "https://joai.ai/images/chains/arbitrum.svg",
1529
1651
  nativeToken: NativeTokenArb
1530
1652
  }
1531
1653
  });
1532
1654
 
1533
1655
  // src/chains/base.ts
1534
- var import_warps14 = require("@vleap/warps");
1656
+ var import_warps16 = require("@vleap/warps");
1535
1657
  var NativeTokenBase = {
1536
- chain: import_warps14.WarpChainName.Base,
1658
+ chain: import_warps16.WarpChainName.Base,
1537
1659
  identifier: "ETH",
1538
1660
  name: "Ether",
1539
1661
  symbol: "ETH",
1540
1662
  decimals: 18,
1541
- logoUrl: "https://vleap.ai/images/tokens/eth.svg"
1663
+ logoUrl: "https://joai.ai/images/tokens/eth.svg"
1542
1664
  };
1543
- var getBaseAdapter = createEvmAdapter(import_warps14.WarpChainName.Base, {
1665
+ var getBaseAdapter = createEvmAdapter(import_warps16.WarpChainName.Base, {
1544
1666
  mainnet: {
1545
- name: import_warps14.WarpChainName.Base,
1667
+ name: import_warps16.WarpChainName.Base,
1546
1668
  displayName: "Base",
1547
1669
  chainId: "8453",
1548
1670
  blockTime: 2e3,
1549
1671
  addressHrp: "0x",
1550
1672
  defaultApiUrl: "https://mainnet.base.org",
1551
- logoUrl: "https://vleap.ai/images/chains/base.svg",
1673
+ logoUrl: "https://joai.ai/images/chains/base.svg",
1552
1674
  nativeToken: NativeTokenBase
1553
1675
  },
1554
1676
  testnet: {
1555
- name: import_warps14.WarpChainName.Base,
1677
+ name: import_warps16.WarpChainName.Base,
1556
1678
  displayName: "Base Sepolia",
1557
1679
  chainId: "84532",
1558
1680
  blockTime: 2e3,
1559
1681
  addressHrp: "0x",
1560
1682
  defaultApiUrl: "https://sepolia.base.org",
1561
- logoUrl: "https://vleap.ai/images/chains/base.svg",
1683
+ logoUrl: "https://joai.ai/images/chains/base.svg",
1562
1684
  nativeToken: NativeTokenBase
1563
1685
  },
1564
1686
  devnet: {
1565
- name: import_warps14.WarpChainName.Base,
1687
+ name: import_warps16.WarpChainName.Base,
1566
1688
  displayName: "Base Sepolia",
1567
1689
  chainId: "84532",
1568
1690
  blockTime: 2e3,
1569
1691
  addressHrp: "0x",
1570
1692
  defaultApiUrl: "https://sepolia.base.org",
1571
- logoUrl: "https://vleap.ai/images/chains/base.svg",
1693
+ logoUrl: "https://joai.ai/images/chains/base.svg",
1572
1694
  nativeToken: NativeTokenBase
1573
1695
  }
1574
1696
  });
1575
1697
 
1576
1698
  // src/chains/combined.ts
1577
- var import_warps17 = require("@vleap/warps");
1699
+ var import_warps19 = require("@vleap/warps");
1578
1700
 
1579
1701
  // src/chains/ethereum.ts
1580
- var import_warps15 = require("@vleap/warps");
1702
+ var import_warps17 = require("@vleap/warps");
1581
1703
  var NativeTokenEth = {
1582
- chain: import_warps15.WarpChainName.Ethereum,
1704
+ chain: import_warps17.WarpChainName.Ethereum,
1583
1705
  identifier: "ETH",
1584
1706
  symbol: "ETH",
1585
1707
  name: "Ether",
1586
1708
  decimals: 18,
1587
- logoUrl: "https://vleap.ai/images/tokens/eth.svg"
1709
+ logoUrl: "https://joai.ai/images/tokens/eth.svg"
1588
1710
  };
1589
- var getEthereumAdapter = createEvmAdapter(import_warps15.WarpChainName.Ethereum, {
1711
+ var getEthereumAdapter = createEvmAdapter(import_warps17.WarpChainName.Ethereum, {
1590
1712
  mainnet: {
1591
- name: import_warps15.WarpChainName.Ethereum,
1713
+ name: import_warps17.WarpChainName.Ethereum,
1592
1714
  displayName: "Ethereum Mainnet",
1593
1715
  chainId: "1",
1594
1716
  blockTime: 12e3,
1595
1717
  addressHrp: "0x",
1596
1718
  defaultApiUrl: "https://ethereum-rpc.publicnode.com",
1597
- logoUrl: "https://vleap.ai/images/chains/ethereum.svg",
1719
+ logoUrl: "https://joai.ai/images/chains/ethereum.svg",
1598
1720
  nativeToken: NativeTokenEth
1599
1721
  },
1600
1722
  testnet: {
1601
- name: import_warps15.WarpChainName.Ethereum,
1723
+ name: import_warps17.WarpChainName.Ethereum,
1602
1724
  displayName: "Ethereum Sepolia",
1603
1725
  chainId: "11155111",
1604
1726
  blockTime: 12e3,
1605
1727
  addressHrp: "0x",
1606
1728
  defaultApiUrl: "https://ethereum-sepolia-rpc.publicnode.com",
1607
- logoUrl: "https://vleap.ai/images/chains/ethereum.svg",
1729
+ logoUrl: "https://joai.ai/images/chains/ethereum.svg",
1608
1730
  nativeToken: NativeTokenEth
1609
1731
  },
1610
1732
  devnet: {
1611
- name: import_warps15.WarpChainName.Ethereum,
1733
+ name: import_warps17.WarpChainName.Ethereum,
1612
1734
  displayName: "Ethereum Sepolia",
1613
1735
  chainId: "11155111",
1614
1736
  blockTime: 12e3,
1615
1737
  addressHrp: "0x",
1616
1738
  defaultApiUrl: "https://ethereum-sepolia-rpc.publicnode.com",
1617
- logoUrl: "https://vleap.ai/images/chains/ethereum.svg",
1739
+ logoUrl: "https://joai.ai/images/chains/ethereum.svg",
1618
1740
  nativeToken: NativeTokenEth
1619
1741
  }
1620
1742
  });
1621
1743
 
1622
1744
  // src/chains/somnia.ts
1623
- var import_warps16 = require("@vleap/warps");
1745
+ var import_warps18 = require("@vleap/warps");
1624
1746
  var NativeTokenSomi = {
1625
- chain: import_warps16.WarpChainName.Somnia,
1747
+ chain: import_warps18.WarpChainName.Somnia,
1626
1748
  identifier: "SOMI",
1627
1749
  symbol: "SOMI",
1628
1750
  name: "Somnia",
@@ -1630,42 +1752,42 @@ var NativeTokenSomi = {
1630
1752
  logoUrl: "https://assets.coingecko.com/coins/images/68061/standard/somniacg.png?1754641117"
1631
1753
  };
1632
1754
  var NativeTokenStt = {
1633
- chain: import_warps16.WarpChainName.Somnia,
1755
+ chain: import_warps18.WarpChainName.Somnia,
1634
1756
  identifier: "STT",
1635
1757
  symbol: "STT",
1636
1758
  name: "Somnia Testnet Token",
1637
1759
  decimals: 18,
1638
1760
  logoUrl: "https://assets.coingecko.com/coins/images/68061/standard/somniacg.png?1754641117"
1639
1761
  };
1640
- var getSomniaAdapter = createEvmAdapter(import_warps16.WarpChainName.Somnia, {
1762
+ var getSomniaAdapter = createEvmAdapter(import_warps18.WarpChainName.Somnia, {
1641
1763
  mainnet: {
1642
- name: import_warps16.WarpChainName.Somnia,
1764
+ name: import_warps18.WarpChainName.Somnia,
1643
1765
  displayName: "Somnia Mainnet",
1644
1766
  chainId: "5031",
1645
1767
  blockTime: 100,
1646
1768
  addressHrp: "0x",
1647
1769
  defaultApiUrl: "https://api.infra.mainnet.somnia.network/",
1648
- logoUrl: "https://vleap.ai/images/chains/somnia.png",
1770
+ logoUrl: "https://joai.ai/images/chains/somnia.png",
1649
1771
  nativeToken: NativeTokenSomi
1650
1772
  },
1651
1773
  testnet: {
1652
- name: import_warps16.WarpChainName.Somnia,
1774
+ name: import_warps18.WarpChainName.Somnia,
1653
1775
  displayName: "Somnia Testnet",
1654
1776
  chainId: "50312",
1655
1777
  blockTime: 100,
1656
1778
  addressHrp: "0x",
1657
1779
  defaultApiUrl: "https://dream-rpc.somnia.network/",
1658
- logoUrl: "https://vleap.ai/images/chains/somnia.png",
1780
+ logoUrl: "https://joai.ai/images/chains/somnia.png",
1659
1781
  nativeToken: NativeTokenStt
1660
1782
  },
1661
1783
  devnet: {
1662
- name: import_warps16.WarpChainName.Somnia,
1784
+ name: import_warps18.WarpChainName.Somnia,
1663
1785
  displayName: "Somnia Testnet",
1664
1786
  chainId: "50312",
1665
1787
  blockTime: 100,
1666
1788
  addressHrp: "0x",
1667
1789
  defaultApiUrl: "https://dream-rpc.somnia.network",
1668
- logoUrl: "https://vleap.ai/images/chains/somnia.png",
1790
+ logoUrl: "https://joai.ai/images/chains/somnia.png",
1669
1791
  nativeToken: NativeTokenStt
1670
1792
  }
1671
1793
  });
@@ -1678,10 +1800,10 @@ var getAllEvmAdapters = (config, fallback) => [
1678
1800
  getSomniaAdapter(config, fallback)
1679
1801
  ];
1680
1802
  var getAllEvmChainNames = () => [
1681
- import_warps17.WarpChainName.Ethereum,
1682
- import_warps17.WarpChainName.Base,
1683
- import_warps17.WarpChainName.Arbitrum,
1684
- import_warps17.WarpChainName.Somnia
1803
+ import_warps19.WarpChainName.Ethereum,
1804
+ import_warps19.WarpChainName.Base,
1805
+ import_warps19.WarpChainName.Arbitrum,
1806
+ import_warps19.WarpChainName.Somnia
1685
1807
  ];
1686
1808
  // Annotate the CommonJS export names for ESM import in node:
1687
1809
  0 && (module.exports = {
@@ -1691,9 +1813,11 @@ var getAllEvmChainNames = () => [
1691
1813
  EvmExplorers,
1692
1814
  ExplorerUrls,
1693
1815
  KnownTokens,
1816
+ MnemonicWalletProvider,
1694
1817
  NativeTokenArb,
1695
1818
  NativeTokenBase,
1696
1819
  NativeTokenEth,
1820
+ PrivateKeyWalletProvider,
1697
1821
  UniswapService,
1698
1822
  WarpEvmConstants,
1699
1823
  WarpEvmDataLoader,