@1llet.xyz/erc4337-gasless-sdk 0.2.0 → 0.4.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/src/constants.ts DELETED
@@ -1,131 +0,0 @@
1
- export const DEFAULT_ENTRYPOINT = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";
2
- export const DEFAULT_FACTORY = "0x9406Cc6185a346906296840746125a0E44976454"; // SimpleAccountFactory v0.6
3
-
4
- export const factoryAbi = [
5
- {
6
- inputs: [
7
- { name: "owner", type: "address" },
8
- { name: "salt", type: "uint256" },
9
- ],
10
- name: "getAccountAddress",
11
- outputs: [{ name: "", type: "address" }],
12
- stateMutability: "view",
13
- type: "function",
14
- },
15
- {
16
- inputs: [
17
- { name: "owner", type: "address" },
18
- { name: "salt", type: "uint256" },
19
- ],
20
- name: "isAccountDeployed",
21
- outputs: [{ name: "", type: "bool" }],
22
- stateMutability: "view",
23
- type: "function",
24
- },
25
- {
26
- inputs: [
27
- { name: "owner", type: "address" },
28
- { name: "salt", type: "uint256" },
29
- ],
30
- name: "createAccount",
31
- outputs: [{ name: "account", type: "address" }],
32
- stateMutability: "nonpayable",
33
- type: "function",
34
- },
35
- ] as const;
36
-
37
- export const entryPointAbi = [
38
- {
39
- inputs: [
40
- { name: "sender", type: "address" },
41
- { name: "key", type: "uint192" },
42
- ],
43
- name: "getNonce",
44
- outputs: [{ name: "nonce", type: "uint256" }],
45
- stateMutability: "view",
46
- type: "function",
47
- },
48
- ] as const;
49
-
50
- export const smartAccountAbi = [
51
- {
52
- inputs: [
53
- { name: "target", type: "address" },
54
- { name: "value", type: "uint256" },
55
- { name: "data", type: "bytes" },
56
- ],
57
- name: "execute",
58
- outputs: [],
59
- stateMutability: "nonpayable",
60
- type: "function",
61
- },
62
- {
63
- inputs: [
64
- { name: "targets", type: "address[]" },
65
- { name: "values", type: "uint256[]" },
66
- { name: "datas", type: "bytes[]" },
67
- ],
68
- name: "executeBatch",
69
- outputs: [],
70
- stateMutability: "nonpayable",
71
- type: "function",
72
- },
73
- ] as const;
74
-
75
- export const erc20Abi = [
76
- {
77
- inputs: [{ name: "account", type: "address" }],
78
- name: "balanceOf",
79
- outputs: [{ name: "", type: "uint256" }],
80
- stateMutability: "view",
81
- type: "function",
82
- },
83
- {
84
- inputs: [
85
- { name: "to", type: "address" },
86
- { name: "amount", type: "uint256" },
87
- ],
88
- name: "transfer",
89
- outputs: [{ name: "", type: "bool" }],
90
- stateMutability: "nonpayable",
91
- type: "function",
92
- },
93
- {
94
- inputs: [
95
- { name: "spender", type: "address" },
96
- { name: "amount", type: "uint256" },
97
- ],
98
- name: "approve",
99
- outputs: [{ name: "", type: "bool" }],
100
- stateMutability: "nonpayable",
101
- type: "function",
102
- },
103
- {
104
- inputs: [
105
- { name: "owner", type: "address" },
106
- { name: "spender", type: "address" },
107
- ],
108
- name: "allowance",
109
- outputs: [{ name: "", type: "uint256" }],
110
- stateMutability: "view",
111
- type: "function",
112
- },
113
- {
114
- inputs: [
115
- { name: "from", type: "address" },
116
- { name: "to", type: "address" },
117
- { name: "amount", type: "uint256" },
118
- ],
119
- name: "transferFrom",
120
- outputs: [{ name: "", type: "bool" }],
121
- stateMutability: "nonpayable",
122
- type: "function",
123
- },
124
- {
125
- inputs: [],
126
- name: "decimals",
127
- outputs: [{ name: "", type: "uint8" }],
128
- stateMutability: "view",
129
- type: "function",
130
- },
131
- ] as const;
@@ -1,22 +0,0 @@
1
- import { type Address } from "viem";
2
-
3
- export const DEPLOYMENTS: Record<number, {
4
- entryPoint: Address;
5
- factory: Address;
6
- paymaster?: Address;
7
- usdc: Address;
8
- }> = {
9
- // Base Mainnet
10
- 8453: {
11
- entryPoint: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
12
- factory: "0xe2584152891E4769025807DEa0cD611F135aDC68",
13
- paymaster: "0x1e13Eb16C565E3f3FDe49A011755e50410bb1F95",
14
- usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
15
- },
16
- // Base Sepolia
17
- 84532: {
18
- entryPoint: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
19
- factory: "0x9406Cc6185a346906296840746125a0E44976454",
20
- usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
21
- }
22
- };
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from "./AccountAbstraction";
2
- export * from "./types";
3
- export * from "./constants";
4
- export * from "./deployments";
package/src/types.ts DELETED
@@ -1,51 +0,0 @@
1
- import { type Address, type Chain, type Hash, type Hex } from "viem";
2
-
3
- export interface ChainConfig {
4
- chain: Chain;
5
- rpcUrl?: string; // Optional, defaults to chain.rpcUrls.default
6
- bundlerUrl: string;
7
- entryPointAddress?: Address;
8
- factoryAddress?: Address;
9
- paymasterAddress?: Address;
10
- usdcAddress?: Address;
11
- }
12
-
13
- export interface UserOperation {
14
- sender: Address;
15
- nonce: bigint;
16
- initCode: Hex;
17
- callData: Hex;
18
- callGasLimit: bigint;
19
- verificationGasLimit: bigint;
20
- preVerificationGas: bigint;
21
- maxFeePerGas: bigint;
22
- maxPriorityFeePerGas: bigint;
23
- paymasterAndData: Hex;
24
- signature: Hex;
25
- }
26
-
27
- export interface GasEstimate {
28
- callGasLimit: string;
29
- verificationGasLimit: string;
30
- preVerificationGas: string;
31
- maxFeePerGas: string;
32
- maxPriorityFeePerGas: string;
33
- }
34
-
35
- export interface UserOpReceipt {
36
- userOpHash: Hash;
37
- sender: Address;
38
- success: boolean;
39
- actualGasCost: string;
40
- receipt: {
41
- transactionHash: Hash;
42
- blockNumber: string;
43
- };
44
- }
45
-
46
- export interface ApprovalSupportResult {
47
- type: "permit" | "approve" | "none";
48
- gasCost?: string;
49
- fundingNeeded?: string;
50
- fundedAmount?: string;
51
- }
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "declaration": true,
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "skipLibCheck": true,
10
- "forceConsistentCasingInFileNames": true
11
- },
12
- "include": [
13
- "src/**/*"
14
- ],
15
- "exclude": [
16
- "node_modules",
17
- "dist"
18
- ]
19
- }
package/tsup.config.ts DELETED
@@ -1,10 +0,0 @@
1
- import { defineConfig } from "tsup";
2
-
3
- export default defineConfig({
4
- entry: ["src/index.ts"],
5
- format: ["cjs", "esm"], // Build for commonjs and esmodules
6
- dts: true, // Generate declaration file (.d.ts)
7
- splitting: false,
8
- sourcemap: true,
9
- clean: true,
10
- });