@funkit/core 2.2.9 → 2.3.1
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.ts +0 -1
- package/dist/index.js +3302 -6210
- package/dist/index.js.map +4 -4
- package/dist/src/actions/FirstClassActions.d.ts +1 -20
- package/dist/src/actions/index.d.ts +0 -1
- package/dist/src/auth/Auth.d.ts +1 -1
- package/dist/src/common/constants.d.ts +80 -223
- package/dist/src/common/types.d.ts +0 -7
- package/dist/src/data/Chain.d.ts +2 -3
- package/dist/src/data/Operation.d.ts +1 -4
- package/dist/src/data/types.d.ts +0 -58
- package/dist/src/sponsors/Sponsor.d.ts +1 -1
- package/dist/src/sponsors/TokenSponsor.d.ts +1 -1
- package/dist/src/sponsors/types.d.ts +0 -6
- package/dist/src/utils/ChainUtils.d.ts +1 -1
- package/dist/src/utils/GroupUtils.d.ts +1 -1
- package/dist/src/utils/PaymasterUtils.d.ts +1 -1
- package/dist/src/utils/TokenUtils.d.ts +1 -0
- package/dist/src/utils/UserOpUtils.d.ts +2 -1
- package/dist/src/utils/WalletUtils.d.ts +2 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/wallet/FunWallet.d.ts +8 -7
- package/dist/src/wallet/types.d.ts +1 -4
- package/package.json +12 -25
- package/dist/src/actions/Bridge.d.ts +0 -5
- package/dist/src/actions/LimitOrder.d.ts +0 -4
- package/dist/src/actions/Swap.d.ts +0 -9
- package/dist/src/apis/AccessControlApis.d.ts +0 -5
- package/dist/src/apis/BridgeApis.d.ts +0 -5
- package/dist/src/apis/ContractApis.d.ts +0 -1
- package/dist/src/apis/GroupApis.d.ts +0 -4
- package/dist/src/apis/InfoApis.d.ts +0 -6
- package/dist/src/apis/ListenerApis.d.ts +0 -3
- package/dist/src/apis/NFTApis.d.ts +0 -22
- package/dist/src/apis/OperationApis.d.ts +0 -15
- package/dist/src/apis/PaymasterApis.d.ts +0 -10
- package/dist/src/apis/SwapApis.d.ts +0 -4
- package/dist/src/apis/UserApis.d.ts +0 -9
- package/dist/src/apis/index.d.ts +0 -8
- package/dist/src/apis/types.d.ts +0 -49
- package/dist/src/utils/SwapUtils.d.ts +0 -33
|
@@ -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,
|
|
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.
|
package/dist/src/auth/Auth.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Address, type Hex, type JsonRpcAccount, type PrivateKeyAccount, type TransactionReceipt, type WalletClient } from 'viem';
|
|
2
|
-
import type
|
|
2
|
+
import { type Wallet } from '@funkit/api-base';
|
|
3
3
|
import { type TransactionData, type TransactionParams } from '../common';
|
|
4
4
|
import type { EnvOption } from '../config';
|
|
5
5
|
import { Chain, type Operation } from '../data';
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { type Hex } from 'viem';
|
|
2
2
|
import { ContractInterface } from '../viem/ContractInterface';
|
|
3
|
-
export declare const LOCAL_API_URL = "http://127.0.0.1:3000";
|
|
4
|
-
declare let API_URL: string;
|
|
5
|
-
export { API_URL };
|
|
6
|
-
export declare const DASHBOARD_API_URL = "https://api.fun.xyz/dashboard";
|
|
7
3
|
export declare const BASE_WRAP_TOKEN_ADDR: {
|
|
8
4
|
'1': {
|
|
9
5
|
weth: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
|
|
@@ -16,6 +12,7 @@ export declare const BASE_WRAP_TOKEN_ADDR: {
|
|
|
16
12
|
};
|
|
17
13
|
'137': {
|
|
18
14
|
wmatic: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270";
|
|
15
|
+
wpol: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270";
|
|
19
16
|
};
|
|
20
17
|
'5000': {
|
|
21
18
|
weth: "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111";
|
|
@@ -727,107 +724,6 @@ export declare const ERC_721_ABI: ({
|
|
|
727
724
|
type: string;
|
|
728
725
|
anonymous?: undefined;
|
|
729
726
|
})[];
|
|
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
727
|
export declare const ROLE_BASED_ACCESS_CONTROL_ABI: ({
|
|
832
728
|
anonymous: boolean;
|
|
833
729
|
inputs: ({
|
|
@@ -1004,13 +900,9 @@ export declare const GASLESS_PAYMASTER_CONTRACT_INTERFACE: ContractInterface;
|
|
|
1004
900
|
export declare const TOKEN_PAYMASTER_CONTRACT_INTERFACE: ContractInterface;
|
|
1005
901
|
export declare const CHECKOUT_PAYMASTER_CONTRACT_INTERFACE: ContractInterface;
|
|
1006
902
|
export declare const WALLET_CONTRACT_INTERFACE: ContractInterface;
|
|
1007
|
-
export declare const POOL_CONTRACT_INTERFACE: ContractInterface;
|
|
1008
903
|
export declare const APPROVE_AND_EXEC_CONTRACT_INTERFACE: ContractInterface;
|
|
1009
|
-
export declare const UNISWAPV2FACTORY_INTERFACE: ContractInterface;
|
|
1010
|
-
export declare const UNISWAPV2ROUTER02_INTERFACE: ContractInterface;
|
|
1011
904
|
export declare const RBAC_CONTRACT_INTERFACE: ContractInterface;
|
|
1012
905
|
export declare const USER_AUTHENTICATION_CONTRACT_INTERFACE: ContractInterface;
|
|
1013
|
-
export declare const UNISWAP_V3_LIMIT_ORDER_CONTRACT_INTERFACE: ContractInterface;
|
|
1014
906
|
export declare const CONTRACT_ADDRESSES: {
|
|
1015
907
|
approveAndExecAddress: {
|
|
1016
908
|
"1": string;
|
|
@@ -1149,54 +1041,6 @@ export declare const CONTRACT_ADDRESSES: {
|
|
|
1149
1041
|
"5000": string;
|
|
1150
1042
|
"534352": string;
|
|
1151
1043
|
};
|
|
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
1044
|
TestNFT: {
|
|
1201
1045
|
"1": string;
|
|
1202
1046
|
"5": string;
|
|
@@ -1275,6 +1119,8 @@ export declare const STABLECOIN_SYMBOLS: string[];
|
|
|
1275
1119
|
/**
|
|
1276
1120
|
* Info on the supported chains of FunkitConnect
|
|
1277
1121
|
* Added into coresdk because it is used in here too.
|
|
1122
|
+
*
|
|
1123
|
+
* fallbackRpcUrl: see https://chainlist.org/ for more public RPC endpoints
|
|
1278
1124
|
*/
|
|
1279
1125
|
export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
1280
1126
|
[x: string]: {
|
|
@@ -1336,6 +1182,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
1336
1182
|
moonpayChainName: string;
|
|
1337
1183
|
pickPriority: number;
|
|
1338
1184
|
isStandardEvmAddress: boolean;
|
|
1185
|
+
fallbackRpcUrls: string[];
|
|
1339
1186
|
coreToken?: undefined;
|
|
1340
1187
|
} | {
|
|
1341
1188
|
name: "Base";
|
|
@@ -1623,6 +1470,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
1623
1470
|
moonpayChainName: string;
|
|
1624
1471
|
pickPriority: number;
|
|
1625
1472
|
isStandardEvmAddress: boolean;
|
|
1473
|
+
fallbackRpcUrls: string[];
|
|
1626
1474
|
coreToken?: undefined;
|
|
1627
1475
|
} | {
|
|
1628
1476
|
name: "Polygon";
|
|
@@ -1681,6 +1529,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
1681
1529
|
moonpayChainName: string;
|
|
1682
1530
|
pickPriority: number;
|
|
1683
1531
|
isStandardEvmAddress: boolean;
|
|
1532
|
+
fallbackRpcUrls: string[];
|
|
1684
1533
|
} | {
|
|
1685
1534
|
name: string;
|
|
1686
1535
|
nativeCurrency: {
|
|
@@ -1738,6 +1587,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
1738
1587
|
moonpayChainName: string;
|
|
1739
1588
|
pickPriority: number;
|
|
1740
1589
|
isStandardEvmAddress: boolean;
|
|
1590
|
+
fallbackRpcUrls: string[];
|
|
1741
1591
|
} | {
|
|
1742
1592
|
name: "OP Mainnet";
|
|
1743
1593
|
nativeCurrency: {
|
|
@@ -2032,6 +1882,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
2032
1882
|
moonpayChainName: string;
|
|
2033
1883
|
pickPriority: number;
|
|
2034
1884
|
isStandardEvmAddress: boolean;
|
|
1885
|
+
fallbackRpcUrls: string[];
|
|
2035
1886
|
} | {
|
|
2036
1887
|
name: string;
|
|
2037
1888
|
nativeCurrency: {
|
|
@@ -2410,6 +2261,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
2410
2261
|
moonpayChainName: string;
|
|
2411
2262
|
pickPriority: number;
|
|
2412
2263
|
isStandardEvmAddress: boolean;
|
|
2264
|
+
fallbackRpcUrls: string[];
|
|
2413
2265
|
} | {
|
|
2414
2266
|
name: "Mantle";
|
|
2415
2267
|
nativeCurrency: {
|
|
@@ -2467,6 +2319,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
2467
2319
|
moonpayChainName: string;
|
|
2468
2320
|
pickPriority: number;
|
|
2469
2321
|
isStandardEvmAddress: boolean;
|
|
2322
|
+
fallbackRpcUrls: string[];
|
|
2470
2323
|
} | {
|
|
2471
2324
|
name: string;
|
|
2472
2325
|
nativeCurrency: {
|
|
@@ -2520,6 +2373,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
2520
2373
|
moonpayChainName: string;
|
|
2521
2374
|
pickPriority: number;
|
|
2522
2375
|
isStandardEvmAddress: boolean;
|
|
2376
|
+
fallbackRpcUrls: never[];
|
|
2523
2377
|
coreToken?: undefined;
|
|
2524
2378
|
} | {
|
|
2525
2379
|
name: "Scroll";
|
|
@@ -2574,6 +2428,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
2574
2428
|
moonpayChainName: string;
|
|
2575
2429
|
pickPriority: number;
|
|
2576
2430
|
isStandardEvmAddress: boolean;
|
|
2431
|
+
fallbackRpcUrls: string[];
|
|
2577
2432
|
coreToken?: undefined;
|
|
2578
2433
|
} | {
|
|
2579
2434
|
name: "Goerli";
|
|
@@ -2634,6 +2489,7 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
2634
2489
|
moonpayChainName: null;
|
|
2635
2490
|
pickPriority: number;
|
|
2636
2491
|
isStandardEvmAddress: boolean;
|
|
2492
|
+
fallbackRpcUrls: never[];
|
|
2637
2493
|
coreToken?: undefined;
|
|
2638
2494
|
} | {
|
|
2639
2495
|
name: "Arbitrum Sepolia";
|
|
@@ -2686,44 +2542,12 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO: {
|
|
|
2686
2542
|
moonpayChainName: null;
|
|
2687
2543
|
pickPriority: number;
|
|
2688
2544
|
isStandardEvmAddress: boolean;
|
|
2545
|
+
fallbackRpcUrls: never[];
|
|
2689
2546
|
coreToken?: undefined;
|
|
2690
2547
|
};
|
|
2691
2548
|
};
|
|
2692
2549
|
export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_ID_LIST: string[];
|
|
2693
2550
|
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
2551
|
blockExplorers: {
|
|
2728
2552
|
readonly default: {
|
|
2729
2553
|
readonly name: "Etherscan";
|
|
@@ -3746,6 +3570,39 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO_LIST: ({
|
|
|
3746
3570
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
3747
3571
|
formatters?: undefined;
|
|
3748
3572
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
3573
|
+
} | {
|
|
3574
|
+
id: number;
|
|
3575
|
+
name: string;
|
|
3576
|
+
nativeCurrency: {
|
|
3577
|
+
symbol: string;
|
|
3578
|
+
decimals: number;
|
|
3579
|
+
name: string;
|
|
3580
|
+
};
|
|
3581
|
+
rpcUrls: {
|
|
3582
|
+
default: {
|
|
3583
|
+
http: string[];
|
|
3584
|
+
};
|
|
3585
|
+
};
|
|
3586
|
+
blockExplorers: {
|
|
3587
|
+
default: {
|
|
3588
|
+
name: string;
|
|
3589
|
+
url: string;
|
|
3590
|
+
apiUrl: string;
|
|
3591
|
+
};
|
|
3592
|
+
};
|
|
3593
|
+
contracts: {
|
|
3594
|
+
ensRegistry: {
|
|
3595
|
+
address: `0x${string}`;
|
|
3596
|
+
};
|
|
3597
|
+
ensUniversalResolver: {
|
|
3598
|
+
address: `0x${string}`;
|
|
3599
|
+
blockCreated: number;
|
|
3600
|
+
};
|
|
3601
|
+
multicall3: {
|
|
3602
|
+
address: `0x${string}`;
|
|
3603
|
+
blockCreated: number;
|
|
3604
|
+
};
|
|
3605
|
+
};
|
|
3749
3606
|
} | {
|
|
3750
3607
|
blockExplorers: {
|
|
3751
3608
|
readonly default: {
|
|
@@ -3852,39 +3709,6 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO_LIST: ({
|
|
|
3852
3709
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
3853
3710
|
})[];
|
|
3854
3711
|
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
3712
|
blockExplorers: {
|
|
3889
3713
|
readonly default: {
|
|
3890
3714
|
readonly name: "Etherscan";
|
|
@@ -4907,6 +4731,39 @@ export declare const FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST: ({
|
|
|
4907
4731
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
4908
4732
|
formatters?: undefined;
|
|
4909
4733
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
4734
|
+
} | {
|
|
4735
|
+
id: number;
|
|
4736
|
+
name: string;
|
|
4737
|
+
nativeCurrency: {
|
|
4738
|
+
symbol: string;
|
|
4739
|
+
decimals: number;
|
|
4740
|
+
name: string;
|
|
4741
|
+
};
|
|
4742
|
+
rpcUrls: {
|
|
4743
|
+
default: {
|
|
4744
|
+
http: string[];
|
|
4745
|
+
};
|
|
4746
|
+
};
|
|
4747
|
+
blockExplorers: {
|
|
4748
|
+
default: {
|
|
4749
|
+
name: string;
|
|
4750
|
+
url: string;
|
|
4751
|
+
apiUrl: string;
|
|
4752
|
+
};
|
|
4753
|
+
};
|
|
4754
|
+
contracts: {
|
|
4755
|
+
ensRegistry: {
|
|
4756
|
+
address: `0x${string}`;
|
|
4757
|
+
};
|
|
4758
|
+
ensUniversalResolver: {
|
|
4759
|
+
address: `0x${string}`;
|
|
4760
|
+
blockCreated: number;
|
|
4761
|
+
};
|
|
4762
|
+
multicall3: {
|
|
4763
|
+
address: `0x${string}`;
|
|
4764
|
+
blockCreated: number;
|
|
4765
|
+
};
|
|
4766
|
+
};
|
|
4910
4767
|
} | {
|
|
4911
4768
|
blockExplorers: {
|
|
4912
4769
|
readonly default: {
|
|
@@ -16,13 +16,6 @@ export interface TransactionDataWithFee extends TransactionData {
|
|
|
16
16
|
recipient?: Address;
|
|
17
17
|
oracle?: Address;
|
|
18
18
|
}
|
|
19
|
-
export interface ExecutionReceipt {
|
|
20
|
-
userOpHash: string;
|
|
21
|
-
txId?: Hex;
|
|
22
|
-
gasUsed?: string;
|
|
23
|
-
opFeeUSD?: string;
|
|
24
|
-
opFee?: string;
|
|
25
|
-
}
|
|
26
19
|
export type EstimateGasResult = {
|
|
27
20
|
verificationGas?: bigint;
|
|
28
21
|
preVerificationGas: bigint;
|
package/dist/src/data/Chain.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Address, type Hex, type PublicClient } from 'viem';
|
|
2
|
-
import { type UserOperationGasPrice } from '
|
|
2
|
+
import { type UserOperation, type UserOperationGasPrice } from '@funkit/api-base';
|
|
3
3
|
import { type EstimateGasResult } from '../common';
|
|
4
|
-
import type { ChainInput
|
|
4
|
+
import type { ChainInput } from './types';
|
|
5
5
|
export declare class Chain {
|
|
6
6
|
private initialized;
|
|
7
7
|
private id?;
|
|
@@ -20,7 +20,6 @@ export declare class Chain {
|
|
|
20
20
|
getChainName(): Promise<string>;
|
|
21
21
|
getRpcUrl(): Promise<string>;
|
|
22
22
|
getAddress(name: string): Promise<Address>;
|
|
23
|
-
getModuleAddresses(name: string): Promise<string[]>;
|
|
24
23
|
getCurrency(): Promise<string>;
|
|
25
24
|
getClient(): Promise<PublicClient>;
|
|
26
25
|
getFeeData(): Promise<UserOperationGasPrice>;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import type { AuthType, OperationData, OperationMetadata, OperationStatus, OperationType, Signature, UserOperation } from '@funkit/api-base';
|
|
1
2
|
import type { Address, Hex } from 'viem';
|
|
2
3
|
import type { Auth } from '../auth';
|
|
3
4
|
import type { EnvOption } from '../config';
|
|
4
5
|
import { Chain } from './Chain';
|
|
5
|
-
import type { AuthType, OperationMetadata, OperationStatus, OperationType, Signature, UserOperation } from './types';
|
|
6
|
-
export interface OperationData extends OperationMetadata {
|
|
7
|
-
userOp: UserOperation;
|
|
8
|
-
}
|
|
9
6
|
export declare class Operation implements OperationData {
|
|
10
7
|
opId?: Hex;
|
|
11
8
|
chainId: string;
|
package/dist/src/data/types.d.ts
CHANGED
|
@@ -52,61 +52,3 @@ export type ExtraDataType = {
|
|
|
52
52
|
feeRecipientPath?: Hex[];
|
|
53
53
|
tokenPath?: Hex[];
|
|
54
54
|
};
|
|
55
|
-
export type UserOperation = {
|
|
56
|
-
sender: string;
|
|
57
|
-
nonce: bigint;
|
|
58
|
-
initCode?: string;
|
|
59
|
-
callData: string;
|
|
60
|
-
callGasLimit: bigint;
|
|
61
|
-
verificationGasLimit: bigint;
|
|
62
|
-
preVerificationGas?: bigint;
|
|
63
|
-
maxFeePerGas: bigint;
|
|
64
|
-
maxPriorityFeePerGas: bigint;
|
|
65
|
-
paymasterAndData?: string;
|
|
66
|
-
signature?: string;
|
|
67
|
-
};
|
|
68
|
-
export declare enum AuthType {
|
|
69
|
-
ECDSA = 0,
|
|
70
|
-
MULTI_SIG = 1
|
|
71
|
-
}
|
|
72
|
-
export type Signature = {
|
|
73
|
-
userId: Hex;
|
|
74
|
-
signature: Hex;
|
|
75
|
-
signedTime: number;
|
|
76
|
-
};
|
|
77
|
-
export declare enum OperationType {
|
|
78
|
-
SINGLE_OPERATION = "SINGLE_OPERATION",
|
|
79
|
-
GROUP_OPERATION = "GROUP_OPERATION",
|
|
80
|
-
REJECTION = "REJECTION"
|
|
81
|
-
}
|
|
82
|
-
export declare enum OperationStatus {
|
|
83
|
-
ALL = "",
|
|
84
|
-
PENDING_APPROVED = "PENDING_APPROVED",
|
|
85
|
-
APPROVED = "APPROVED",
|
|
86
|
-
PENDING = "PENDING",
|
|
87
|
-
OP_SUCCEED = "OP_SUCCEED",
|
|
88
|
-
OP_REVERTED = "OP_REVERTED",
|
|
89
|
-
SCHEDULED = "SCHEDULED"
|
|
90
|
-
}
|
|
91
|
-
export type OperationMetadata = {
|
|
92
|
-
opId?: Hex;
|
|
93
|
-
chainId: string;
|
|
94
|
-
opType: OperationType;
|
|
95
|
-
authType: AuthType;
|
|
96
|
-
groupId?: Hex;
|
|
97
|
-
message?: string;
|
|
98
|
-
walletAddr: Address;
|
|
99
|
-
status?: OperationStatus;
|
|
100
|
-
proposer: string;
|
|
101
|
-
proposedTime?: number;
|
|
102
|
-
executedBy?: string;
|
|
103
|
-
executedTime?: number;
|
|
104
|
-
relatedOpIds?: Hex[];
|
|
105
|
-
signatures?: Signature[];
|
|
106
|
-
txid?: string;
|
|
107
|
-
gasUsed?: string;
|
|
108
|
-
opFeeUSD?: string;
|
|
109
|
-
opFee?: string;
|
|
110
|
-
executedBlockNumber?: number;
|
|
111
|
-
executedBlockTimeStamp?: number;
|
|
112
|
-
};
|
|
@@ -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 {
|
|
7
|
+
import type { AllTokenData } from './types';
|
|
8
8
|
export declare class TokenSponsor extends Sponsor {
|
|
9
9
|
token: string;
|
|
10
10
|
constructor(options?: EnvOption);
|
|
@@ -15,4 +15,4 @@ export declare const getGasStation: (gasStationUrl: string) => Promise<{
|
|
|
15
15
|
maxFee: number;
|
|
16
16
|
};
|
|
17
17
|
}>;
|
|
18
|
-
export declare const useFaucet: (chainIdentifier: Chain | number | string, wallet: FunWallet) => Promise<
|
|
18
|
+
export declare const useFaucet: (chainIdentifier: Chain | number | string, wallet: FunWallet) => Promise<unknown[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type Address, type Hex } from 'viem';
|
|
2
|
+
import type { GroupInfo } from '@funkit/api-base';
|
|
2
3
|
import type { Chain } from '../data';
|
|
3
|
-
import type { GroupInfo } from '../wallet';
|
|
4
4
|
export declare function getOnChainGroupData(groupId: Hex, chain: Chain, walletAddr: Address): Promise<GroupInfo>;
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getTokenAddressBySymbolAndChainId(inputSymbol: any, inputChainId: any): Promise<any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Hex } from 'viem';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UserOperation } from '@funkit/api-base';
|
|
3
|
+
import type { Chain } from '../data';
|
|
3
4
|
export declare const calcPreVerificationGas: (userOp: UserOperation) => bigint;
|
|
4
5
|
export declare const getPromiseFromOp: (op: UserOperation) => Promise<any>;
|
|
5
6
|
export declare function gasCalculation(txid: string, chain: Chain): Promise<{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Address, type Hex } from 'viem';
|
|
2
|
-
import { type
|
|
2
|
+
import { type Signature, type UserOperation } from '@funkit/api-base';
|
|
3
|
+
import { type Chain, type Operation } from '../data';
|
|
3
4
|
export declare const generateRandomBytes32: () => Hex;
|
|
4
5
|
export declare const generateRandomWalletUniqueId: () => Hex;
|
|
5
6
|
export declare const generateRandomGroupId: () => Hex;
|