@funkit/core 2.2.5 → 2.2.6

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 (54) hide show
  1. package/dist/index.js +7203 -4190
  2. package/dist/index.js.map +4 -4
  3. package/dist/src/actions/AccessControl.d.ts +4 -4
  4. package/dist/src/actions/BatchActions.d.ts +2 -2
  5. package/dist/src/actions/Bridge.d.ts +3 -3
  6. package/dist/src/actions/FirstClassActions.d.ts +6 -6
  7. package/dist/src/actions/Group.d.ts +3 -3
  8. package/dist/src/actions/LimitOrder.d.ts +3 -3
  9. package/dist/src/actions/Stake.d.ts +3 -3
  10. package/dist/src/actions/Swap.d.ts +4 -4
  11. package/dist/src/actions/Token.d.ts +2 -2
  12. package/dist/src/actions/types.d.ts +3 -3
  13. package/dist/src/apis/AccessControlApis.d.ts +1 -1
  14. package/dist/src/apis/BridgeApis.d.ts +1 -1
  15. package/dist/src/apis/GroupApis.d.ts +2 -2
  16. package/dist/src/apis/InfoApis.d.ts +1 -1
  17. package/dist/src/apis/ListenerApis.d.ts +1 -1
  18. package/dist/src/apis/OperationApis.d.ts +4 -4
  19. package/dist/src/apis/PaymasterApis.d.ts +1 -1
  20. package/dist/src/apis/SwapApis.d.ts +1 -1
  21. package/dist/src/apis/UserApis.d.ts +2 -2
  22. package/dist/src/apis/types.d.ts +3 -3
  23. package/dist/src/auth/Auth.d.ts +6 -6
  24. package/dist/src/auth/SessionKeyAuth.d.ts +4 -4
  25. package/dist/src/auth/types.d.ts +1 -1
  26. package/dist/src/common/constants.d.ts +12 -11
  27. package/dist/src/common/types.d.ts +2 -2
  28. package/dist/src/config/Config.d.ts +2 -2
  29. package/dist/src/config/types.d.ts +2 -2
  30. package/dist/src/data/Chain.d.ts +4 -4
  31. package/dist/src/data/NFT.d.ts +4 -4
  32. package/dist/src/data/Operation.d.ts +9 -6
  33. package/dist/src/data/SolidityData.d.ts +3 -3
  34. package/dist/src/data/Token.d.ts +3 -3
  35. package/dist/src/data/types.d.ts +2 -2
  36. package/dist/src/sponsors/CheckoutSponsor.d.ts +3 -3
  37. package/dist/src/sponsors/GaslessSponsor.d.ts +3 -3
  38. package/dist/src/sponsors/Sponsor.d.ts +6 -6
  39. package/dist/src/sponsors/TokenSponsor.d.ts +6 -6
  40. package/dist/src/utils/ApiUtils.d.ts +5 -5
  41. package/dist/src/utils/AuthUtils.d.ts +2 -2
  42. package/dist/src/utils/ChainUtils.d.ts +10 -5
  43. package/dist/src/utils/GroupUtils.d.ts +3 -3
  44. package/dist/src/utils/MerkleUtils.d.ts +1 -1
  45. package/dist/src/utils/PaymasterUtils.d.ts +1 -1
  46. package/dist/src/utils/SwapUtils.d.ts +4 -4
  47. package/dist/src/utils/UserOpUtils.d.ts +2 -2
  48. package/dist/src/utils/ViemUtils.d.ts +2 -2
  49. package/dist/src/utils/WalletUtils.d.ts +2 -2
  50. package/dist/src/viem/ContractInterface.d.ts +3 -3
  51. package/dist/src/viem/Converter.d.ts +2 -2
  52. package/dist/src/wallet/FunWallet.d.ts +10 -10
  53. package/dist/src/wallet/types.d.ts +1 -1
  54. package/package.json +4 -13
@@ -1,5 +1,5 @@
1
- import { Address, Hex, PublicClient } from 'viem';
2
- import { TransactionParams } from '../common';
1
+ import { type Address, type Hex, type Log, type PublicClient } from 'viem';
2
+ import type { TransactionParams } from '../common';
3
3
  import { Chain } from '../data';
