@pushchain/core 0.1.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.
Files changed (81) hide show
  1. package/README.md +241 -0
  2. package/package.json +30 -0
  3. package/src/index.d.ts +1 -0
  4. package/src/index.js +5 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/constants/abi/factoryV1.d.ts +81 -0
  7. package/src/lib/constants/abi/factoryV1.js +255 -0
  8. package/src/lib/constants/abi/factoryV1.js.map +1 -0
  9. package/src/lib/constants/abi/feeLocker.evm.d.ts +39 -0
  10. package/src/lib/constants/abi/feeLocker.evm.js +319 -0
  11. package/src/lib/constants/abi/feeLocker.evm.js.map +1 -0
  12. package/src/lib/constants/abi/feeLocker.json +230 -0
  13. package/src/lib/constants/abi/index.d.ts +5 -0
  14. package/src/lib/constants/abi/index.js +15 -0
  15. package/src/lib/constants/abi/index.js.map +1 -0
  16. package/src/lib/constants/abi/smartAccount.evm.d.ts +110 -0
  17. package/src/lib/constants/abi/smartAccount.evm.js +212 -0
  18. package/src/lib/constants/abi/smartAccount.evm.js.map +1 -0
  19. package/src/lib/constants/abi/smartAccount.svm.d.ts +106 -0
  20. package/src/lib/constants/abi/smartAccount.svm.js +209 -0
  21. package/src/lib/constants/abi/smartAccount.svm.js.map +1 -0
  22. package/src/lib/constants/chain.d.ts +32 -0
  23. package/src/lib/constants/chain.js +79 -0
  24. package/src/lib/constants/chain.js.map +1 -0
  25. package/src/lib/constants/enums.d.ts +30 -0
  26. package/src/lib/constants/enums.js +40 -0
  27. package/src/lib/constants/enums.js.map +1 -0
  28. package/src/lib/constants/index.d.ts +5 -0
  29. package/src/lib/constants/index.js +10 -0
  30. package/src/lib/constants/index.js.map +1 -0
  31. package/src/lib/generated/v1/tx.d.ts +83 -0
  32. package/src/lib/generated/v1/tx.js +616 -0
  33. package/src/lib/generated/v1/tx.js.map +1 -0
  34. package/src/lib/index.d.ts +3 -0
  35. package/src/lib/index.js +8 -0
  36. package/src/lib/index.js.map +1 -0
  37. package/src/lib/orchestrator/orchestrator.d.ts +63 -0
  38. package/src/lib/orchestrator/orchestrator.js +475 -0
  39. package/src/lib/orchestrator/orchestrator.js.map +1 -0
  40. package/src/lib/orchestrator/orchestrator.types.d.ts +44 -0
  41. package/src/lib/orchestrator/orchestrator.types.js +3 -0
  42. package/src/lib/orchestrator/orchestrator.types.js.map +1 -0
  43. package/src/lib/price-fetch/price-fetch.d.ts +13 -0
  44. package/src/lib/price-fetch/price-fetch.js +115 -0
  45. package/src/lib/price-fetch/price-fetch.js.map +1 -0
  46. package/src/lib/push-client/push-client.d.ts +47 -0
  47. package/src/lib/push-client/push-client.js +132 -0
  48. package/src/lib/push-client/push-client.js.map +1 -0
  49. package/src/lib/push-client/push-client.types.d.ts +5 -0
  50. package/src/lib/push-client/push-client.types.js +3 -0
  51. package/src/lib/push-client/push-client.types.js.map +1 -0
  52. package/src/lib/pushChain.d.ts +50 -0
  53. package/src/lib/pushChain.js +57 -0
  54. package/src/lib/pushChain.js.map +1 -0
  55. package/src/lib/universal/account/account.d.ts +51 -0
  56. package/src/lib/universal/account/account.js +114 -0
  57. package/src/lib/universal/account/account.js.map +1 -0
  58. package/src/lib/universal/account/index.d.ts +1 -0
  59. package/src/lib/universal/account/index.js +5 -0
  60. package/src/lib/universal/account/index.js.map +1 -0
  61. package/src/lib/universal/signer/index.d.ts +1 -0
  62. package/src/lib/universal/signer/index.js +5 -0
  63. package/src/lib/universal/signer/index.js.map +1 -0
  64. package/src/lib/universal/signer/signer.d.ts +40 -0
  65. package/src/lib/universal/signer/signer.js +138 -0
  66. package/src/lib/universal/signer/signer.js.map +1 -0
  67. package/src/lib/universal/universal.types.d.ts +52 -0
  68. package/src/lib/universal/universal.types.js +3 -0
  69. package/src/lib/universal/universal.types.js.map +1 -0
  70. package/src/lib/utils.d.ts +53 -0
  71. package/src/lib/utils.js +58 -0
  72. package/src/lib/utils.js.map +1 -0
  73. package/src/lib/vm-client/evm-client.d.ts +173 -0
  74. package/src/lib/vm-client/evm-client.js +244 -0
  75. package/src/lib/vm-client/evm-client.js.map +1 -0
  76. package/src/lib/vm-client/svm-client.d.ts +42 -0
  77. package/src/lib/vm-client/svm-client.js +136 -0
  78. package/src/lib/vm-client/svm-client.js.map +1 -0
  79. package/src/lib/vm-client/vm-client.types.d.ts +49 -0
  80. package/src/lib/vm-client/vm-client.types.js +3 -0
  81. package/src/lib/vm-client/vm-client.types.js.map +1 -0
