@funkit/core 2.2.8 → 2.3.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.
@@ -3,7 +3,7 @@ import type { Auth } from '../auth';
3
3
  import type { TransactionParams } from '../common';
4
4
  import type { EnvOption } from '../config';
5
5
  import { Chain, type Operation } from '../data';
6
- import type { AddOwnerParams, AddUserToGroupParams, ApproveParams, BridgeParams, CreateGroupParams, FinishUnstakeParams, LimitOrderParam, RemoveGroupParams, RemoveOwnerParams, RemoveUserFromGroupParams, RequestUnstakeParams, SessionKeyParams, StakeParams, SwapParams, TransferParams, UpdateThresholdOfGroupParams } from './types';
6
+ import type { AddOwnerParams, AddUserToGroupParams, ApproveParams, CreateGroupParams, FinishUnstakeParams, RemoveGroupParams, RemoveOwnerParams, RemoveUserFromGroupParams, RequestUnstakeParams, SessionKeyParams, StakeParams, TransferParams, UpdateThresholdOfGroupParams } from './types';
7
7
  export declare abstract class FirstClassActions {
8
8
  protected chain: Chain;
9
9
  constructor(chain: Chain);
@@ -22,25 +22,6 @@ export declare abstract class FirstClassActions {
22
22
  * @returns {Promise<Address>} The wallet address.
23
23
  */
24
24
  abstract getAddress(): Promise<Address>;
25
- bridge(auth: Auth, userId: string, params: BridgeParams, txOptions?: EnvOption): Promise<Operation>;
26
- /**
27
- * Initiates a swap operation and returns the prepared operation for execution.
28
- * @param {Auth} auth - The authentication instance for the user.
29
- * @param {string} userId - The ID of the user initiating the swap.
30
- * @param {SwapParams} params - The parameters for the swap operation.
31
- * @param {EnvOption} txOptions - Transaction environment options (default: global environment options).
32
- * @returns {Promise<Operation>} The prepared swap operation.
33
- */
34
- swap(auth: Auth, userId: string, params: SwapParams, txOptions?: EnvOption): Promise<Operation>;
35
- /**
36
- * Initiates a limit swap order operation and returns the prepared operation for execution.
37
- * @param {Auth} auth - The authentication instance for the user.
38
- * @param {string} userId - The ID of the user initiating the limit swap order.
39
- * @param {LimitOrderParam} params - The parameters for the limit swap order.
40
- * @param {EnvOption} txOptions - Transaction environment options (default: global environment options).
41
- * @returns {Promise<Operation>} The prepared limit swap order operation.
42
- */
43
- limitSwapOrder(auth: Auth, userId: string, params: LimitOrderParam, txOptions?: EnvOption): Promise<Operation>;
44
25
  /**
45
26
  * Initiates a transfer operation and returns the prepared operation for execution.
46
27
  * @param {Auth} auth - The authentication instance for the user.
@@ -2,6 +2,5 @@ export * from './AccessControl';
2
2
  export * from './BatchActions';
3
3
  export * from './Group';
4
4
  export * from './Stake';
5
- export * from './Swap';
6
5
  export * from './Token';
7
6
  export * from './types';
@@ -1,8 +1,4 @@
1
- export * from './ContractApis';
2
- export * from './GroupApis';
3
1
  export * from './InfoApis';
4
- export * from './NFTApis';
5
2
  export * from './OperationApis';
6
- export * from './PaymasterApis';
7
3
  export * from './types';
8
4
  export * from './UserApis';
@@ -6,13 +6,6 @@ export type Wallet = {
6
6
  walletAddr: Address;
7
7
  userIds: Hex[];
8
8
  };
9
- export type GroupMetadata = {
10
- groupId: Hex;
11
- chainId: string;
12
- threshold: number;
13
- walletAddr: Address;
14
- memberIds: Hex[];
15
- };
16
9
  export type ExecuteOpInput = {
17
10
  opId: Hex;
18
11
  chainId: string;
@@ -1,9 +1,8 @@
1
1
  import { type Hex } from 'viem';
2
2
  import { ContractInterface } from '../viem/ContractInterface';
3
3
  export declare const LOCAL_API_URL = "http://127.0.0.1:3000";
4
- declare let API_URL: string;
4
+ declare const API_URL: string;
5
5
  export { API_URL };
6
- export declare const DASHBOARD_API_URL = "https://api.fun.xyz/dashboard";
7
6
  export declare const BASE_WRAP_TOKEN_ADDR: {
8
7
  '1': {
9
8
  weth: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
@@ -727,107 +726,6 @@ export declare const ERC_721_ABI: ({
727
726
  type: string;
728
727
  anonymous?: undefined;
729
728
  })[];
730
- export declare const UNISWAP_V3_LIMIT_ORDER_ABI: ({
731
- inputs: {
732
- internalType: string;
733
- name: string;
734
- type: string;
735
- }[];
736
- stateMutability: string;
737
- type: string;
738
- name?: undefined;
739
- outputs?: undefined;
740
- } | {
741
- inputs: {
742
- internalType: string;
743
- name: string;
744
- type: string;
745
- }[];
746
- name: string;
747
- outputs: {
748
- internalType: string;
749
- name: string;
750
- type: string;
751
- }[];
752
- stateMutability: string;
753
- type: string;
754
- })[];
755
- export declare const UNISWAPV2FACTORY_ABI: ({
756
- inputs: {
757
- internalType: string;
758
- name: string;
759
- type: string;
760
- }[];
761
- payable: boolean;
762
- stateMutability: string;
763
- type: string;
764
- anonymous?: undefined;
765
- name?: undefined;
766
- constant?: undefined;
767
- outputs?: undefined;
768
- } | {
769
- anonymous: boolean;
770
- inputs: {
771
- indexed: boolean;
772
- internalType: string;
773
- name: string;
774
- type: string;
775
- }[];
776
- name: string;
777
- type: string;
778
- payable?: undefined;
779
- stateMutability?: undefined;
780
- constant?: undefined;
781
- outputs?: undefined;
782
- } | {
783
- constant: boolean;
784
- inputs: {
785
- internalType: string;
786
- name: string;
787
- type: string;
788
- }[];
789
- name: string;
790
- outputs: {
791
- internalType: string;
792
- name: string;
793
- type: string;
794
- }[];
795
- payable: boolean;
796
- stateMutability: string;
797
- type: string;
798
- anonymous?: undefined;
799
- })[];
800
- export declare const UNISWAPV2ROUTER02_ABI: ({
801
- inputs: {
802
- internalType: string;
803
- name: string;
804
- type: string;
805
- }[];
806
- stateMutability: string;
807
- type: string;
808
- name?: undefined;
809
- outputs?: undefined;
810
- } | {
811
- inputs: {
812
- internalType: string;
813
- name: string;
814
- type: string;
815
- }[];
816
- name: string;
817
- outputs: {
818
- internalType: string;
819
- name: string;
820
- type: string;
821
- }[];
822
- stateMutability: string;
823
- type: string;
824
- } | {
825
- stateMutability: string;
826
- type: string;
827
- inputs?: undefined;
828
- name?: undefined;
829
- outputs?: undefined;
830
- })[];
831
729
  export declare const ROLE_BASED_ACCESS_CONTROL_ABI: ({
832
730
  anonymous: boolean;
833
731
  inputs: ({
@@ -1004,13 +902,9 @@ export declare const GASLESS_PAYMASTER_CONTRACT_INTERFACE: ContractInterface;
1004
902
  export declare const TOKEN_PAYMASTER_CONTRACT_INTERFACE: ContractInterface;
1005
903
  export declare const CHECKOUT_PAYMASTER_CONTRACT_INTERFACE: ContractInterface;
1006
904
  export declare const WALLET_CONTRACT_INTERFACE: ContractInterface;
1007
- export declare const POOL_CONTRACT_INTERFACE: ContractInterface;
1008
905
  export declare const APPROVE_AND_EXEC_CONTRACT_INTERFACE: ContractInterface;
1009
- export declare const UNISWAPV2FACTORY_INTERFACE: ContractInterface;
1010
- export declare const UNISWAPV2ROUTER02_INTERFACE: ContractInterface;
1011
906
  export declare const RBAC_CONTRACT_INTERFACE: ContractInterface;
1012
907
  export declare const USER_AUTHENTICATION_CONTRACT_INTERFACE: ContractInterface;
1013
- export declare const UNISWAP_V3_LIMIT_ORDER_CONTRACT_INTERFACE: ContractInterface;
1014
908
  export declare const CONTRACT_ADDRESSES: {
1015
909
  approveAndExecAddress: {
1016
910
  "1": string;
@@ -1149,54 +1043,6 @@ export declare const CONTRACT_ADDRESSES: {
1149
1043
  "5000": string;
1150
1044
  "534352": string;
1151
1045
  };
1152
- uniswapv3LimitOrder: {
1153
- "1": string;
1154
- "5": string;
1155
- "10": string;
1156
- "137": string;
1157
- "8453": string;
1158
- "36865": string;
1159
- "42161": string;
1160
- };
1161
- univ3factory: {
1162
- "1": string;
1163
- "5": string;
1164
- "10": string;
1165
- "137": string;
1166
- "8453": string;
1167
- "36865": string;
1168
- "42161": string;
1169
- "421614": string;
1170
- };
1171
- univ3quoter: {
1172
- "1": string;
1173
- "5": string;
1174
- "10": string;
1175
- "137": string;
1176
- "8453": string;
1177
- "36865": string;
1178
- "42161": string;
1179
- };
1180
- univ3router: {
1181
- "1": string;
1182
- "5": string;
1183
- "10": string;
1184
- "137": string;
1185
- "8453": string;
1186
- "36865": string;
1187
- "42161": string;
1188
- "421614": string;
1189
- };
1190
- UniswapV2Factory: {
1191
- "5": string;
1192
- "31337": string;
1193
- "36865": string;
1194
- "84531": string;
1195
- };
1196
- UniswapV2Router02: {
1197
- "5": string;
1198
- "36865": string;
1199
- };
1200
1046
  TestNFT: {
1201
1047
  "1": string;
1202
1048
  "5": string;
@@ -1275,6 +1121,8 @@ export declare const STABLECOIN_SYMBOLS: string[];
1275
1121
  /**
1276
1122
  * Info on the supported chains of FunkitConnect
1277
1123
  * Added into coresdk because it is used in here too.
1124
+ *
1125
+ * fallbackRpcUrl: see https://chainlist.org/ for more public RPC endpoints
1278
1126
  */
1279
1127
  export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
1280
1128
  [x: string]: {
@@ -1336,6 +1184,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
1336
1184
  moonpayChainName: string;
1337
1185
  pickPriority: number;
1338
1186
  isStandardEvmAddress: boolean;
1187
+ fallbackRpcUrls: string[];
1339
1188
  coreToken?: undefined;
1340
1189
  } | {
1341
1190
  name: "Base";
@@ -1623,6 +1472,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
1623
1472
  moonpayChainName: string;
1624
1473
  pickPriority: number;
1625
1474
  isStandardEvmAddress: boolean;
1475
+ fallbackRpcUrls: string[];
1626
1476
  coreToken?: undefined;
1627
1477
  } | {
1628
1478
  name: "Polygon";
@@ -1681,6 +1531,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
1681
1531
  moonpayChainName: string;
1682
1532
  pickPriority: number;
1683
1533
  isStandardEvmAddress: boolean;
1534
+ fallbackRpcUrls: string[];
1684
1535
  } | {
1685
1536
  name: string;
1686
1537
  nativeCurrency: {
@@ -1738,6 +1589,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
1738
1589
  moonpayChainName: string;
1739
1590
  pickPriority: number;
1740
1591
  isStandardEvmAddress: boolean;
1592
+ fallbackRpcUrls: string[];
1741
1593
  } | {
1742
1594
  name: "OP Mainnet";
1743
1595
  nativeCurrency: {
@@ -2032,6 +1884,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
2032
1884
  moonpayChainName: string;
2033
1885
  pickPriority: number;
2034
1886
  isStandardEvmAddress: boolean;
1887
+ fallbackRpcUrls: string[];
2035
1888
  } | {
2036
1889
  name: string;
2037
1890
  nativeCurrency: {
@@ -2410,6 +2263,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
2410
2263
  moonpayChainName: string;
2411
2264
  pickPriority: number;
2412
2265
  isStandardEvmAddress: boolean;
2266
+ fallbackRpcUrls: string[];
2413
2267
  } | {
2414
2268
  name: "Mantle";
2415
2269
  nativeCurrency: {
@@ -2467,6 +2321,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
2467
2321
  moonpayChainName: string;
2468
2322
  pickPriority: number;
2469
2323
  isStandardEvmAddress: boolean;
2324
+ fallbackRpcUrls: string[];
2470
2325
  } | {
2471
2326
  name: string;
2472
2327
  nativeCurrency: {
@@ -2520,6 +2375,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
2520
2375
  moonpayChainName: string;
2521
2376
  pickPriority: number;
2522
2377
  isStandardEvmAddress: boolean;
2378
+ fallbackRpcUrls: never[];
2523
2379
  coreToken?: undefined;
2524
2380
  } | {
2525
2381
  name: "Scroll";
@@ -2574,6 +2430,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
2574
2430
  moonpayChainName: string;
2575
2431
  pickPriority: number;
2576
2432
  isStandardEvmAddress: boolean;
2433
+ fallbackRpcUrls: string[];
2577
2434
  coreToken?: undefined;
2578
2435
  } | {
2579
2436
  name: "Goerli";
@@ -2634,6 +2491,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
2634
2491
  moonpayChainName: null;
2635
2492
  pickPriority: number;
2636
2493
  isStandardEvmAddress: boolean;
2494
+ fallbackRpcUrls: never[];
2637
2495
  coreToken?: undefined;
2638
2496
  } | {
2639
2497
  name: "Arbitrum Sepolia";
@@ -2686,44 +2544,12 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
2686
2544
  moonpayChainName: null;
2687
2545
  pickPriority: number;
2688
2546
  isStandardEvmAddress: boolean;
2547
+ fallbackRpcUrls: never[];
2689
2548
  coreToken?: undefined;
2690
2549
  };
2691
2550
  };
2692
2551
  export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_ID_LIST: string[];
2693
2552
  export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO_LIST: ({
2694
- id: number;
2695
- name: string;
2696
- nativeCurrency: {
2697
- symbol: string;
2698
- decimals: number;
2699
- name: string;
2700
- };
2701
- rpcUrls: {
2702
- default: {
2703
- http: string[];
2704
- };
2705
- };
2706
- blockExplorers: {
2707
- default: {
2708
- name: string;
2709
- url: string;
2710
- apiUrl: string;
2711
- };
2712
- };
2713
- contracts: {
2714
- ensRegistry: {
2715
- address: `0x${string}`;
2716
- };
2717
- ensUniversalResolver: {
2718
- address: `0x${string}`;
2719
- blockCreated: number;
2720
- };
2721
- multicall3: {
2722
- address: `0x${string}`;
2723
- blockCreated: number;
2724
- };
2725
- };
2726
- } | {
2727
2553
  blockExplorers: {
2728
2554
  readonly default: {
2729
2555
  readonly name: "Etherscan";
@@ -3746,6 +3572,39 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO_LIST: ({
3746
3572
  fees?: import("viem").ChainFees<undefined> | undefined;
3747
3573
  formatters?: undefined;
3748
3574
  serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
3575
+ } | {
3576
+ id: number;
3577
+ name: string;
3578
+ nativeCurrency: {
3579
+ symbol: string;
3580
+ decimals: number;
3581
+ name: string;
3582
+ };
3583
+ rpcUrls: {
3584
+ default: {
3585
+ http: string[];
3586
+ };
3587
+ };
3588
+ blockExplorers: {
3589
+ default: {
3590
+ name: string;
3591
+ url: string;
3592
+ apiUrl: string;
3593
+ };
3594
+ };
3595
+ contracts: {
3596
+ ensRegistry: {
3597
+ address: `0x${string}`;
3598
+ };
3599
+ ensUniversalResolver: {
3600
+ address: `0x${string}`;
3601
+ blockCreated: number;
3602
+ };
3603
+ multicall3: {
3604
+ address: `0x${string}`;
3605
+ blockCreated: number;
3606
+ };
3607
+ };
3749
3608
  } | {
3750
3609
  blockExplorers: {
3751
3610
  readonly default: {
@@ -3852,39 +3711,6 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO_LIST: ({
3852
3711
  serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
3853
3712
  })[];
3854
3713
  export declare const FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST: ({
3855
- id: number;
3856
- name: string;
3857
- nativeCurrency: {
3858
- symbol: string;
3859
- decimals: number;
3860
- name: string;
3861
- };
3862
- rpcUrls: {
3863
- default: {
3864
- http: string[];
3865
- };
3866
- };
3867
- blockExplorers: {
3868
- default: {
3869
- name: string;
3870
- url: string;
3871
- apiUrl: string;
3872
- };
3873
- };
3874
- contracts: {
3875
- ensRegistry: {
3876
- address: `0x${string}`;
3877
- };
3878
- ensUniversalResolver: {
3879
- address: `0x${string}`;
3880
- blockCreated: number;
3881
- };
3882
- multicall3: {
3883
- address: `0x${string}`;
3884
- blockCreated: number;
3885
- };
3886
- };
3887
- } | {
3888
3714
  blockExplorers: {
3889
3715
  readonly default: {
3890
3716
  readonly name: "Etherscan";
@@ -4907,6 +4733,39 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST: ({
4907
4733
  fees?: import("viem").ChainFees<undefined> | undefined;
4908
4734
  formatters?: undefined;
4909
4735
  serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
4736
+ } | {
4737
+ id: number;
4738
+ name: string;
4739
+ nativeCurrency: {
4740
+ symbol: string;
4741
+ decimals: number;
4742
+ name: string;
4743
+ };
4744
+ rpcUrls: {
4745
+ default: {
4746
+ http: string[];
4747
+ };
4748
+ };
4749
+ blockExplorers: {
4750
+ default: {
4751
+ name: string;
4752
+ url: string;
4753
+ apiUrl: string;
4754
+ };
4755
+ };
4756
+ contracts: {
4757
+ ensRegistry: {
4758
+ address: `0x${string}`;
4759
+ };
4760
+ ensUniversalResolver: {
4761
+ address: `0x${string}`;
4762
+ blockCreated: number;
4763
+ };
4764
+ multicall3: {
4765
+ address: `0x${string}`;
4766
+ blockCreated: number;
4767
+ };
4768
+ };
4910
4769
  } | {
4911
4770
  blockExplorers: {
4912
4771
  readonly default: {
@@ -0,0 +1,4 @@
1
+ import { ClientError } from '@funkit/utils';
2
+ export declare class InvalidActionError extends ClientError {
3
+ constructor(code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
4
+ }
@@ -1,4 +1 @@
1
- export * from './BaseError';
2
- export * from './ClientError';
3
- export * from './ServerError';
4
- export * from './types';
1
+ export * from './clientErrors';
@@ -1,8 +1,8 @@
1
1
  import type { Address } from 'viem';
2
+ import type { PaymasterType } from '@funkit/api-base';
2
3
  import type { TransactionParams } from '../common';
3
4
  import type { EnvOption } from '../config';
4
5
  import type { ContractInterface } from '../viem/ContractInterface';
5
- import type { PaymasterType } from './types';
6
6
  export declare abstract class Sponsor {
7
7
  sponsorAddress?: Address;
8
8
  contractInterface: ContractInterface;
@@ -4,7 +4,7 @@ import { type TransactionParams } from '../common';
4
4
  import type { EnvOption } from '../config';
5
5
  import { type Operation } from '../data';
6
6
  import { Sponsor } from './Sponsor';
7
- import { type AllTokenData } from './types';
7
+ import type { AllTokenData } from './types';
8
8
  export declare class TokenSponsor extends Sponsor {
9
9
  token: string;
10
10
  constructor(options?: EnvOption);
@@ -1,9 +1,3 @@
1
- export declare enum PaymasterType {
2
- BaseSponsor = "base",
3
- GaslessSponsor = "gasless",
4
- TokenSponsor = "token",
5
- CheckoutSponsor = "checkout"
6
- }
7
1
  export interface AllTokenData {
8
2
  unlockBlock: bigint;
9
3
  tokenAmount: bigint;
@@ -1,3 +1,3 @@
1
+ import { PaymasterType } from '@funkit/api-base';
1
2
  import type { EnvOption } from '../config';
2
- import { PaymasterType } from '../sponsors/types';
3
3
  export declare const getPaymasterType: (txOptions: EnvOption) => PaymasterType.GaslessSponsor | PaymasterType.TokenSponsor | PaymasterType.CheckoutSponsor;
@@ -3,6 +3,5 @@ export * from './AuthUtils';
3
3
  export * from './ChainUtils';
4
4
  export * from './CheckoutUtils';
5
5
  export * from './PaymasterUtils';
6
- export * from './SwapUtils';
7
6
  export * from './UserOpUtils';
8
7
  export * from './WalletUtils';
@@ -1,4 +1,3 @@
1
- import { type MoonpayCurrency } from '@funkit/api-base';
2
1
  import { type Address, type Hex } from 'viem';
3
2
  import { FirstClassActions } from '../actions/FirstClassActions';
4
3
  import type { Auth } from '../auth';
@@ -110,24 +109,6 @@ export declare class FunWallet extends FirstClassActions {
110
109
  * @returns A Promise that resolves when the wallet is saved to the authentication system.
111
110
  */
112
111
  saveWalletToAuth(auth: Auth, txOptions?: EnvOption): Promise<void>;
113
- /**
114
- * Generates an on-ramp URL for the account address.
115
- * @param {Address} address - The account address (optional, defaults to the wallet's address).
116
- * @param {string} currencyCode - The currency code (optional, defaults to undefined to allow users to select).
117
- * @returns {Promise<string>} The on-ramp URL.
118
- */
119
- onRamp(address?: Address, currencyCode?: string): Promise<string>;
120
- /**
121
- * Generates an off-ramp URL for the account address.
122
- * @param {Address} address - The account address (optional, defaults to the wallet's address).
123
- * @returns {Promise<string>} The off-ramp URL.
124
- */
125
- offRamp(address?: Address): Promise<string>;
126
- /**
127
- * Retrieves the supported currencies for on-ramp.
128
- * @returns {Promise<MoonpayCurrency[]>} The supported currencies.
129
- */
130
- getSupportedCurrencies(): Promise<MoonpayCurrency[]>;
131
112
  /**
132
113
  * Creates a new operation to be associated with the wallet and prepares it for execution.
133
114
  * @param {Auth} auth - The authentication instance for the user.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/core",
3
- "version": "2.2.8",
3
+ "version": "2.3.0",
4
4
  "description": "Funkit core SDK provides feature-rich and extensible smart wallets built on account abstraction",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,20 +16,18 @@
16
16
  "@ethersproject/contracts": "^5.7.0",
17
17
  "@ethersproject/providers": "^5.7.2",
18
18
  "@lifeomic/attempt": "^3.0.3",
19
- "@uniswap/sdk": "^3.0.3",
20
- "@uniswap/sdk-core": "^4.2.0",
21
- "@uniswap/v3-sdk": "^3.11.0",
22
19
  "abitype": "^0.10.2",
23
20
  "big.js": "^6.2.1",
24
21
  "dotenv": "^16.0.3",
25
22
  "ethers": "5.7.2",
26
23
  "uuid": "^9.0.0",
27
24
  "viem": "2.17.0",
28
- "@funkit/api-base": "1.4.1"
25
+ "@funkit/utils": "1.0.3",
26
+ "@funkit/api-base": "1.5.0"
29
27
  },
30
28
  "devDependencies": {
31
29
  "@types/big.js": "^6.2.2",
32
- "@types/chai": "^4.3.5",
30
+ "@types/chai": "^5.0.1",
33
31
  "@types/mocha": "^10.0.1",
34
32
  "@types/uuid": "^9.0.1",
35
33
  "chai": "^5.1.1",
@@ -69,15 +67,15 @@
69
67
  "test-tenderly": "ts-mocha --exit tests/tenderly/*.ts",
70
68
  "test-aws": "env ts-mocha",
71
69
  "test-goerli": "env ts-mocha --exit tests/goerli/*.ts",
72
- "local-test-tenderly": "env NODE_ENV=local ts-mocha --exit tests/tenderly/*.ts",
73
- "local-test-goerli": "env NODE_ENV=local ts-mocha --exit tests/goerli/*.ts",
74
- "staging-test-tenderly": "env NODE_ENV=staging ts-mocha --exit tests/tenderly/*.ts",
75
- "staging-test-goerli": "env NODE_ENV=staging ts-mocha --exit tests/goerli/*.ts",
76
- "staging-test-arbitrum": "env NODE_ENV=staging ts-mocha --exit tests/arbitrum/*.ts",
77
- "staging-test-mantle": "env NODE_ENV=staging ts-mocha --exit tests/mantle/*.ts",
78
- "staging-test-optimism": "env NODE_ENV=staging ts-mocha --exit tests/optimism/*.ts",
79
- "staging-test-polygon": "env NODE_ENV=staging ts-mocha --exit tests/polygon/*.ts",
80
- "staging-test-scroll": "env NODE_ENV=staging ts-mocha --exit tests/scroll/factory.ts",
70
+ "local-test-tenderly": "env API_BASE_URL=http://127.0.0.1:3000 ts-mocha --exit tests/tenderly/*.ts",
71
+ "local-test-goerli": "env API_BASE_URL=http://127.0.0.1:3000 ts-mocha --exit tests/goerli/*.ts",
72
+ "staging-test-tenderly": "env API_BASE_URL=https://api.fun.xyz/staging/v1 ts-mocha --exit tests/tenderly/*.ts",
73
+ "staging-test-goerli": "env API_BASE_URL=https://api.fun.xyz/staging/v1 ts-mocha --exit tests/goerli/*.ts",
74
+ "staging-test-arbitrum": "env API_BASE_URL=https://api.fun.xyz/staging/v1 ts-mocha --exit tests/arbitrum/*.ts",
75
+ "staging-test-mantle": "env API_BASE_URL=https://api.fun.xyz/staging/v1 ts-mocha --exit tests/mantle/*.ts",
76
+ "staging-test-optimism": "env API_BASE_URL=https://api.fun.xyz/staging/v1 ts-mocha --exit tests/optimism/*.ts",
77
+ "staging-test-polygon": "env API_BASE_URL=https://api.fun.xyz/staging/v1 ts-mocha --exit tests/polygon/*.ts",
78
+ "staging-test-scroll": "env API_BASE_URL=https://api.fun.xyz/staging/v1 ts-mocha --exit tests/scroll/factory.ts",
81
79
  "load": "node test/loader.js",
82
80
  "lint": "biome check",
83
81
  "lint:fix": "biome check --fix",
@@ -1,5 +0,0 @@
1
- import type { Address } from 'viem';
2
- import { type TransactionParams } from '../common';
3
- import { Chain } from '../data';
4
- import { type BridgeParams } from './types';
5
- export declare const bridgeTransactionParams: (params: BridgeParams, walletAddress: Address, chain: Chain) => Promise<TransactionParams>;
@@ -1,4 +0,0 @@
1
- import { type TransactionParams } from '../common';
2
- import { type Chain } from '../data';
3
- import type { LimitOrderParam } from './types';
4
- export declare const limitSwapOrderTransactionParams: (params: LimitOrderParam, chain: Chain) => Promise<TransactionParams>;
@@ -1,9 +0,0 @@
1
- import { type Address } from 'viem';
2
- import { type TransactionParams } from '../common';
3
- import type { EnvOption } from '../config';
4
- import { type SwapParams } from './types';
5
- export declare const oneInchSupported: number[];
6
- export declare const uniswapV3Supported: number[];
7
- export declare const oneInchTransactionParams: (params: SwapParams, walletAddress: Address, txOptions?: EnvOption) => Promise<TransactionParams>;
8
- export declare const uniswapV3SwapTransactionParams: (params: SwapParams, txOptions?: EnvOption) => Promise<TransactionParams>;
9
- export declare const uniswapV2SwapTransactionParams: (params: SwapParams, txOptions?: EnvOption) => Promise<TransactionParams>;
@@ -1,5 +0,0 @@
1
- import type { Address, Hex } from 'viem';
2
- export declare function initializeWalletAccess(walletAddr: Address, creatorAddr: Address): Promise<void>;
3
- export declare function checkWalletAccessInitialization(walletAddr: Address): Promise<boolean>;
4
- export declare function addAccessToWallet(walletAddr: Address, nonce: number, signature: Hex): Promise<void>;
5
- export declare function addAccessToUser(authId: string, nonce: number, signature: Hex): Promise<void>;