@funkit/core 2.1.2-next.0 → 2.1.2-next.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.
Files changed (170) hide show
  1. package/dist/index.js +16232 -12
  2. package/dist/index.js.map +7 -1
  3. package/dist/src/viem/Converter.d.ts +4 -4
  4. package/package.json +6 -4
  5. package/dist/src/abis/ApproveAndExec.json +0 -106
  6. package/dist/src/abis/ApproveAndSwap.json +0 -141
  7. package/dist/src/abis/CheckoutPaymaster.json +0 -3358
  8. package/dist/src/abis/ERC20.json +0 -1
  9. package/dist/src/abis/ERC721.json +0 -1
  10. package/dist/src/abis/EntryPoint.json +0 -1023
  11. package/dist/src/abis/EstimationPaymaster.json +0 -266
  12. package/dist/src/abis/FeePercentOracle.json +0 -218
  13. package/dist/src/abis/FunWallet.json +0 -758
  14. package/dist/src/abis/FunWalletFactory.json +0 -232
  15. package/dist/src/abis/GaslessPaymaster.json +0 -558
  16. package/dist/src/abis/LidoWithdrawQueue.json +0 -1
  17. package/dist/src/abis/RoleBasedAccessControl.json +0 -836
  18. package/dist/src/abis/TestNFT.json +0 -226
  19. package/dist/src/abis/TokenPaymaster.json +0 -696
  20. package/dist/src/abis/TokenPriceOracle.json +0 -57
  21. package/dist/src/abis/UniswapV2Factory.json +0 -1
  22. package/dist/src/abis/UniswapV2Router02.json +0 -1
  23. package/dist/src/abis/UniswapV3LimitOrder.json +0 -1
  24. package/dist/src/abis/UserAuthentication.json +0 -338
  25. package/dist/src/abis/univ3factory.json +0 -1
  26. package/dist/src/abis/univ3quoter.json +0 -1
  27. package/dist/src/abis/univ3router.json +0 -1
  28. package/dist/src/actions/AccessControl.js +0 -87
  29. package/dist/src/actions/AccessControl.js.map +0 -1
  30. package/dist/src/actions/BatchActions.js +0 -8
  31. package/dist/src/actions/BatchActions.js.map +0 -1
  32. package/dist/src/actions/Bridge.js +0 -42
  33. package/dist/src/actions/Bridge.js.map +0 -1
  34. package/dist/src/actions/FirstClassActions.js +0 -329
  35. package/dist/src/actions/FirstClassActions.js.map +0 -1
  36. package/dist/src/actions/Group.js +0 -30
  37. package/dist/src/actions/Group.js.map +0 -1
  38. package/dist/src/actions/LimitOrder.js +0 -43
  39. package/dist/src/actions/LimitOrder.js.map +0 -1
  40. package/dist/src/actions/Stake.js +0 -108
  41. package/dist/src/actions/Stake.js.map +0 -1
  42. package/dist/src/actions/Swap.js +0 -150
  43. package/dist/src/actions/Swap.js.map +0 -1
  44. package/dist/src/actions/Token.js +0 -103
  45. package/dist/src/actions/Token.js.map +0 -1
  46. package/dist/src/actions/index.js +0 -8
  47. package/dist/src/actions/index.js.map +0 -1
  48. package/dist/src/actions/types.js +0 -14
  49. package/dist/src/actions/types.js.map +0 -1
  50. package/dist/src/apis/AccessControlApis.js +0 -19
  51. package/dist/src/apis/AccessControlApis.js.map +0 -1
  52. package/dist/src/apis/BridgeApis.js +0 -54
  53. package/dist/src/apis/BridgeApis.js.map +0 -1
  54. package/dist/src/apis/ContractApis.js +0 -7
  55. package/dist/src/apis/ContractApis.js.map +0 -1
  56. package/dist/src/apis/GroupApis.js +0 -15
  57. package/dist/src/apis/GroupApis.js.map +0 -1
  58. package/dist/src/apis/InfoApis.js +0 -53
  59. package/dist/src/apis/InfoApis.js.map +0 -1
  60. package/dist/src/apis/ListenerApis.js +0 -31
  61. package/dist/src/apis/ListenerApis.js.map +0 -1
  62. package/dist/src/apis/NFTApis.js +0 -29
  63. package/dist/src/apis/NFTApis.js.map +0 -1
  64. package/dist/src/apis/OperationApis.js +0 -76
  65. package/dist/src/apis/OperationApis.js.map +0 -1
  66. package/dist/src/apis/PaymasterApis.js +0 -18
  67. package/dist/src/apis/PaymasterApis.js.map +0 -1
  68. package/dist/src/apis/SwapApis.js +0 -40
  69. package/dist/src/apis/SwapApis.js.map +0 -1
  70. package/dist/src/apis/UserApis.js +0 -56
  71. package/dist/src/apis/UserApis.js.map +0 -1
  72. package/dist/src/apis/index.js +0 -9
  73. package/dist/src/apis/index.js.map +0 -1
  74. package/dist/src/apis/types.js +0 -2
  75. package/dist/src/apis/types.js.map +0 -1
  76. package/dist/src/auth/Auth.js +0 -321
  77. package/dist/src/auth/Auth.js.map +0 -1
  78. package/dist/src/auth/SessionKeyAuth.js +0 -115
  79. package/dist/src/auth/SessionKeyAuth.js.map +0 -1
  80. package/dist/src/auth/index.js +0 -3
  81. package/dist/src/auth/index.js.map +0 -1
  82. package/dist/src/auth/types.js +0 -2
  83. package/dist/src/auth/types.js.map +0 -1
  84. package/dist/src/common/constants.js +0 -477
  85. package/dist/src/common/constants.js.map +0 -1
  86. package/dist/src/common/index.js +0 -3
  87. package/dist/src/common/index.js.map +0 -1
  88. package/dist/src/common/types.js +0 -2
  89. package/dist/src/common/types.js.map +0 -1
  90. package/dist/src/config/Config.js +0 -50
  91. package/dist/src/config/Config.js.map +0 -1
  92. package/dist/src/config/index.js +0 -3
  93. package/dist/src/config/index.js.map +0 -1
  94. package/dist/src/config/types.js +0 -2
  95. package/dist/src/config/types.js.map +0 -1
  96. package/dist/src/data/Chain.js +0 -209
  97. package/dist/src/data/Chain.js.map +0 -1
  98. package/dist/src/data/NFT.js +0 -101
  99. package/dist/src/data/NFT.js.map +0 -1
  100. package/dist/src/data/Operation.js +0 -88
  101. package/dist/src/data/Operation.js.map +0 -1
  102. package/dist/src/data/SolidityData.js +0 -84
  103. package/dist/src/data/SolidityData.js.map +0 -1
  104. package/dist/src/data/Token.js +0 -118
  105. package/dist/src/data/Token.js.map +0 -1
  106. package/dist/src/data/index.js +0 -7
  107. package/dist/src/data/index.js.map +0 -1
  108. package/dist/src/data/types.js +0 -22
  109. package/dist/src/data/types.js.map +0 -1
  110. package/dist/src/errors/BaseError.js +0 -25
  111. package/dist/src/errors/BaseError.js.map +0 -1
  112. package/dist/src/errors/ClientError.js +0 -63
  113. package/dist/src/errors/ClientError.js.map +0 -1
  114. package/dist/src/errors/ServerError.js +0 -13
  115. package/dist/src/errors/ServerError.js.map +0 -1
  116. package/dist/src/errors/errors.json +0 -626
  117. package/dist/src/errors/index.js +0 -5
  118. package/dist/src/errors/index.js.map +0 -1
  119. package/dist/src/errors/types.js +0 -48
  120. package/dist/src/errors/types.js.map +0 -1
  121. package/dist/src/sponsors/CheckoutSponsor.js +0 -61
  122. package/dist/src/sponsors/CheckoutSponsor.js.map +0 -1
  123. package/dist/src/sponsors/GaslessSponsor.js +0 -75
  124. package/dist/src/sponsors/GaslessSponsor.js.map +0 -1
  125. package/dist/src/sponsors/Sponsor.js +0 -80
  126. package/dist/src/sponsors/Sponsor.js.map +0 -1
  127. package/dist/src/sponsors/TokenSponsor.js +0 -251
  128. package/dist/src/sponsors/TokenSponsor.js.map +0 -1
  129. package/dist/src/sponsors/index.js +0 -5
  130. package/dist/src/sponsors/index.js.map +0 -1
  131. package/dist/src/sponsors/types.js +0 -8
  132. package/dist/src/sponsors/types.js.map +0 -1
  133. package/dist/src/utils/ApiUtils.js +0 -94
  134. package/dist/src/utils/ApiUtils.js.map +0 -1
  135. package/dist/src/utils/AuthUtils.js +0 -31
  136. package/dist/src/utils/AuthUtils.js.map +0 -1
  137. package/dist/src/utils/ChainUtils.js +0 -131
  138. package/dist/src/utils/ChainUtils.js.map +0 -1
  139. package/dist/src/utils/CheckoutUtils.js +0 -28
  140. package/dist/src/utils/CheckoutUtils.js.map +0 -1
  141. package/dist/src/utils/GroupUtils.js +0 -26
  142. package/dist/src/utils/GroupUtils.js.map +0 -1
  143. package/dist/src/utils/MerkleUtils.js +0 -86
  144. package/dist/src/utils/MerkleUtils.js.map +0 -1
  145. package/dist/src/utils/PaymasterUtils.js +0 -17
  146. package/dist/src/utils/PaymasterUtils.js.map +0 -1
  147. package/dist/src/utils/SwapUtils.js +0 -193
  148. package/dist/src/utils/SwapUtils.js.map +0 -1
  149. package/dist/src/utils/TypeUtils.js +0 -9
  150. package/dist/src/utils/TypeUtils.js.map +0 -1
  151. package/dist/src/utils/UserOpUtils.js +0 -171
  152. package/dist/src/utils/UserOpUtils.js.map +0 -1
  153. package/dist/src/utils/ViemUtils.js +0 -30
  154. package/dist/src/utils/ViemUtils.js.map +0 -1
  155. package/dist/src/utils/WalletUtils.js +0 -56
  156. package/dist/src/utils/WalletUtils.js.map +0 -1
  157. package/dist/src/utils/index.js +0 -9
  158. package/dist/src/utils/index.js.map +0 -1
  159. package/dist/src/viem/ContractInterface.js +0 -90
  160. package/dist/src/viem/ContractInterface.js.map +0 -1
  161. package/dist/src/viem/Converter.js +0 -47
  162. package/dist/src/viem/Converter.js.map +0 -1
  163. package/dist/src/viem/index.js +0 -3
  164. package/dist/src/viem/index.js.map +0 -1
  165. package/dist/src/wallet/FunWallet.js +0 -804
  166. package/dist/src/wallet/FunWallet.js.map +0 -1
  167. package/dist/src/wallet/index.js +0 -3
  168. package/dist/src/wallet/index.js.map +0 -1
  169. package/dist/src/wallet/types.js +0 -2
  170. package/dist/src/wallet/types.js.map +0 -1