package/README.md ADDED
@@ -0,0 +1,241 @@
1
+ # Push Chain Core
2
+
3
+ This package provides access to the Push Chain. Visit the [Developer Docs](https://push.org/docs)
4
+ or [Push.org](https://push.org) to learn more.
5
+
6
+ - [How to use in your app?](#how-to-use-in-your-app)
7
+ - [Installation](#installation)
8
+ - [Import SDK](#import-sdk)
9
+ - [Initialize SDK](#initialize-sdk)
10
+ - [Read-only mode (without signer)](#read-only-mode-without-signer)
11
+ - [With signer](#with-signer)
12
+ - [UniversalSigner structure](#universalsigner-structure)
13
+ - [Example using `viem` to create a UniversalSigner](#example-using-viem-to-create-a-universalsigner)
14
+ - [Execute Cross-Chain Transaction](#execute-cross-chain-transaction)
15
+ - [Utilities](#utilities)
16
+ - [Converts CAIP-10 address to UniversalAccount](#converts-caip-10-address-to-universalaccount)
17
+ - [Converts UniversalAccount to CAIP-10 address](#converts-universalaccount-to-caip-10-address)
18
+ - [Convert viem account or walletClient to UniversalSigner](#convert-viem-account-or-walletclient-to-universalsigner)
19
+ - [Convert Solana keypair to UniversalSigner](#convert-solana-keypair-to-universalsigner)
20
+
21
+ ---
22
+
23
+ ## How to use in your app?
24
+
25
+ ### Installation
26
+
27
+ ```bash
28
+ yarn add @pushchain/core
29
+ ```
30
+
31
+ or
32
+
33
+ ```bash
34
+ npm install @pushchain/core
35
+ ```
36
+
37
+ ---
38
+
39
+ ### Import SDK
40
+
41
+ ```ts
42
+ import { PushChain } from '@pushchain/core';
43
+ ```
44
+
45
+ ---
46
+
47
+ ### Initialize SDK
48
+
49
+ #### Read-only mode (without signer)
50
+
51
+ > 🟡 Coming soon
52
+ > You will be able to use the SDK in read-only mode for querying without attaching a signer.
53
+
54
+ ---
55
+
56
+ #### With signer
57
+
58
+ To send cross-chain transactions or perform signature-based validations, you need to initialize the SDK with a `UniversalSigner`.
59
+
60
+ The `UniversalSigner` abstracts signing across different chains and VMs (EVM, Solana, etc.), allowing Push Chain to use a unified interface for signing messages and transactions on the **source chain**.
61
+
62
+ > 💡 You can use `PushChain.utils.signer` to wrap native EVM or Solana signers into a compatible `UniversalSigner`.
63
+
64
+ ---
65
+
66
+ ##### UniversalSigner structure
67
+
68
+ ```ts
69
+ /**
70
+ * A chain-agnostic account representation.
71
+ * Used to represent a wallet address along with its chain context.
72
+ */
73
+ export interface UniversalAccount {
74
+ /**
75
+ * Fully qualified chain (e.g., CHAIN.ETHEREUM_SEPOLIA, CHAIN.SOLANA_DEVNET)
76
+ */
77
+ chain: CHAIN;
78
+
79
+ /**
80
+ * The address on the respective chain (EVM: checksummed, Solana: base58, etc.)
81
+ */
82
+ address: string;
83
+ }
84
+
85
+ /**
86
+ * A signer capable of signing messages for a specific chain.
87
+ * Used to abstract away signing across multiple VM types.
88
+ */
89
+ export interface UniversalSigner extends UniversalAccount {
90
+ /**
91
+ * Signs an arbitrary message as a Uint8Array.
92
+ * Use UTF-8 encoding for strings before signing.
93
+ */
94
+ signMessage: (data: Uint8Array) => Promise<Uint8Array>;
95
+
96
+ /**
97
+ * Signs EIP-712 typed data.
98
+ * Optional. Only required for EVM signers.
99
+ */
100
+ signTypedData?: ({
101
+ domain,
102
+ types,
103
+ primaryType,
104
+ message,
105
+ }: {
106
+ domain: TypedDataDomain;
107
+ types: TypedData;
108
+ primaryType: string;
109
+ message: Record<string, any>;
110
+ }) => Promise<Uint8Array>;
111
+
112
+ /**
113
+ * Signs a transaction (unsigned transaction bytes).
114
+ * Used for direct on-chain sending when necessary.
115
+ */
116
+ signTransaction: (unsignedTx: Uint8Array) => Promise<Uint8Array>;
117
+ }
118
+ ```
119
+
120
+ ---
121
+
122
+ ##### Example using `viem` to create a UniversalSigner
123
+
124
+ ```ts
125
+ import { hexToBytes } from 'viem';
126
+ import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts';
127
+ import { CHAIN } from '@pushchain/core/constants/enums';
128
+ import { PushChain } from '@pushchain/core';
129
+
130
+ const privateKey = generatePrivateKey();
131
+ const account = privateKeyToAccount(privateKey);
132
+
133
+ const signer: UniversalSigner = PushChain.utils.signer.toUniversalFromViem(
134
+ account,
135
+ CHAIN.ETHEREUM_SEPOLIA
136
+ );
137
+
138
+ const pushChain = await PushChain.initialize(signer);
139
+ ```
140
+
141
+ **Parameters:**
142
+
143
+ | Param | Type | Default | Description |
144
+ | ----------------- | ----------------- | --------- | ------------------------------------------------------------------------------ |
145
+ | `universalSigner` | `UniversalSigner` | `null` | Required for sending transactions or verifying signatures on the source chain. |
146
+ | `options.network` | `NETWORK` | `testnet` | Push Chain environment. Can be `testnet`, or `mainnet`. |
147
+
148
+ ---
149
+
150
+ ### Execute Cross-Chain Transaction
151
+
152
+ ```ts
153
+ pushchain.execute({
154
+ // Target to execute on Push Chain - Can be EOA or smart contract address
155
+ target: '0x2FE70447492307108Bdc7Ff6BaB33Ff37Dacc479',
156
+ // Amount to send to the target in npush
157
+ value: BigInt(0),
158
+ // Data to send to the target - contract function call data
159
+ data: '0x2ba2ed980000000000000000000000000000000000000000000000000000000000000312',
160
+ // Gas limit for the transaction on Push Chain
161
+ gasLimit: BigInt(50000000000000000),
162
+ // Max fee per gas on Push Chain
163
+ maxFeePerGas: BigInt(50000000000000000),
164
+ // Max priority fee per gas on Push Chain
165
+ maxPriorityFeePerGas: BigInt(200000000),
166
+ // Deadline for the transaction to be executed on Push Chain
167
+ deadline: BigInt(9999999999),
168
+ });
169
+ ```
170
+
171
+ **Parameters:**
172
+
173
+ | Param | Type | Default | Description |
174
+ | ---------------------- | -------- | ----------------------------- | -------------------------------------------------------------------------------- |
175
+ | `target` | `string` | — | Target address on Push Chain to execute the transaction. Can be EOA or contract. |
176
+ | `value` | `bigint` | - | Amount in **npush** (smallest unit) to transfer to the target address. |
177
+ | `data` | `string` | - | Hex-encoded calldata for the contract method to execute. |
178
+ | `gasLimit` | `bigint` | 21000000 | Max gas allowed for the transaction execution on Push Chain. |
179
+ | `maxFeePerGas` | `bigint` | 10000000000000000 | Maximum fee per unit of gas the sender is willing to pay. |
180
+ | `maxPriorityFeePerGas` | `bigint` | 2 | Priority tip for validators to include this tx (like EIP-1559). |
181
+ | `nonce` | `bigint` | Taken automatically from NMSC | Transaction execution order on Push Chain. |
182
+ | `deadline` | `bigint` | 9999999999 | Timestamp (in seconds) by which the tx must be included on Push Chain. |
183
+
184
+ ---
185
+
186
+ ## Utilities
187
+
188
+ ### Converts CAIP-10 address to UniversalAccount
189
+
190
+ Converts a chain-agnostic address (e.g. `eip155:1:0xabc...`) into a UniversalAccount.
191
+
192
+ ```typescript
193
+ const universalAccount = PushChain.utils.account.toUniversal(
194
+ 'eip155:11155111:0x35B84d6848D16415177c64D64504663b998A6ab4'
195
+ );
196
+ // => { chain: 'ETHEREUM_SEPOLIA', address: '0x35B84d6848D16415177c64D64504663b998A6ab4' }
197
+ ```
198
+
199
+ ### Converts UniversalAccount to CAIP-10 address
200
+
201
+ Converts a UniversalAccount into a chain-agnostic address (CAIP) string.
202
+
203
+ ```typescript
204
+ const chainAgnosticStr = PushChain.utils.account.toChainAgnostic({
205
+ chain: 'ETHEREUM_SEPOLIA',
206
+ address: '0x35B84d6848D16415177c64D64504663b998A6ab4',
207
+ });
208
+ // => 'eip155:11155111:0x35B84d6848D16415177c64D64504663b998A6ab4'
209
+ ```
210
+
211
+ ### Convert viem account or walletClient to UniversalSigner
212
+
213
+ ```ts
214
+ import { PushChain } from '@pushchain/core';
215
+ import { CHAIN } from '@pushchain/core/constants/enums';
216
+ import { privateKeyToAccount } from 'viem/accounts';
217
+
218
+ const account = privateKeyToAccount('0x...');
219
+ const universalSigner = PushChain.utils.signer.toUniversalFromViem(
220
+ account,
221
+ CHAIN.ETHEREUM_SEPOLIA
222
+ );
223
+ ```
224
+
225
+ You can also use this with viem’s `walletClient`.
226
+
227
+ ---
228
+
229
+ ### Convert Solana keypair to UniversalSigner
230
+
231
+ ```ts
232
+ import { Keypair } from '@solana/web3.js';
233
+ import { PushChain } from '@pushchain/core';
234
+ import { CHAIN } from '@pushchain/core/constants/enums';
235
+
236
+ const keypair = Keypair.generate();
237
+ const signer = PushChain.utils.signer.toUniversalFromSolanaKeypair(
238
+ keypair,
239
+ CHAIN.SOLANA_DEVNET
240
+ );
241
+ ```
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@pushchain/core",
3
+ "version": "0.1.0",
4
+ "dependencies": {
5
+ "@bufbuild/protobuf": "^2.0.0",
6
+ "@coral-xyz/anchor": "^0.31.0",
7
+ "@cosmjs/crypto": "0.33.1",
8
+ "@cosmjs/encoding": "0.33.1",
9
+ "@cosmjs/proto-signing": "^0.33.1",
10
+ "@cosmjs/stargate": "^0.33.1",
11
+ "@cosmjs/tendermint-rpc": "0.33.1",
12
+ "@solana/web3.js": "^1.68.0",
13
+ "cosmjs-types": "0.9.0",
14
+ "protobufjs": "7.4.0",
15
+ "tslib": "^2.3.0",
16
+ "tweetnacl": "^1.0.3",
17
+ "viem": "2.27.2"
18
+ },
19
+ "scripts": {
20
+ "build:proto": "scripts/protoc-generate.sh"
21
+ },
22
+ "type": "commonjs",
23
+ "main": "./src/index.js",
24
+ "typings": "./src/index.d.ts",
25
+ "devDependencies": {
26
+ "secp256k1": "^5.0.1",
27
+ "ts-proto": "^2.0.3"
28
+ },
29
+ "types": "./src/index.d.ts"
30
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib';
package/src/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/core/src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB"}
@@ -0,0 +1,81 @@
1
+ export declare const FACTORY_V1: ({
2
+ type: string;
3
+ inputs: {
4
+ name: string;
5
+ type: string;
6
+ internalType: string;
7
+ }[];
8
+ stateMutability: string;
9
+ name?: undefined;
10
+ outputs?: undefined;
11
+ anonymous?: undefined;
12
+ } | {
13
+ type: string;
14
+ name: string;
15
+ inputs: {
16
+ name: string;
17
+ type: string;
18
+ internalType: string;
19
+ }[];
20
+ outputs: {
21
+ name: string;
22
+ type: string;
23
+ internalType: string;
24
+ }[];
25
+ stateMutability: string;
26
+ anonymous?: undefined;
27
+ } | {
28
+ type: string;
29
+ name: string;
30
+ inputs: {
31
+ name: string;
32
+ type: string;
33
+ internalType: string;
34
+ components: {
35
+ name: string;
36
+ type: string;
37
+ internalType: string;
38
+ }[];
39
+ }[];
40
+ outputs: {
41
+ name: string;
42
+ type: string;
43
+ internalType: string;
44
+ }[];
45
+ stateMutability: string;
46
+ anonymous?: undefined;
47
+ } | {
48
+ type: string;
49
+ name: string;
50
+ inputs: ({
51
+ name: string;
52
+ type: string;
53
+ indexed: boolean;
54
+ internalType: string;
55
+ components?: undefined;
56
+ } | {
57
+ name: string;
58
+ type: string;
59
+ indexed: boolean;
60
+ internalType: string;
61
+ components: {
62
+ name: string;
63
+ type: string;
64
+ internalType: string;
65
+ }[];
66
+ })[];
67
+ anonymous: boolean;
68
+ stateMutability?: undefined;
69
+ outputs?: undefined;
70
+ } | {
71
+ type: string;
72
+ name: string;
73
+ inputs: {
74
+ name: string;
75
+ type: string;
76
+ internalType: string;
77
+ }[];
78
+ stateMutability?: undefined;
79
+ outputs?: undefined;
80
+ anonymous?: undefined;
81
+ })[];
@@ -0,0 +1,255 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FACTORY_V1 = void 0;
4
+ exports.FACTORY_V1 = [
5
+ {
6
+ type: 'constructor',
7
+ inputs: [
8
+ {
9
+ name: '_implementations',
10
+ type: 'address[]',
11
+ internalType: 'address[]',
12
+ },
13
+ { name: '_vmTypes', type: 'uint256[]', internalType: 'uint256[]' },
14
+ ],
15
+ stateMutability: 'nonpayable',
16
+ },
17
+ {
18
+ type: 'function',
19
+ name: 'accountImplmentationForVM',
20
+ inputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
21
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
22
+ stateMutability: 'view',
23
+ },
24
+ {
25
+ type: 'function',
26
+ name: 'computeSmartAccountAddress',
27
+ inputs: [
28
+ {
29
+ name: '_id',
30
+ type: 'tuple',
31
+ internalType: 'struct AccountId',
32
+ components: [
33
+ { name: 'namespace', type: 'string', internalType: 'string' },
34
+ { name: 'chainId', type: 'string', internalType: 'string' },
35
+ { name: 'ownerKey', type: 'bytes', internalType: 'bytes' },
36
+ {
37
+ name: 'vmType',
38
+ type: 'uint8',
39
+ internalType: 'enum VM_TYPE',
40
+ },
41
+ ],
42
+ },
43
+ ],
44
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
45
+ stateMutability: 'view',
46
+ },
47
+ {
48
+ type: 'function',
49
+ name: 'deploySmartAccount',
50
+ inputs: [
51
+ {
52
+ name: '_id',
53
+ type: 'tuple',
54
+ internalType: 'struct AccountId',
55
+ components: [
56
+ { name: 'namespace', type: 'string', internalType: 'string' },
57
+ { name: 'chainId', type: 'string', internalType: 'string' },
58
+ { name: 'ownerKey', type: 'bytes', internalType: 'bytes' },
59
+ {
60
+ name: 'vmType',
61
+ type: 'uint8',
62
+ internalType: 'enum VM_TYPE',
63
+ },
64
+ ],
65
+ },
66
+ ],
67
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
68
+ stateMutability: 'nonpayable',
69
+ },
70
+ {
71
+ type: 'function',
72
+ name: 'generateSalt',
73
+ inputs: [
74
+ {
75
+ name: '_id',
76
+ type: 'tuple',
77
+ internalType: 'struct AccountId',
78
+ components: [
79
+ { name: 'namespace', type: 'string', internalType: 'string' },
80
+ { name: 'chainId', type: 'string', internalType: 'string' },
81
+ { name: 'ownerKey', type: 'bytes', internalType: 'bytes' },
82
+ {
83
+ name: 'vmType',
84
+ type: 'uint8',
85
+ internalType: 'enum VM_TYPE',
86
+ },
87
+ ],
88
+ },
89
+ ],
90
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
91
+ stateMutability: 'pure',
92
+ },
93
+ {
94
+ type: 'function',
95
+ name: 'getImplementation',
96
+ inputs: [{ name: '_vmType', type: 'uint8', internalType: 'enum VM_TYPE' }],
97
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
98
+ stateMutability: 'view',
99
+ },
100
+ {
101
+ type: 'function',
102
+ name: 'owner',
103
+ inputs: [],
104
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
105
+ stateMutability: 'view',
106
+ },
107
+ {
108
+ type: 'function',
109
+ name: 'registerImplementation',
110
+ inputs: [
111
+ { name: '_vmType', type: 'uint256', internalType: 'uint256' },
112
+ {
113
+ name: '_implementation',
114
+ type: 'address',
115
+ internalType: 'address',
116
+ },
117
+ ],
118
+ outputs: [],
119
+ stateMutability: 'nonpayable',
120
+ },
121
+ {
122
+ type: 'function',
123
+ name: 'registerMultipleImplementations',
124
+ inputs: [
125
+ {
126
+ name: '_vmTypes',
127
+ type: 'uint256[]',
128
+ internalType: 'uint256[]',
129
+ },
130
+ {
131
+ name: '_implementations',
132
+ type: 'address[]',
133
+ internalType: 'address[]',
134
+ },
135
+ ],
136
+ outputs: [],
137
+ stateMutability: 'nonpayable',
138
+ },
139
+ {
140
+ type: 'function',
141
+ name: 'renounceOwnership',
142
+ inputs: [],
143
+ outputs: [],
144
+ stateMutability: 'nonpayable',
145
+ },
146
+ {
147
+ type: 'function',
148
+ name: 'transferOwnership',
149
+ inputs: [{ name: 'newOwner', type: 'address', internalType: 'address' }],
150
+ outputs: [],
151
+ stateMutability: 'nonpayable',
152
+ },
153
+ {
154
+ type: 'function',
155
+ name: 'userAccounts',
156
+ inputs: [{ name: '', type: 'bytes', internalType: 'bytes' }],
157
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
158
+ stateMutability: 'view',
159
+ },
160
+ {
161
+ type: 'event',
162
+ name: 'ImplementationRegistered',
163
+ inputs: [
164
+ {
165
+ name: 'vmType',
166
+ type: 'uint256',
167
+ indexed: true,
168
+ internalType: 'uint256',
169
+ },
170
+ {
171
+ name: 'implementation',
172
+ type: 'address',
173
+ indexed: false,
174
+ internalType: 'address',
175
+ },
176
+ ],
177
+ anonymous: false,
178
+ },
179
+ {
180
+ type: 'event',
181
+ name: 'OwnershipTransferred',
182
+ inputs: [
183
+ {
184
+ name: 'previousOwner',
185
+ type: 'address',
186
+ indexed: true,
187
+ internalType: 'address',
188
+ },
189
+ {
190
+ name: 'newOwner',
191
+ type: 'address',
192
+ indexed: true,
193
+ internalType: 'address',
194
+ },
195
+ ],
196
+ anonymous: false,
197
+ },
198
+ {
199
+ type: 'event',
200
+ name: 'SmartAccountDeployed',
201
+ inputs: [
202
+ {
203
+ name: 'smartAccount',
204
+ type: 'address',
205
+ indexed: true,
206
+ internalType: 'address',
207
+ },
208
+ {
209
+ name: 'ownerKey',
210
+ type: 'bytes',
211
+ indexed: false,
212
+ internalType: 'bytes',
213
+ },
214
+ {
215
+ name: 'id',
216
+ type: 'tuple',
217
+ indexed: false,
218
+ internalType: 'struct AccountId',
219
+ components: [
220
+ { name: 'namespace', type: 'string', internalType: 'string' },
221
+ { name: 'chainId', type: 'string', internalType: 'string' },
222
+ { name: 'ownerKey', type: 'bytes', internalType: 'bytes' },
223
+ {
224
+ name: 'vmType',
225
+ type: 'uint8',
226
+ internalType: 'enum VM_TYPE',
227
+ },
228
+ ],
229
+ },
230
+ ],
231
+ anonymous: false,
232
+ },
233
+ { type: 'error', name: 'AccountAlreadyExists', inputs: [] },
234
+ { type: 'error', name: 'FailedDeployment', inputs: [] },
235
+ {
236
+ type: 'error',
237
+ name: 'InsufficientBalance',
238
+ inputs: [
239
+ { name: 'balance', type: 'uint256', internalType: 'uint256' },
240
+ { name: 'needed', type: 'uint256', internalType: 'uint256' },
241
+ ],
242
+ },
243
+ { type: 'error', name: 'InvalidInputArgs', inputs: [] },
244
+ {
245
+ type: 'error',
246
+ name: 'OwnableInvalidOwner',
247
+ inputs: [{ name: 'owner', type: 'address', internalType: 'address' }],
248
+ },
249
+ {
250
+ type: 'error',
251
+ name: 'OwnableUnauthorizedAccount',
252
+ inputs: [{ name: 'account', type: 'address', internalType: 'address' }],
253
+ },
254
+ ];
255
+ //# sourceMappingURL=factoryV1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factoryV1.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/constants/abi/factoryV1.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACxB;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,WAAW;gBACjB,YAAY,EAAE,WAAW;aAC1B;YACD,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE;SACnE;QACD,eAAe,EAAE,YAAY;KAC9B;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,2BAA2B;QACjC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;QAChE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;QACjE,eAAe,EAAE,MAAM;KACxB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,4BAA4B;QAClC,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,KAAK;gB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oBAC3D,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE;oBAC1D;wBACE,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,OAAO;wBACb,YAAY,EAAE,cAAc;qBAC7B;iBACF;aACF;SACF;QACD,SAAS,EAAE,KAAK;KACjB;IACD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,EAAE,EAAE,EAAE;IAC3D,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,EAAE;IACvD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;YAC7D,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;SAC7D;KACF;IACD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,EAAE;IACvD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;KACtE;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,4BAA4B;QAClC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;KACxE;CACF,CAAC"}
@@ -0,0 +1,39 @@
1
+ export declare const FEE_LOCKER_EVM: ({
2
+ inputs: {
3
+ internalType: string;
4
+ name: string;
5
+ type: string;
6
+ }[];
7
+ name: string;
8
+ type: string;
9
+ anonymous?: undefined;
10
+ outputs?: undefined;
11
+ stateMutability?: undefined;
12
+ } | {
13
+ anonymous: boolean;
14
+ inputs: {
15
+ indexed: boolean;
16
+ internalType: string;
17
+ name: string;
18
+ type: string;
19
+ }[];
20
+ name: string;
21
+ type: string;
22
+ outputs?: undefined;
23
+ stateMutability?: undefined;
24
+ } | {
25
+ inputs: {
26
+ internalType: string;
27
+ name: string;
28
+ type: string;
29
+ }[];
30
+ name: string;
31
+ outputs: {
32
+ internalType: string;
33
+ name: string;
34
+ type: string;
35
+ }[];
36
+ stateMutability: string;
37
+ type: string;
38
+ anonymous?: undefined;
39
+ })[];