4
4
  type ChainReadCall = {
5
5
  functionName: string;
@@ -13,7 +13,7 @@ export declare class ContractInterface {
13
13
  encodeTransactionParams(address: Address, functionName: string, args: any[], value?: bigint): TransactionParams;
14
14
  encodeData(functionName: string, args: any[]): Hex;
15
15
  createFilter(address: Address, eventName: any, args: any, chainOrClient: PublicClient | Chain, fromBlock: bigint): Promise<import("viem").CreateContractEventFilterReturnType<any, any, any, undefined, bigint, undefined>>;
16
- getLog(address: Address, name: string, args: any, chainOrClient: PublicClient | Chain, fromBlock: bigint): Promise<any[]>;
16
+ getLog(address: Address, name: string, args: any, chainOrClient: PublicClient | Chain, fromBlock: bigint): Promise<Log[]>;
17
17
  }
18
18
  export declare const parseClient: (chainOrClient: PublicClient | Chain) => Promise<PublicClient>;
19
19
  export {};
@@ -1,5 +1,5 @@
1
- import { WalletClient } from 'viem';
2
- import { Chain } from 'viem/chains';
1
+ import { type WalletClient } from 'viem';
2
+ import { type Chain } from 'viem/chains';
3
3
  interface web3ProviderConversionInterface {
4
4
  provider: any;
5
5
  viemChain?: Chain;
@@ -1,11 +1,11 @@
1
- import { MoonpayCurrency } from '@funkit/api-base';
2
- import { Address, Hex } from 'viem';
1
+ import { type MoonpayCurrency } from '@funkit/api-base';
2
+ import { type Address, type Hex } from 'viem';
3
3
  import { FirstClassActions } from '../actions/FirstClassActions';
4
- import { Auth } from '../auth';
5
- import { ExecutionReceipt, TransactionParams } from '../common';
6
- import { EnvOption } from '../config';
7
- import { Operation, OperationStatus } from '../data';
8
- import { FunWalletParams, User } from './types';
4
+ import type { Auth } from '../auth';
5
+ import { type ExecutionReceipt, type TransactionParams } from '../common';
6
+ import { type EnvOption } from '../config';
7
+ import { Operation, type OperationData, OperationStatus } from '../data';
8
+ import type { FunWalletParams, User } from './types';
9
9
  export declare class FunWallet extends FirstClassActions {
10
10
  walletUniqueId?: Hex;
11
11
  userInfo?: Map<Hex, User>;
@@ -144,7 +144,7 @@ export declare class FunWallet extends FirstClassActions {
144
144
  * @param {EnvOption} txOptions - Transaction environment options (default: global environment options).
145
145
  * @returns {Promise<Operation>} The signed operation.
146
146
  */
147
- signOperation(auth: Auth, operation: Operation, txOptions?: EnvOption): Promise<Operation>;
147
+ signOperation(auth: Auth, operation: OperationData, txOptions?: EnvOption): Promise<Operation>;
148
148
  /**
149
149
  * Executes an operation and returns the execution receipt.
150
150
  * @param {Auth} auth - The authentication instance for the user.
@@ -152,11 +152,11 @@ export declare class FunWallet extends FirstClassActions {
152
152
  * @param {EnvOption} txOptions - Transaction environment options (default: global environment options).
153
153
  * @returns {Promise<ExecutionReceipt>} The execution receipt of the operation.
154
154
  */
155
- executeOperation(auth: Auth, operation: Operation, txOptions?: EnvOption): Promise<ExecutionReceipt>;
155
+ executeOperation(auth: Auth, operation: OperationData, txOptions?: EnvOption): Promise<ExecutionReceipt>;
156
156
  /**
157
157
  * Schedules an operation for execution and returns the scheduled operation's ID.
158
158
  * @param {Auth} auth - The authentication instance for the user.
159
- * @param {Operation} operation - The operation to be scheduled.
159
+ * @param {Operation} finalOperation - The operation to be scheduled.
160
160
  * @param {EnvOption} txOptions - Transaction environment options (default: global environment options).
161
161
  * @returns {Promise<Hex>} The ID of the scheduled operation.
162
162
  */
@@ -1,4 +1,4 @@
1
- import { Hex } from 'viem';
1
+ import type { Hex } from 'viem';
2
2
  export type GroupInfo = {
3
3
  threshold: number;
4
4
  memberIds: Hex[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/core",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
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",
@@ -25,24 +25,16 @@
25
25
  "ethers": "5.7.2",
26
26
  "uuid": "^9.0.0",
27
27
  "viem": "2.17.0",
28
- "@funkit/api-base": "1.3.3"
28
+ "@funkit/api-base": "1.3.4"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/big.js": "^6.2.2",
32
32
  "@types/chai": "^4.3.5",
33
33
  "@types/mocha": "^10.0.1",
34
34
  "@types/uuid": "^9.0.1",
35
- "@typescript-eslint/eslint-plugin": "^5.59.7",
36
- "@typescript-eslint/parser": "^5.59.7",
37
35
  "chai": "^5.1.1",
38
- "eslint": "^8.41.0",
39
- "eslint-config-prettier": "^8.8.0",
40
- "eslint-plugin-import": "^2.27.5",
41
- "eslint-plugin-prettier": "^5.1.3",
42
- "eslint-plugin-unused-imports": "^2.0.0",
43
36
  "husky": "^8.0.3",
44
37
  "mocha": "^10.2.0",
45
- "prettier": "^2.8.8",
46
38
  "ts-mocha": "^10.0.0",
47
39
  "ts-node": "^10.9.1",
48
40
  "typescript": "^5.4.3"
@@ -87,9 +79,8 @@
87
79
  "staging-test-polygon": "env NODE_ENV=staging ts-mocha --exit tests/polygon/*.ts",
88
80
  "staging-test-scroll": "env NODE_ENV=staging ts-mocha --exit tests/scroll/factory.ts",
89
81
  "load": "node test/loader.js",
90
- "format": "prettier --write .",
91
- "lint": "eslint --ext .ts,.tsx './**/*.{ts,tsx}'",
92
- "lint:fix": "eslint --ext .ts,.tsx './**/*.{ts,tsx}' --fix",
82
+ "lint": "biome check",
83
+ "lint:fix": "biome check --fix",
93
84
  "add-token": "ts-node tests/addToken.ts",
94
85
  "fund-tenderly-account": "ts-node tests/scripts/fundAccount.ts"
95
86
  }