@1llet.xyz/erc4337-gasless-sdk 0.4.29 → 0.4.30
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.d.mts +1 -10
- package/dist/index.d.ts +1 -10
- package/dist/index.js +234 -323
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +235 -324
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -231,7 +231,6 @@ var erc20Abi = [
|
|
|
231
231
|
var BundlerClient = class {
|
|
232
232
|
constructor(config, entryPointAddress) {
|
|
233
233
|
this.bundlerUrl = config.bundlerUrl;
|
|
234
|
-
this.chainId = config.chain.id;
|
|
235
234
|
this.entryPointAddress = entryPointAddress;
|
|
236
235
|
}
|
|
237
236
|
async call(method, params) {
|
|
@@ -314,9 +313,6 @@ var TokenService = class {
|
|
|
314
313
|
* Resolve token address from symbol or return address if provided
|
|
315
314
|
*/
|
|
316
315
|
getTokenAddress(token) {
|
|
317
|
-
if (token === "ETH") {
|
|
318
|
-
return "0x0000000000000000000000000000000000000000";
|
|
319
|
-
}
|
|
320
316
|
if (token.startsWith("0x")) return token;
|
|
321
317
|
const info = this.tokens.get(token.toUpperCase());
|
|
322
318
|
if (!info) throw new Error(`Token ${token} not found in chain config`);
|
|
@@ -586,13 +582,6 @@ var AccountAbstraction = class {
|
|
|
586
582
|
});
|
|
587
583
|
return address;
|
|
588
584
|
}
|
|
589
|
-
/**
|
|
590
|
-
* Check if the Smart Account is deployed
|
|
591
|
-
*/
|
|
592
|
-
async isAccountDeployed() {
|
|
593
|
-
if (!this.smartAccountAddress) throw new Error("Not connected");
|
|
594
|
-
return this.userOpBuilder.isAccountDeployed(this.smartAccountAddress);
|
|
595
|
-
}
|
|
596
585
|
// --- Token Methods (Delegated) ---
|
|
597
586
|
getTokenAddress(token) {
|
|
598
587
|
return this.tokenService.getTokenAddress(token);
|
|
@@ -605,29 +594,11 @@ var AccountAbstraction = class {
|
|
|
605
594
|
if (!this.owner) throw new Error("Not connected");
|
|
606
595
|
return this.tokenService.getBalance(token, this.owner);
|
|
607
596
|
}
|
|
608
|
-
// Deprecated helpers maintained for compatibility
|
|
609
|
-
async getUsdcBalance() {
|
|
610
|
-
return this.getBalance("USDC");
|
|
611
|
-
}
|
|
612
|
-
async getEoaUsdcBalance() {
|
|
613
|
-
return this.getEoaBalance("USDC");
|
|
614
|
-
}
|
|
615
597
|
async getAllowance(token = "USDC") {
|
|
616
598
|
if (!this.owner || !this.smartAccountAddress) throw new Error("Not connected");
|
|
617
599
|
return this.tokenService.getAllowance(token, this.owner, this.smartAccountAddress);
|
|
618
600
|
}
|
|
619
601
|
// --- Transactions ---
|
|
620
|
-
async deployAccount() {
|
|
621
|
-
if (!this.owner || !this.smartAccountAddress) throw new Error("Not connected");
|
|
622
|
-
try {
|
|
623
|
-
const userOp = await this.userOpBuilder.buildDeployUserOp(this.owner, this.smartAccountAddress);
|
|
624
|
-
const signed = await this.signUserOperation(userOp);
|
|
625
|
-
const hash = await this.sendUserOperation(signed);
|
|
626
|
-
return await this.waitForUserOperation(hash);
|
|
627
|
-
} catch (error) {
|
|
628
|
-
throw this.decodeError(error);
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
602
|
async sendTransaction(tx) {
|
|
632
603
|
return this.sendBatchTransaction([tx]);
|
|
633
604
|
}
|
|
@@ -659,10 +630,9 @@ var AccountAbstraction = class {
|
|
|
659
630
|
to: this.smartAccountAddress,
|
|
660
631
|
value: amount,
|
|
661
632
|
chain: this.chainConfig.chain
|
|
662
|
-
// Explicit chain
|
|
663
633
|
});
|
|
664
634
|
}
|
|
665
|
-
|
|
635
|
+
return await window.ethereum.request({
|
|
666
636
|
method: "eth_sendTransaction",
|
|
667
637
|
params: [{
|
|
668
638
|
from: this.owner,
|
|
@@ -670,7 +640,6 @@ var AccountAbstraction = class {
|
|
|
670
640
|
value: "0x" + amount.toString(16)
|
|
671
641
|
}]
|
|
672
642
|
});
|
|
673
|
-
return txHash;
|
|
674
643
|
}
|
|
675
644
|
async transfer(token, recipient, amount) {
|
|
676
645
|
const tokenAddress = this.getTokenAddress(token);
|
|
@@ -704,7 +673,7 @@ var AccountAbstraction = class {
|
|
|
704
673
|
chain: this.chainConfig.chain
|
|
705
674
|
});
|
|
706
675
|
}
|
|
707
|
-
|
|
676
|
+
return await window.ethereum.request({
|
|
708
677
|
method: "eth_sendTransaction",
|
|
709
678
|
params: [{
|
|
710
679
|
from: this.owner,
|
|
@@ -712,7 +681,6 @@ var AccountAbstraction = class {
|
|
|
712
681
|
data
|
|
713
682
|
}]
|
|
714
683
|
});
|
|
715
|
-
return txHash;
|
|
716
684
|
}
|
|
717
685
|
if (support.type === "permit") throw new Error("Permit not yet supported");
|
|
718
686
|
return "NOT_NEEDED";
|
|
@@ -724,10 +692,6 @@ var AccountAbstraction = class {
|
|
|
724
692
|
// User requested "modularize", but usually expects same public API.
|
|
725
693
|
// I will expose them as simple delegates if needed, or assume they primarily use sendBatchTransaction.
|
|
726
694
|
// The previous implementation exposed `buildUserOperationBatch`.
|
|
727
|
-
async buildUserOperationBatch(transactions) {
|
|
728
|
-
if (!this.owner || !this.smartAccountAddress) throw new Error("Not connected");
|
|
729
|
-
return this.userOpBuilder.buildUserOperationBatch(this.owner, this.smartAccountAddress, transactions);
|
|
730
|
-
}
|
|
731
695
|
async signUserOperation(userOp) {
|
|
732
696
|
if (!this.owner) throw new Error("Not connected");
|
|
733
697
|
const userOpHash = this.userOpBuilder.getUserOpHash(userOp);
|
|
@@ -783,125 +747,282 @@ var AccountAbstraction = class {
|
|
|
783
747
|
return this.smartAccountAddress;
|
|
784
748
|
}
|
|
785
749
|
};
|
|
750
|
+
|
|
751
|
+
// src/constants/bundler.ts
|
|
786
752
|
var DEFAULT_BUNDLER_URL = "https://bundler-erc-4337.vercel.app";
|
|
787
753
|
var BUNDLER_URL = process.env.NEXT_PUBLIC_BUNDLER_URL || process.env.BUNDLER_URL || DEFAULT_BUNDLER_URL;
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
// Addresses
|
|
793
|
-
entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
794
|
-
factoryAddress: "0xe2584152891E4769025807DEa0cD611F135aDC68",
|
|
795
|
-
paymasterAddress: "0x1e13Eb16C565E3f3FDe49A011755e50410bb1F95",
|
|
796
|
-
tokens: [
|
|
754
|
+
|
|
755
|
+
// src/chains/Evm/Base.ts
|
|
756
|
+
var BASE = {
|
|
757
|
+
assets: [
|
|
797
758
|
{
|
|
798
|
-
|
|
759
|
+
name: "USDC",
|
|
799
760
|
decimals: 6,
|
|
800
|
-
address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
|
|
761
|
+
address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
762
|
+
coingeckoId: "usd-coin"
|
|
801
763
|
},
|
|
802
764
|
{
|
|
803
|
-
|
|
765
|
+
name: "ETH",
|
|
804
766
|
decimals: 18,
|
|
805
|
-
address: "0x0000000000000000000000000000000000000000"
|
|
767
|
+
address: "0x0000000000000000000000000000000000000000",
|
|
768
|
+
coingeckoId: "ethereum"
|
|
806
769
|
}
|
|
807
|
-
]
|
|
770
|
+
],
|
|
771
|
+
evm: {
|
|
772
|
+
chain: chains.base,
|
|
773
|
+
rpcUrl: "https://base-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN",
|
|
774
|
+
supports7702: true,
|
|
775
|
+
erc4337: false,
|
|
776
|
+
bundlerUrl: `${BUNDLER_URL}/rpc?chain=base`,
|
|
777
|
+
entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
778
|
+
factoryAddress: "0xe2584152891E4769025807DEa0cD611F135aDC68",
|
|
779
|
+
paymasterAddress: "0x1e13Eb16C565E3f3FDe49A011755e50410bb1F95"
|
|
780
|
+
},
|
|
781
|
+
crossChainInformation: {
|
|
782
|
+
circleInformation: {
|
|
783
|
+
supportCirclePaymaster: true,
|
|
784
|
+
cCTPInformation: {
|
|
785
|
+
supportCCTP: true,
|
|
786
|
+
domain: 6
|
|
787
|
+
},
|
|
788
|
+
aproxFromFee: 0
|
|
789
|
+
},
|
|
790
|
+
nearIntentInformation: {
|
|
791
|
+
support: true,
|
|
792
|
+
assetsId: [
|
|
793
|
+
{
|
|
794
|
+
assetId: "nep141:base-0x833589fcd6edb6e08f4c7c32d4f71b54bda02913.omft.near",
|
|
795
|
+
name: "USDC",
|
|
796
|
+
decimals: 6
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
assetId: "nep141:base.omft.near",
|
|
800
|
+
name: "ETH",
|
|
801
|
+
decimals: 18
|
|
802
|
+
}
|
|
803
|
+
],
|
|
804
|
+
needMemo: false
|
|
805
|
+
}
|
|
806
|
+
}
|
|
808
807
|
};
|
|
809
|
-
var
|
|
810
|
-
|
|
811
|
-
bundlerUrl: `${BUNDLER_URL}/rpc?chain=optimism`,
|
|
812
|
-
// Dynamic Bundler URL
|
|
813
|
-
// Addresses
|
|
814
|
-
entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
815
|
-
factoryAddress: "0x3CE963866d3Be7Fe4354DBe892Aab52a0a18aeb2",
|
|
816
|
-
paymasterAddress: "0x0dB771d11F84E8541AA651363DF14E4401d01216",
|
|
817
|
-
tokens: [
|
|
808
|
+
var GNOSIS = {
|
|
809
|
+
assets: [
|
|
818
810
|
{
|
|
819
|
-
|
|
811
|
+
name: "USDC",
|
|
820
812
|
decimals: 6,
|
|
821
|
-
address: "
|
|
813
|
+
address: "0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0",
|
|
814
|
+
coingeckoId: "usd-coin"
|
|
822
815
|
},
|
|
823
816
|
{
|
|
824
|
-
|
|
817
|
+
name: "USDT",
|
|
825
818
|
decimals: 6,
|
|
826
|
-
address: "
|
|
819
|
+
address: "0x4ECaBa5870353805a9F068101A40E0f32ed605C6",
|
|
820
|
+
coingeckoId: "tether"
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
name: "EURe",
|
|
824
|
+
decimals: 18,
|
|
825
|
+
address: "0x420CA0f9B9b604cE0fd9C18EF134C705e5Fa3430",
|
|
826
|
+
coingeckoId: "monerium-eur-money"
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
name: "GNO",
|
|
830
|
+
decimals: 18,
|
|
831
|
+
address: "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb",
|
|
832
|
+
coingeckoId: "gnosis"
|
|
827
833
|
},
|
|
828
834
|
{
|
|
829
|
-
|
|
835
|
+
name: "WETH",
|
|
830
836
|
decimals: 18,
|
|
831
|
-
address: "
|
|
837
|
+
address: "0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",
|
|
838
|
+
coingeckoId: "ethereum"
|
|
832
839
|
},
|
|
833
840
|
{
|
|
834
|
-
|
|
841
|
+
name: "XDAI",
|
|
835
842
|
decimals: 18,
|
|
836
|
-
address: "0x0000000000000000000000000000000000000000"
|
|
843
|
+
address: "0x0000000000000000000000000000000000000000",
|
|
844
|
+
coingeckoId: "xdai"
|
|
845
|
+
}
|
|
846
|
+
],
|
|
847
|
+
evm: {
|
|
848
|
+
chain: chains.gnosis,
|
|
849
|
+
rpcUrl: chains.gnosis.rpcUrls.default.http[0],
|
|
850
|
+
supports7702: true,
|
|
851
|
+
erc4337: true,
|
|
852
|
+
bundlerUrl: `${BUNDLER_URL}/rpc?chain=gnosis`,
|
|
853
|
+
entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
854
|
+
factoryAddress: "0xC8a2Fb1f2E686417A131E09be3320cb5431CcD90",
|
|
855
|
+
paymasterAddress: "0x4C36C70d68a7c26326711e8268bb163E3784fA96"
|
|
856
|
+
},
|
|
857
|
+
crossChainInformation: {
|
|
858
|
+
circleInformation: {
|
|
859
|
+
supportCirclePaymaster: false,
|
|
860
|
+
aproxFromFee: 0,
|
|
861
|
+
cCTPInformation: {
|
|
862
|
+
supportCCTP: false,
|
|
863
|
+
domain: 0
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
nearIntentInformation: {
|
|
867
|
+
support: true,
|
|
868
|
+
assetsId: [
|
|
869
|
+
{
|
|
870
|
+
assetId: "nep141:gnosis-0x2a22f9c3b484c3629090feed35f17ff8f88f76f0.omft.near",
|
|
871
|
+
name: "USDC",
|
|
872
|
+
decimals: 6
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
assetId: "nep141:gnosis-0x4ecaba5870353805a9f068101a40e0f32ed605c6.omft.near",
|
|
876
|
+
name: "USDT",
|
|
877
|
+
decimals: 6
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
assetId: "nep141:gnosis-0x420ca0f9b9b604ce0fd9c18ef134c705e5fa3430.omft.near",
|
|
881
|
+
name: "EURe",
|
|
882
|
+
decimals: 18
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
assetId: "nep141:gnosis-0x9c58bacc331c9aa871afd802db6379a98e80cedb.omft.near",
|
|
886
|
+
name: "GNO",
|
|
887
|
+
decimals: 18
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
assetId: "nep141:gnosis-0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1.omft.near",
|
|
891
|
+
name: "WETH",
|
|
892
|
+
decimals: 18
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
assetId: "nep141:gnosis.omft.near",
|
|
896
|
+
name: "XDAI",
|
|
897
|
+
decimals: 18
|
|
898
|
+
}
|
|
899
|
+
],
|
|
900
|
+
needMemo: false
|
|
837
901
|
}
|
|
838
|
-
|
|
902
|
+
}
|
|
839
903
|
};
|
|
840
|
-
var
|
|
841
|
-
|
|
842
|
-
bundlerUrl: `${BUNDLER_URL}/rpc?chain=gnosis`,
|
|
843
|
-
// Dynamic Bundler URL
|
|
844
|
-
// Addresses
|
|
845
|
-
entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
846
|
-
factoryAddress: "0xC8a2Fb1f2E686417A131E09be3320cb5431CcD90",
|
|
847
|
-
paymasterAddress: "0x4C36C70d68a7c26326711e8268bb163E3784fA96",
|
|
848
|
-
tokens: [
|
|
904
|
+
var OPTIMISM = {
|
|
905
|
+
assets: [
|
|
849
906
|
{
|
|
850
|
-
|
|
907
|
+
name: "USDC",
|
|
851
908
|
decimals: 6,
|
|
852
|
-
address: "
|
|
909
|
+
address: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
910
|
+
coingeckoId: "usd-coin"
|
|
853
911
|
},
|
|
854
912
|
{
|
|
855
|
-
|
|
913
|
+
name: "USDT",
|
|
856
914
|
decimals: 6,
|
|
857
|
-
address: "
|
|
858
|
-
|
|
859
|
-
{
|
|
860
|
-
symbol: "EURe",
|
|
861
|
-
decimals: 18,
|
|
862
|
-
address: "0x420CA0f9B9b604cE0fd9C18EF134C705e5Fa3430"
|
|
915
|
+
address: "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",
|
|
916
|
+
coingeckoId: "tether"
|
|
863
917
|
},
|
|
864
918
|
{
|
|
865
|
-
|
|
919
|
+
name: "OP",
|
|
866
920
|
decimals: 18,
|
|
867
|
-
address: "
|
|
921
|
+
address: "0x4200000000000000000000000000000000000042",
|
|
922
|
+
coingeckoId: "optimism"
|
|
868
923
|
},
|
|
869
924
|
{
|
|
870
|
-
|
|
925
|
+
name: "ETH",
|
|
871
926
|
decimals: 18,
|
|
872
|
-
address: "
|
|
927
|
+
address: "0x0000000000000000000000000000000000000000",
|
|
928
|
+
coingeckoId: "ethereum"
|
|
929
|
+
}
|
|
930
|
+
],
|
|
931
|
+
evm: {
|
|
932
|
+
chain: chains.optimism,
|
|
933
|
+
rpcUrl: "https://opt-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN",
|
|
934
|
+
supports7702: false,
|
|
935
|
+
erc4337: false,
|
|
936
|
+
bundlerUrl: `${BUNDLER_URL}/rpc?chain=optimism`,
|
|
937
|
+
entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
938
|
+
factoryAddress: "0x3CE963866d3Be7Fe4354DBe892Aab52a0a18aeb2",
|
|
939
|
+
paymasterAddress: "0x0dB771d11F84E8541AA651363DF14E4401d01216"
|
|
940
|
+
},
|
|
941
|
+
crossChainInformation: {
|
|
942
|
+
circleInformation: {
|
|
943
|
+
supportCirclePaymaster: true,
|
|
944
|
+
cCTPInformation: {
|
|
945
|
+
supportCCTP: true,
|
|
946
|
+
domain: 2
|
|
947
|
+
},
|
|
948
|
+
aproxFromFee: 0
|
|
873
949
|
},
|
|
874
|
-
{
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
950
|
+
nearIntentInformation: {
|
|
951
|
+
support: true,
|
|
952
|
+
assetsId: [
|
|
953
|
+
{
|
|
954
|
+
assetId: "nep245:v2_1.omni.hot.tg:10_A2ewyUyDp6qsue1jqZsGypkCxRJ",
|
|
955
|
+
name: "USDC",
|
|
956
|
+
decimals: 6
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
assetId: "nep245:v2_1.omni.hot.tg:10_359RPSJVdTxwTJT9TyGssr2rFoWo",
|
|
960
|
+
name: "USDT",
|
|
961
|
+
decimals: 6
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
assetId: "nep245:v2_1.omni.hot.tg:10_vLAiSt9KfUGKpw5cD3vsSyNYBo7",
|
|
965
|
+
name: "OP",
|
|
966
|
+
decimals: 18
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
assetId: "nep245:v2_1.omni.hot.tg:10_11111111111111111111",
|
|
970
|
+
name: "ETH",
|
|
971
|
+
decimals: 18
|
|
972
|
+
}
|
|
973
|
+
],
|
|
974
|
+
needMemo: false
|
|
878
975
|
}
|
|
879
|
-
|
|
976
|
+
}
|
|
880
977
|
};
|
|
881
978
|
var BASE_SEPOLIA = {
|
|
882
|
-
|
|
883
|
-
bundlerUrl: `${BUNDLER_URL}/rpc?chain=baseSepolia`,
|
|
884
|
-
// Dynamic Bundler URL
|
|
885
|
-
// Addresses
|
|
886
|
-
entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
887
|
-
factoryAddress: "0x9406Cc6185a346906296840746125a0E44976454",
|
|
888
|
-
// Paymaster not configured in deployments.ts for Sepolia?
|
|
889
|
-
tokens: [
|
|
979
|
+
assets: [
|
|
890
980
|
{
|
|
891
|
-
|
|
981
|
+
name: "USDC",
|
|
892
982
|
decimals: 6,
|
|
893
|
-
address: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
|
|
983
|
+
address: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
984
|
+
coingeckoId: "usd-coin"
|
|
894
985
|
},
|
|
895
986
|
{
|
|
896
|
-
|
|
987
|
+
name: "ETH",
|
|
897
988
|
decimals: 18,
|
|
898
|
-
address: "0x0000000000000000000000000000000000000000"
|
|
989
|
+
address: "0x0000000000000000000000000000000000000000",
|
|
990
|
+
coingeckoId: "ethereum"
|
|
899
991
|
}
|
|
900
|
-
]
|
|
901
|
-
|
|
992
|
+
],
|
|
993
|
+
evm: {
|
|
994
|
+
chain: chains.baseSepolia,
|
|
995
|
+
rpcUrl: "https://sepolia.base.org",
|
|
996
|
+
supports7702: true,
|
|
997
|
+
erc4337: true,
|
|
998
|
+
bundlerUrl: `${BUNDLER_URL}/rpc?chain=baseSepolia`,
|
|
999
|
+
entryPointAddress: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
1000
|
+
factoryAddress: "0x9406Cc6185a346906296840746125a0E44976454"
|
|
1001
|
+
// Paymaster optional
|
|
1002
|
+
}};
|
|
1003
|
+
function mapToSDKConfig(data) {
|
|
1004
|
+
if (!data.evm) throw new Error("Non-EVM config used in EVM SDK");
|
|
1005
|
+
return {
|
|
1006
|
+
chain: data.evm.chain,
|
|
1007
|
+
rpcUrl: data.evm.rpcUrl || void 0,
|
|
1008
|
+
bundlerUrl: data.evm.bundlerUrl,
|
|
1009
|
+
entryPointAddress: data.evm.entryPointAddress,
|
|
1010
|
+
factoryAddress: data.evm.factoryAddress,
|
|
1011
|
+
paymasterAddress: data.evm.paymasterAddress,
|
|
1012
|
+
tokens: data.assets.map((a) => ({
|
|
1013
|
+
symbol: a.name,
|
|
1014
|
+
decimals: a.decimals,
|
|
1015
|
+
address: a.address
|
|
1016
|
+
}))
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
var BASE_MAINNET = mapToSDKConfig(BASE);
|
|
1020
|
+
var OPTIMISM_MAINNET = mapToSDKConfig(OPTIMISM);
|
|
1021
|
+
var GNOSIS_MAINNET = mapToSDKConfig(GNOSIS);
|
|
1022
|
+
var BASE_SEPOLIA2 = mapToSDKConfig(BASE_SEPOLIA);
|
|
902
1023
|
var CHAIN_CONFIGS = {
|
|
903
1024
|
[chains.base.id]: BASE_MAINNET,
|
|
904
|
-
[chains.baseSepolia.id]:
|
|
1025
|
+
[chains.baseSepolia.id]: BASE_SEPOLIA2,
|
|
905
1026
|
[chains.gnosis.id]: GNOSIS_MAINNET,
|
|
906
1027
|
[chains.optimism.id]: OPTIMISM_MAINNET
|
|
907
1028
|
};
|
|
@@ -1042,76 +1163,6 @@ var createRetrieveAttestation = async (transactionHash, chainId, timeout = 6e4)
|
|
|
1042
1163
|
await new Promise((resolve) => setTimeout(resolve, FIVE_SECONDS));
|
|
1043
1164
|
}
|
|
1044
1165
|
};
|
|
1045
|
-
var OPTIMISM = {
|
|
1046
|
-
assets: [
|
|
1047
|
-
{
|
|
1048
|
-
name: "USDC",
|
|
1049
|
-
decimals: 6,
|
|
1050
|
-
address: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
1051
|
-
coingeckoId: "usd-coin"
|
|
1052
|
-
},
|
|
1053
|
-
{
|
|
1054
|
-
name: "USDT",
|
|
1055
|
-
decimals: 6,
|
|
1056
|
-
address: "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",
|
|
1057
|
-
coingeckoId: "tether"
|
|
1058
|
-
},
|
|
1059
|
-
{
|
|
1060
|
-
name: "OP",
|
|
1061
|
-
decimals: 18,
|
|
1062
|
-
address: "0x4200000000000000000000000000000000000042",
|
|
1063
|
-
coingeckoId: "optimism"
|
|
1064
|
-
},
|
|
1065
|
-
{
|
|
1066
|
-
name: "ETH",
|
|
1067
|
-
decimals: 18,
|
|
1068
|
-
address: "0x0000000000000000000000000000000000000000",
|
|
1069
|
-
coingeckoId: "ethereum"
|
|
1070
|
-
}
|
|
1071
|
-
],
|
|
1072
|
-
evm: {
|
|
1073
|
-
chain: chains.optimism,
|
|
1074
|
-
rpcUrl: "https://opt-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN",
|
|
1075
|
-
supports7702: false,
|
|
1076
|
-
erc4337: false
|
|
1077
|
-
},
|
|
1078
|
-
crossChainInformation: {
|
|
1079
|
-
circleInformation: {
|
|
1080
|
-
supportCirclePaymaster: true,
|
|
1081
|
-
cCTPInformation: {
|
|
1082
|
-
supportCCTP: true,
|
|
1083
|
-
domain: 2
|
|
1084
|
-
},
|
|
1085
|
-
aproxFromFee: 0
|
|
1086
|
-
},
|
|
1087
|
-
nearIntentInformation: {
|
|
1088
|
-
support: true,
|
|
1089
|
-
assetsId: [
|
|
1090
|
-
{
|
|
1091
|
-
assetId: "nep245:v2_1.omni.hot.tg:10_A2ewyUyDp6qsue1jqZsGypkCxRJ",
|
|
1092
|
-
name: "USDC",
|
|
1093
|
-
decimals: 6
|
|
1094
|
-
},
|
|
1095
|
-
{
|
|
1096
|
-
assetId: "nep245:v2_1.omni.hot.tg:10_359RPSJVdTxwTJT9TyGssr2rFoWo",
|
|
1097
|
-
name: "USDT",
|
|
1098
|
-
decimals: 6
|
|
1099
|
-
},
|
|
1100
|
-
{
|
|
1101
|
-
assetId: "nep245:v2_1.omni.hot.tg:10_vLAiSt9KfUGKpw5cD3vsSyNYBo7",
|
|
1102
|
-
name: "OP",
|
|
1103
|
-
decimals: 18
|
|
1104
|
-
},
|
|
1105
|
-
{
|
|
1106
|
-
assetId: "nep245:v2_1.omni.hot.tg:10_11111111111111111111",
|
|
1107
|
-
name: "ETH",
|
|
1108
|
-
decimals: 18
|
|
1109
|
-
}
|
|
1110
|
-
],
|
|
1111
|
-
needMemo: false
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
};
|
|
1115
1166
|
var ARBITRUM = {
|
|
1116
1167
|
assets: [
|
|
1117
1168
|
{
|
|
@@ -1182,54 +1233,6 @@ var ARBITRUM = {
|
|
|
1182
1233
|
}
|
|
1183
1234
|
}
|
|
1184
1235
|
};
|
|
1185
|
-
var BASE = {
|
|
1186
|
-
assets: [
|
|
1187
|
-
{
|
|
1188
|
-
name: "USDC",
|
|
1189
|
-
decimals: 6,
|
|
1190
|
-
address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
1191
|
-
coingeckoId: "usd-coin"
|
|
1192
|
-
},
|
|
1193
|
-
{
|
|
1194
|
-
name: "ETH",
|
|
1195
|
-
decimals: 18,
|
|
1196
|
-
address: "0x0000000000000000000000000000000000000000",
|
|
1197
|
-
coingeckoId: "ethereum"
|
|
1198
|
-
}
|
|
1199
|
-
],
|
|
1200
|
-
evm: {
|
|
1201
|
-
chain: chains.base,
|
|
1202
|
-
rpcUrl: "https://base-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN",
|
|
1203
|
-
supports7702: true,
|
|
1204
|
-
erc4337: false
|
|
1205
|
-
},
|
|
1206
|
-
crossChainInformation: {
|
|
1207
|
-
circleInformation: {
|
|
1208
|
-
supportCirclePaymaster: true,
|
|
1209
|
-
cCTPInformation: {
|
|
1210
|
-
supportCCTP: true,
|
|
1211
|
-
domain: 6
|
|
1212
|
-
},
|
|
1213
|
-
aproxFromFee: 0
|
|
1214
|
-
},
|
|
1215
|
-
nearIntentInformation: {
|
|
1216
|
-
support: true,
|
|
1217
|
-
assetsId: [
|
|
1218
|
-
{
|
|
1219
|
-
assetId: "nep141:base-0x833589fcd6edb6e08f4c7c32d4f71b54bda02913.omft.near",
|
|
1220
|
-
name: "USDC",
|
|
1221
|
-
decimals: 6
|
|
1222
|
-
},
|
|
1223
|
-
{
|
|
1224
|
-
assetId: "nep141:base.omft.near",
|
|
1225
|
-
name: "ETH",
|
|
1226
|
-
decimals: 18
|
|
1227
|
-
}
|
|
1228
|
-
],
|
|
1229
|
-
needMemo: false
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
};
|
|
1233
1236
|
var UNICHAIN = {
|
|
1234
1237
|
assets: [
|
|
1235
1238
|
{
|
|
@@ -1565,98 +1568,6 @@ var BNB = {
|
|
|
1565
1568
|
}
|
|
1566
1569
|
}
|
|
1567
1570
|
};
|
|
1568
|
-
var GNOSIS = {
|
|
1569
|
-
assets: [
|
|
1570
|
-
{
|
|
1571
|
-
name: "USDC",
|
|
1572
|
-
decimals: 6,
|
|
1573
|
-
address: "0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0",
|
|
1574
|
-
coingeckoId: "usd-coin"
|
|
1575
|
-
},
|
|
1576
|
-
{
|
|
1577
|
-
name: "USDT",
|
|
1578
|
-
decimals: 6,
|
|
1579
|
-
address: "0x4ECaBa5870353805a9F068101A40E0f32ed605C6",
|
|
1580
|
-
coingeckoId: "tether"
|
|
1581
|
-
},
|
|
1582
|
-
{
|
|
1583
|
-
name: "EURe",
|
|
1584
|
-
decimals: 18,
|
|
1585
|
-
address: "0x420CA0f9B9b604cE0fd9C18EF134C705e5Fa3430",
|
|
1586
|
-
coingeckoId: "monerium-eur-money"
|
|
1587
|
-
},
|
|
1588
|
-
{
|
|
1589
|
-
name: "GNO",
|
|
1590
|
-
decimals: 18,
|
|
1591
|
-
address: "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb",
|
|
1592
|
-
coingeckoId: "gnosis"
|
|
1593
|
-
},
|
|
1594
|
-
{
|
|
1595
|
-
name: "WETH",
|
|
1596
|
-
decimals: 18,
|
|
1597
|
-
address: "0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",
|
|
1598
|
-
coingeckoId: "ethereum"
|
|
1599
|
-
},
|
|
1600
|
-
{
|
|
1601
|
-
name: "XDAI",
|
|
1602
|
-
decimals: 18,
|
|
1603
|
-
address: "0x0000000000000000000000000000000000000000",
|
|
1604
|
-
coingeckoId: "xdai"
|
|
1605
|
-
}
|
|
1606
|
-
],
|
|
1607
|
-
evm: {
|
|
1608
|
-
chain: chains.gnosis,
|
|
1609
|
-
rpcUrl: chains.gnosis.rpcUrls.default.http[0],
|
|
1610
|
-
supports7702: true,
|
|
1611
|
-
erc4337: true
|
|
1612
|
-
},
|
|
1613
|
-
crossChainInformation: {
|
|
1614
|
-
circleInformation: {
|
|
1615
|
-
supportCirclePaymaster: false,
|
|
1616
|
-
aproxFromFee: 0,
|
|
1617
|
-
cCTPInformation: {
|
|
1618
|
-
supportCCTP: false,
|
|
1619
|
-
domain: 0
|
|
1620
|
-
}
|
|
1621
|
-
},
|
|
1622
|
-
nearIntentInformation: {
|
|
1623
|
-
support: true,
|
|
1624
|
-
assetsId: [
|
|
1625
|
-
{
|
|
1626
|
-
assetId: "nep141:gnosis-0x2a22f9c3b484c3629090feed35f17ff8f88f76f0.omft.near",
|
|
1627
|
-
name: "USDC",
|
|
1628
|
-
decimals: 6
|
|
1629
|
-
},
|
|
1630
|
-
{
|
|
1631
|
-
assetId: "nep141:gnosis-0x4ecaba5870353805a9f068101a40e0f32ed605c6.omft.near",
|
|
1632
|
-
name: "USDT",
|
|
1633
|
-
decimals: 6
|
|
1634
|
-
},
|
|
1635
|
-
{
|
|
1636
|
-
assetId: "nep141:gnosis-0x420ca0f9b9b604ce0fd9c18ef134c705e5fa3430.omft.near",
|
|
1637
|
-
name: "EURe",
|
|
1638
|
-
decimals: 18
|
|
1639
|
-
},
|
|
1640
|
-
{
|
|
1641
|
-
assetId: "nep141:gnosis-0x9c58bacc331c9aa871afd802db6379a98e80cedb.omft.near",
|
|
1642
|
-
name: "GNO",
|
|
1643
|
-
decimals: 18
|
|
1644
|
-
},
|
|
1645
|
-
{
|
|
1646
|
-
assetId: "nep141:gnosis-0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1.omft.near",
|
|
1647
|
-
name: "WETH",
|
|
1648
|
-
decimals: 18
|
|
1649
|
-
},
|
|
1650
|
-
{
|
|
1651
|
-
assetId: "nep141:gnosis.omft.near",
|
|
1652
|
-
name: "XDAI",
|
|
1653
|
-
decimals: 18
|
|
1654
|
-
}
|
|
1655
|
-
],
|
|
1656
|
-
needMemo: false
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
|
-
};
|
|
1660
1571
|
|
|
1661
1572
|
// src/constants/chainsInformation.ts
|
|
1662
1573
|
var NETWORKS = {
|
|
@@ -2149,7 +2060,7 @@ var TransferManager = class {
|
|
|
2149
2060
|
|
|
2150
2061
|
exports.AccountAbstraction = AccountAbstraction;
|
|
2151
2062
|
exports.BASE_MAINNET = BASE_MAINNET;
|
|
2152
|
-
exports.BASE_SEPOLIA =
|
|
2063
|
+
exports.BASE_SEPOLIA = BASE_SEPOLIA2;
|
|
2153
2064
|
exports.BundlerClient = BundlerClient;
|
|
2154
2065
|
exports.CCTPStrategy = CCTPStrategy;
|
|
2155
2066
|
exports.CHAIN_CONFIGS = CHAIN_CONFIGS;
|