@@ -318,9 +318,9 @@ export declare const convertProviderToClient: ({ provider, viemChain, }: web3Pro
318
318
  [x: `bool[${string}]`]: undefined;
319
319
  [x: `bytes4[${string}]`]: undefined;
320
320
  [x: `uint224[${string}]`]: undefined;
321
+ [x: `bytes1[${string}]`]: undefined;
321
322
  [x: `bytes2[${string}]`]: undefined;
322
323
  [x: `bytes5[${string}]`]: undefined;
323
- [x: `bytes1[${string}]`]: undefined;
324
324
  [x: `bytes31[${string}]`]: undefined;
325
325
  [x: `bytes30[${string}]`]: undefined;
326
326
  [x: `bytes29[${string}]`]: undefined;
@@ -420,9 +420,9 @@ export declare const convertProviderToClient: ({ provider, viemChain, }: web3Pro
420
420
  bool?: undefined;
421
421
  bytes4?: undefined;
422
422
  uint224?: undefined;
423
+ bytes1?: undefined;
423
424
  bytes2?: undefined;
424
425
  bytes5?: undefined;
425
- bytes1?: undefined;
426
426
  bytes31?: undefined;
427
427
  bytes30?: undefined;
428
428
  bytes29?: undefined;
@@ -1169,9 +1169,9 @@ export declare const convertSignerToClient: ({ signer, viemChain, }: web3SignerC
1169
1169
  [x: `bool[${string}]`]: undefined;
1170
1170
  [x: `bytes4[${string}]`]: undefined;
1171
1171
  [x: `uint224[${string}]`]: undefined;
1172
+ [x: `bytes1[${string}]`]: undefined;
1172
1173
  [x: `bytes2[${string}]`]: undefined;
1173
1174
  [x: `bytes5[${string}]`]: undefined;
1174
- [x: `bytes1[${string}]`]: undefined;
1175
1175
  [x: `bytes31[${string}]`]: undefined;
1176
1176
  [x: `bytes30[${string}]`]: undefined;
1177
1177
  [x: `bytes29[${string}]`]: undefined;
@@ -1271,9 +1271,9 @@ export declare const convertSignerToClient: ({ signer, viemChain, }: web3SignerC
1271
1271
  bool?: undefined;
1272
1272
  bytes4?: undefined;
1273
1273
  uint224?: undefined;
1274
+ bytes1?: undefined;
1274
1275
  bytes2?: undefined;
1275
1276
  bytes5?: undefined;
1276
- bytes1?: undefined;
1277
1277
  bytes31?: undefined;
1278
1278
  bytes30?: undefined;
1279
1279
  bytes29?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/core",
3
- "version": "2.1.2-next.0",
3
+ "version": "2.1.2-next.1",
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",
@@ -26,7 +26,7 @@
26
26
  "ethers": "5.7.2",
27
27
  "uuid": "^9.0.0",
28
28
  "viem": "2.9.31",
29
- "@funkit/api-base": "1.0.1"
29
+ "@funkit/api-base": "1.0.2-next.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/big.js": "^6.2.2",
@@ -70,8 +70,10 @@
70
70
  },
71
71
  "homepage": "https://github.com/fun-xyz/funkit-core",
72
72
  "scripts": {
73
- "build": "rm -rf dist && tsc",
74
- "build:watch": "rm -rf dist && tsc -w",
73
+ "build": "rm -rf dist && pnpm typecheck && pnpm declaration && node build.js",
74
+ "typecheck": "tsc --noEmit",
75
+ "declaration": "tsc --emitDeclarationOnly",
76
+ "build:watch": "rm -rf dist && node build.js --watch",
75
77
  "test": "ts-mocha --exit tests/tenderly/*.ts --exit",
76
78
  "test-tenderly": "ts-mocha --exit tests/tenderly/*.ts",
77
79
  "test-aws": "env ts-mocha",
@@ -1,106 +0,0 @@
1
- {
2
- "name": "ApproveAndExec",
3
- "abi": [
4
- {
5
- "anonymous": false,
6
- "inputs": [
7
- {
8
- "indexed": true,
9
- "internalType": "address",
10
- "name": "dest",
11
- "type": "address"
12
- },
13
- {
14
- "indexed": false,
15
- "internalType": "uint256",
16
- "name": "value",
17
- "type": "uint256"
18
- },
19
- {
20
- "indexed": false,
21
- "internalType": "bytes",
22
- "name": "executeData",
23
- "type": "bytes"
24
- },
25
- {
26
- "indexed": false,
27
- "internalType": "address",
28
- "name": "token",
29
- "type": "address"
30
- },
31
- {
32
- "indexed": false,
33
- "internalType": "bytes",
34
- "name": "approveData",
35
- "type": "bytes"
36
- }
37
- ],
38
- "name": "ApproveAndExecute",
39
- "type": "event"
40
- },
41
- {
42
- "inputs": [],
43
- "name": "EMPTY_STATE",
44
- "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
45
- "stateMutability": "view",
46
- "type": "function"
47
- },
48
- {
49
- "inputs": [
50
- { "internalType": "address", "name": "dest", "type": "address" },
51
- { "internalType": "uint256", "name": "value", "type": "uint256" },
52
- { "internalType": "bytes", "name": "executeData", "type": "bytes" },
53
- { "internalType": "address", "name": "token", "type": "address" },
54
- { "internalType": "bytes", "name": "approveData", "type": "bytes" }
55
- ],
56
- "name": "approveAndExecute",
57
- "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
58
- "stateMutability": "nonpayable",
59
- "type": "function"
60
- },
61
- {
62
- "inputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
63
- "name": "execute",
64
- "outputs": [],
65
- "stateMutability": "nonpayable",
66
- "type": "function"
67
- },
68
- {
69
- "inputs": [
70
- { "internalType": "bytes32", "name": "key", "type": "bytes32" }
71
- ],
72
- "name": "getState",
73
- "outputs": [
74
- { "internalType": "bytes", "name": "state", "type": "bytes" }
75
- ],
76
- "stateMutability": "view",
77
- "type": "function"
78
- },
79
- {
80
- "inputs": [],
81
- "name": "moduleId",
82
- "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
83
- "stateMutability": "view",
84
- "type": "function"
85
- },
86
- {
87
- "inputs": [],
88
- "name": "payFee",
89
- "outputs": [],
90
- "stateMutability": "nonpayable",
91
- "type": "function"
92
- }
93
- ],
94
- "addresses": {
95
- "1": "0xD953Eda57EAB69F2EB0103bffA9acc66eA98e0aB",
96
- "5": "0xD953Eda57EAB69F2EB0103bffA9acc66eA98e0aB",
97
- "10": "0xD953Eda57EAB69F2EB0103bffA9acc66eA98e0aB",
98
- "137": "0xD953Eda57EAB69F2EB0103bffA9acc66eA98e0aB",
99
- "8453": "0xD953Eda57EAB69F2EB0103bffA9acc66eA98e0aB",
100
- "36865": "0xD953Eda57EAB69F2EB0103bffA9acc66eA98e0aB",
101
- "42161": "0xD953Eda57EAB69F2EB0103bffA9acc66eA98e0aB",
102
- "421614": "0x587f2f3B109Ed85059AEC26a68E694e678C2F917",
103
- "5000": "0x1d8538726daE26eE163ebB7606c1f145395F838c",
104
- "534352": "0xC5f3e88055304cBdE593a6659797EF92C2613653"
105
- }
106
- }
@@ -1,141 +0,0 @@
1
- {
2
- "name": "ApproveAndSwap",
3
- "abi": [
4
- {
5
- "inputs": [
6
- { "internalType": "address", "name": "_wethAddr", "type": "address" },
7
- { "internalType": "address", "name": "_router", "type": "address" }
8
- ],
9
- "stateMutability": "nonpayable",
10
- "type": "constructor"
11
- },
12
- {
13
- "anonymous": false,
14
- "inputs": [
15
- {
16
- "indexed": true,
17
- "internalType": "address",
18
- "name": "tokenAddr",
19
- "type": "address"
20
- },
21
- {
22
- "indexed": false,
23
- "internalType": "uint256",
24
- "name": "amount",
25
- "type": "uint256"
26
- }
27
- ],
28
- "name": "SwapERC20Executed",
29
- "type": "event"
30
- },
31
- {
32
- "anonymous": false,
33
- "inputs": [
34
- {
35
- "indexed": false,
36
- "internalType": "uint256",
37
- "name": "amount",
38
- "type": "uint256"
39
- }
40
- ],
41
- "name": "SwapETHExecuted",
42
- "type": "event"
43
- },
44
- {
45
- "inputs": [],
46
- "name": "EMPTY_STATE",
47
- "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
48
- "stateMutability": "view",
49
- "type": "function"
50
- },
51
- {
52
- "inputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
53
- "name": "execute",
54
- "outputs": [],
55
- "stateMutability": "nonpayable",
56
- "type": "function"
57
- },
58
- {
59
- "inputs": [
60
- { "internalType": "address", "name": "tokenAddr", "type": "address" },
61
- { "internalType": "uint256", "name": "amount", "type": "uint256" },
62
- { "internalType": "bytes", "name": "routerCallData", "type": "bytes" }
63
- ],
64
- "name": "executeSwapERC20",
65
- "outputs": [],
66
- "stateMutability": "nonpayable",
67
- "type": "function"
68
- },
69
- {
70
- "inputs": [
71
- { "internalType": "uint256", "name": "amount", "type": "uint256" },
72
- { "internalType": "bytes", "name": "routerCallData", "type": "bytes" }
73
- ],
74
- "name": "executeSwapETH",
75
- "outputs": [],
76
- "stateMutability": "nonpayable",
77
- "type": "function"
78
- },
79
- {
80
- "inputs": [
81
- { "internalType": "bytes32", "name": "key", "type": "bytes32" }
82
- ],
83
- "name": "getState",
84
- "outputs": [
85
- { "internalType": "bytes", "name": "state", "type": "bytes" }
86
- ],
87
- "stateMutability": "view",
88
- "type": "function"
89
- },
90
- {
91
- "inputs": [],
92
- "name": "getWeth",
93
- "outputs": [
94
- { "internalType": "contractIWETH9", "name": "", "type": "address" }
95
- ],
96
- "stateMutability": "view",
97
- "type": "function"
98
- },
99
- {
100
- "inputs": [],
101
- "name": "moduleId",
102
- "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
103
- "stateMutability": "view",
104
- "type": "function"
105
- },
106
- {
107
- "inputs": [],
108
- "name": "payFee",
109
- "outputs": [],
110
- "stateMutability": "nonpayable",
111
- "type": "function"
112
- },
113
- {
114
- "inputs": [],
115
- "name": "router",
116
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
117
- "stateMutability": "view",
118
- "type": "function"
119
- },
120
- {
121
- "inputs": [],
122
- "name": "weth",
123
- "outputs": [
124
- { "internalType": "contractIWETH9", "name": "", "type": "address" }
125
- ],
126
- "stateMutability": "view",
127
- "type": "function"
128
- }
129
- ],
130
- "numDeployments": 1,
131
- "addresses": {
132
- "1": "0xe65d63A9B4842c0dc0916aE5368356Ca0212f2CB",
133
- "5": "0xe65d63A9B4842c0dc0916aE5368356Ca0212f2CB",
134
- "10": "0xe65d63A9B4842c0dc0916aE5368356Ca0212f2CB",
135
- "137": "0xe65d63A9B4842c0dc0916aE5368356Ca0212f2CB",
136
- "8453": "0xe65d63A9B4842c0dc0916aE5368356Ca0212f2CB",
137
- "36865": "0xe65d63A9B4842c0dc0916aE5368356Ca0212f2CB",
138
- "42161": "0xe65d63A9B4842c0dc0916aE5368356Ca0212f2CB",
139
- "421614": "0xd0d92c17C4123F0e8b571b0Dd0997d4a5E88Bb52"
140
- }
141
- }