@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.
- package/README.md +241 -0
- package/package.json +30 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +5 -0
- package/src/index.js.map +1 -0
- package/src/lib/constants/abi/factoryV1.d.ts +81 -0
- package/src/lib/constants/abi/factoryV1.js +255 -0
- package/src/lib/constants/abi/factoryV1.js.map +1 -0
- package/src/lib/constants/abi/feeLocker.evm.d.ts +39 -0
- package/src/lib/constants/abi/feeLocker.evm.js +319 -0
- package/src/lib/constants/abi/feeLocker.evm.js.map +1 -0
- package/src/lib/constants/abi/feeLocker.json +230 -0
- package/src/lib/constants/abi/index.d.ts +5 -0
- package/src/lib/constants/abi/index.js +15 -0
- package/src/lib/constants/abi/index.js.map +1 -0
- package/src/lib/constants/abi/smartAccount.evm.d.ts +110 -0
- package/src/lib/constants/abi/smartAccount.evm.js +212 -0
- package/src/lib/constants/abi/smartAccount.evm.js.map +1 -0
- package/src/lib/constants/abi/smartAccount.svm.d.ts +106 -0
- package/src/lib/constants/abi/smartAccount.svm.js +209 -0
- package/src/lib/constants/abi/smartAccount.svm.js.map +1 -0
- package/src/lib/constants/chain.d.ts +32 -0
- package/src/lib/constants/chain.js +79 -0
- package/src/lib/constants/chain.js.map +1 -0
- package/src/lib/constants/enums.d.ts +30 -0
- package/src/lib/constants/enums.js +40 -0
- package/src/lib/constants/enums.js.map +1 -0
- package/src/lib/constants/index.d.ts +5 -0
- package/src/lib/constants/index.js +10 -0
- package/src/lib/constants/index.js.map +1 -0
- package/src/lib/generated/v1/tx.d.ts +83 -0
- package/src/lib/generated/v1/tx.js +616 -0
- package/src/lib/generated/v1/tx.js.map +1 -0
- package/src/lib/index.d.ts +3 -0
- package/src/lib/index.js +8 -0
- package/src/lib/index.js.map +1 -0
- package/src/lib/orchestrator/orchestrator.d.ts +63 -0
- package/src/lib/orchestrator/orchestrator.js +475 -0
- package/src/lib/orchestrator/orchestrator.js.map +1 -0
- package/src/lib/orchestrator/orchestrator.types.d.ts +44 -0
- package/src/lib/orchestrator/orchestrator.types.js +3 -0
- package/src/lib/orchestrator/orchestrator.types.js.map +1 -0
- package/src/lib/price-fetch/price-fetch.d.ts +13 -0
- package/src/lib/price-fetch/price-fetch.js +115 -0
- package/src/lib/price-fetch/price-fetch.js.map +1 -0
- package/src/lib/push-client/push-client.d.ts +47 -0
- package/src/lib/push-client/push-client.js +132 -0
- package/src/lib/push-client/push-client.js.map +1 -0
- package/src/lib/push-client/push-client.types.d.ts +5 -0
- package/src/lib/push-client/push-client.types.js +3 -0
- package/src/lib/push-client/push-client.types.js.map +1 -0
- package/src/lib/pushChain.d.ts +50 -0
- package/src/lib/pushChain.js +57 -0
- package/src/lib/pushChain.js.map +1 -0
- package/src/lib/universal/account/account.d.ts +51 -0
- package/src/lib/universal/account/account.js +114 -0
- package/src/lib/universal/account/account.js.map +1 -0
- package/src/lib/universal/account/index.d.ts +1 -0
- package/src/lib/universal/account/index.js +5 -0
- package/src/lib/universal/account/index.js.map +1 -0
- package/src/lib/universal/signer/index.d.ts +1 -0
- package/src/lib/universal/signer/index.js +5 -0
- package/src/lib/universal/signer/index.js.map +1 -0
- package/src/lib/universal/signer/signer.d.ts +40 -0
- package/src/lib/universal/signer/signer.js +138 -0
- package/src/lib/universal/signer/signer.js.map +1 -0
- package/src/lib/universal/universal.types.d.ts +52 -0
- package/src/lib/universal/universal.types.js +3 -0
- package/src/lib/universal/universal.types.js.map +1 -0
- package/src/lib/utils.d.ts +53 -0
- package/src/lib/utils.js +58 -0
- package/src/lib/utils.js.map +1 -0
- package/src/lib/vm-client/evm-client.d.ts +173 -0
- package/src/lib/vm-client/evm-client.js +244 -0
- package/src/lib/vm-client/evm-client.js.map +1 -0
- package/src/lib/vm-client/svm-client.d.ts +42 -0
- package/src/lib/vm-client/svm-client.js +136 -0
- package/src/lib/vm-client/svm-client.js.map +1 -0
- package/src/lib/vm-client/vm-client.types.d.ts +49 -0
- package/src/lib/vm-client/vm-client.types.js +3 -0
- package/src/lib/vm-client/vm-client.types.js.map +1 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export declare const SMART_ACCOUNT_EVM: ({
|
|
2
|
+
type: string;
|
|
3
|
+
inputs: never[];
|
|
4
|
+
stateMutability: string;
|
|
5
|
+
name?: undefined;
|
|
6
|
+
outputs?: undefined;
|
|
7
|
+
anonymous?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
type: string;
|
|
10
|
+
stateMutability: string;
|
|
11
|
+
inputs?: undefined;
|
|
12
|
+
name?: undefined;
|
|
13
|
+
outputs?: undefined;
|
|
14
|
+
anonymous?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
type: string;
|
|
17
|
+
name: string;
|
|
18
|
+
inputs: never[];
|
|
19
|
+
outputs: {
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
internalType: string;
|
|
23
|
+
components: {
|
|
24
|
+
name: string;
|
|
25
|
+
type: string;
|
|
26
|
+
internalType: string;
|
|
27
|
+
}[];
|
|
28
|
+
}[];
|
|
29
|
+
stateMutability: string;
|
|
30
|
+
anonymous?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
type: string;
|
|
33
|
+
name: string;
|
|
34
|
+
inputs: ({
|
|
35
|
+
name: string;
|
|
36
|
+
type: string;
|
|
37
|
+
internalType: string;
|
|
38
|
+
components: {
|
|
39
|
+
name: string;
|
|
40
|
+
type: string;
|
|
41
|
+
internalType: string;
|
|
42
|
+
}[];
|
|
43
|
+
} | {
|
|
44
|
+
name: string;
|
|
45
|
+
type: string;
|
|
46
|
+
internalType: string;
|
|
47
|
+
components?: undefined;
|
|
48
|
+
})[];
|
|
49
|
+
outputs: never[];
|
|
50
|
+
stateMutability: string;
|
|
51
|
+
anonymous?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
type: string;
|
|
54
|
+
name: string;
|
|
55
|
+
inputs: {
|
|
56
|
+
name: string;
|
|
57
|
+
type: string;
|
|
58
|
+
internalType: string;
|
|
59
|
+
components: {
|
|
60
|
+
name: string;
|
|
61
|
+
type: string;
|
|
62
|
+
internalType: string;
|
|
63
|
+
}[];
|
|
64
|
+
}[];
|
|
65
|
+
outputs: {
|
|
66
|
+
name: string;
|
|
67
|
+
type: string;
|
|
68
|
+
internalType: string;
|
|
69
|
+
}[];
|
|
70
|
+
stateMutability: string;
|
|
71
|
+
anonymous?: undefined;
|
|
72
|
+
} | {
|
|
73
|
+
type: string;
|
|
74
|
+
name: string;
|
|
75
|
+
inputs: {
|
|
76
|
+
name: string;
|
|
77
|
+
type: string;
|
|
78
|
+
internalType: string;
|
|
79
|
+
}[];
|
|
80
|
+
outputs: {
|
|
81
|
+
name: string;
|
|
82
|
+
type: string;
|
|
83
|
+
internalType: string;
|
|
84
|
+
}[];
|
|
85
|
+
stateMutability: string;
|
|
86
|
+
anonymous?: undefined;
|
|
87
|
+
} | {
|
|
88
|
+
type: string;
|
|
89
|
+
name: string;
|
|
90
|
+
inputs: {
|
|
91
|
+
name: string;
|
|
92
|
+
type: string;
|
|
93
|
+
indexed: boolean;
|
|
94
|
+
internalType: string;
|
|
95
|
+
}[];
|
|
96
|
+
anonymous: boolean;
|
|
97
|
+
stateMutability?: undefined;
|
|
98
|
+
outputs?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
type: string;
|
|
101
|
+
name: string;
|
|
102
|
+
inputs: {
|
|
103
|
+
name: string;
|
|
104
|
+
type: string;
|
|
105
|
+
internalType: string;
|
|
106
|
+
}[];
|
|
107
|
+
stateMutability?: undefined;
|
|
108
|
+
outputs?: undefined;
|
|
109
|
+
anonymous?: undefined;
|
|
110
|
+
})[];
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMART_ACCOUNT_EVM = void 0;
|
|
4
|
+
exports.SMART_ACCOUNT_EVM = [
|
|
5
|
+
{ type: 'constructor', inputs: [], stateMutability: 'nonpayable' },
|
|
6
|
+
{ type: 'receive', stateMutability: 'payable' },
|
|
7
|
+
{
|
|
8
|
+
type: 'function',
|
|
9
|
+
name: 'VERSION',
|
|
10
|
+
inputs: [],
|
|
11
|
+
outputs: [{ name: '', type: 'string', internalType: 'string' }],
|
|
12
|
+
stateMutability: 'view',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: 'function',
|
|
16
|
+
name: 'accountId',
|
|
17
|
+
inputs: [],
|
|
18
|
+
outputs: [
|
|
19
|
+
{
|
|
20
|
+
name: '',
|
|
21
|
+
type: 'tuple',
|
|
22
|
+
internalType: 'struct AccountId',
|
|
23
|
+
components: [
|
|
24
|
+
{ name: 'namespace', type: 'string', internalType: 'string' },
|
|
25
|
+
{ name: 'chainId', type: 'string', internalType: 'string' },
|
|
26
|
+
{ name: 'ownerKey', type: 'bytes', internalType: 'bytes' },
|
|
27
|
+
{
|
|
28
|
+
name: 'vmType',
|
|
29
|
+
type: 'uint8',
|
|
30
|
+
internalType: 'enum VM_TYPE',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
stateMutability: 'view',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'function',
|
|
39
|
+
name: 'domainSeparator',
|
|
40
|
+
inputs: [],
|
|
41
|
+
outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
|
|
42
|
+
stateMutability: 'view',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'function',
|
|
46
|
+
name: 'executePayload',
|
|
47
|
+
inputs: [
|
|
48
|
+
{
|
|
49
|
+
name: 'payload',
|
|
50
|
+
type: 'tuple',
|
|
51
|
+
internalType: 'struct CrossChainPayload',
|
|
52
|
+
components: [
|
|
53
|
+
{ name: 'target', type: 'address', internalType: 'address' },
|
|
54
|
+
{ name: 'value', type: 'uint256', internalType: 'uint256' },
|
|
55
|
+
{ name: 'data', type: 'bytes', internalType: 'bytes' },
|
|
56
|
+
{
|
|
57
|
+
name: 'gasLimit',
|
|
58
|
+
type: 'uint256',
|
|
59
|
+
internalType: 'uint256',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'maxFeePerGas',
|
|
63
|
+
type: 'uint256',
|
|
64
|
+
internalType: 'uint256',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'maxPriorityFeePerGas',
|
|
68
|
+
type: 'uint256',
|
|
69
|
+
internalType: 'uint256',
|
|
70
|
+
},
|
|
71
|
+
{ name: 'nonce', type: 'uint256', internalType: 'uint256' },
|
|
72
|
+
{ name: 'deadline', type: 'uint256', internalType: 'uint256' },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{ name: 'signature', type: 'bytes', internalType: 'bytes' },
|
|
76
|
+
],
|
|
77
|
+
outputs: [],
|
|
78
|
+
stateMutability: 'nonpayable',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'function',
|
|
82
|
+
name: 'getTransactionHash',
|
|
83
|
+
inputs: [
|
|
84
|
+
{
|
|
85
|
+
name: 'payload',
|
|
86
|
+
type: 'tuple',
|
|
87
|
+
internalType: 'struct CrossChainPayload',
|
|
88
|
+
components: [
|
|
89
|
+
{ name: 'target', type: 'address', internalType: 'address' },
|
|
90
|
+
{ name: 'value', type: 'uint256', internalType: 'uint256' },
|
|
91
|
+
{ name: 'data', type: 'bytes', internalType: 'bytes' },
|
|
92
|
+
{
|
|
93
|
+
name: 'gasLimit',
|
|
94
|
+
type: 'uint256',
|
|
95
|
+
internalType: 'uint256',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'maxFeePerGas',
|
|
99
|
+
type: 'uint256',
|
|
100
|
+
internalType: 'uint256',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'maxPriorityFeePerGas',
|
|
104
|
+
type: 'uint256',
|
|
105
|
+
internalType: 'uint256',
|
|
106
|
+
},
|
|
107
|
+
{ name: 'nonce', type: 'uint256', internalType: 'uint256' },
|
|
108
|
+
{ name: 'deadline', type: 'uint256', internalType: 'uint256' },
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
|
|
113
|
+
stateMutability: 'view',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: 'function',
|
|
117
|
+
name: 'initialize',
|
|
118
|
+
inputs: [
|
|
119
|
+
{
|
|
120
|
+
name: '_accountId',
|
|
121
|
+
type: 'tuple',
|
|
122
|
+
internalType: 'struct AccountId',
|
|
123
|
+
components: [
|
|
124
|
+
{ name: 'namespace', type: 'string', internalType: 'string' },
|
|
125
|
+
{ name: 'chainId', type: 'string', internalType: 'string' },
|
|
126
|
+
{ name: 'ownerKey', type: 'bytes', internalType: 'bytes' },
|
|
127
|
+
{
|
|
128
|
+
name: 'vmType',
|
|
129
|
+
type: 'uint8',
|
|
130
|
+
internalType: 'enum VM_TYPE',
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
outputs: [],
|
|
136
|
+
stateMutability: 'nonpayable',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
type: 'function',
|
|
140
|
+
name: 'nonce',
|
|
141
|
+
inputs: [],
|
|
142
|
+
outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
|
|
143
|
+
stateMutability: 'view',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'function',
|
|
147
|
+
name: 'verifyPayloadSignature',
|
|
148
|
+
inputs: [
|
|
149
|
+
{ name: 'messageHash', type: 'bytes32', internalType: 'bytes32' },
|
|
150
|
+
{ name: 'signature', type: 'bytes', internalType: 'bytes' },
|
|
151
|
+
],
|
|
152
|
+
outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
|
|
153
|
+
stateMutability: 'view',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: 'event',
|
|
157
|
+
name: 'Initialized',
|
|
158
|
+
inputs: [
|
|
159
|
+
{
|
|
160
|
+
name: 'version',
|
|
161
|
+
type: 'uint64',
|
|
162
|
+
indexed: false,
|
|
163
|
+
internalType: 'uint64',
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
anonymous: false,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
type: 'event',
|
|
170
|
+
name: 'PayloadExecuted',
|
|
171
|
+
inputs: [
|
|
172
|
+
{
|
|
173
|
+
name: 'caller',
|
|
174
|
+
type: 'bytes',
|
|
175
|
+
indexed: false,
|
|
176
|
+
internalType: 'bytes',
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: 'target',
|
|
180
|
+
type: 'address',
|
|
181
|
+
indexed: false,
|
|
182
|
+
internalType: 'address',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'data',
|
|
186
|
+
type: 'bytes',
|
|
187
|
+
indexed: false,
|
|
188
|
+
internalType: 'bytes',
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
anonymous: false,
|
|
192
|
+
},
|
|
193
|
+
{ type: 'error', name: 'ECDSAInvalidSignature', inputs: [] },
|
|
194
|
+
{
|
|
195
|
+
type: 'error',
|
|
196
|
+
name: 'ECDSAInvalidSignatureLength',
|
|
197
|
+
inputs: [{ name: 'length', type: 'uint256', internalType: 'uint256' }],
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
type: 'error',
|
|
201
|
+
name: 'ECDSAInvalidSignatureS',
|
|
202
|
+
inputs: [{ name: 's', type: 'bytes32', internalType: 'bytes32' }],
|
|
203
|
+
},
|
|
204
|
+
{ type: 'error', name: 'ExecutionFailed', inputs: [] },
|
|
205
|
+
{ type: 'error', name: 'ExpiredDeadline', inputs: [] },
|
|
206
|
+
{ type: 'error', name: 'InvalidEVMSignature', inputs: [] },
|
|
207
|
+
{ type: 'error', name: 'InvalidInitialization', inputs: [] },
|
|
208
|
+
{ type: 'error', name: 'InvalidInputArgs', inputs: [] },
|
|
209
|
+
{ type: 'error', name: 'NotInitializing', inputs: [] },
|
|
210
|
+
{ type: 'error', name: 'ReentrancyGuardReentrantCall', inputs: [] },
|
|
211
|
+
];
|
|
212
|
+
//# sourceMappingURL=smartAccount.evm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartAccount.evm.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/constants/abi/smartAccount.evm.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE;IAClE,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE;IAC/C;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;QAC/D,eAAe,EAAE,MAAM;KACxB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,OAAO;gBACb,YAAY,EAAE,kBAAkB;gBAChC,UAAU,EAAE;oBACV,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE;oBAC7D,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE;oBAC3D,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE;oBAC1D;wBACE,IAAI,EAAE,QAAQ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uB,EAAE,MAAM,EAAE,EAAE,EAAE;IAC5D,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,EAAE;IACvD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,EAAE,EAAE;IACtD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,8BAA8B,EAAE,MAAM,EAAE,EAAE,EAAE;CACpE,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export declare const SMART_ACCOUNT_SVM: ({
|
|
2
|
+
type: string;
|
|
3
|
+
inputs: never[];
|
|
4
|
+
stateMutability: string;
|
|
5
|
+
name?: undefined;
|
|
6
|
+
outputs?: undefined;
|
|
7
|
+
anonymous?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
type: string;
|
|
10
|
+
stateMutability: string;
|
|
11
|
+
inputs?: undefined;
|
|
12
|
+
name?: undefined;
|
|
13
|
+
outputs?: undefined;
|
|
14
|
+
anonymous?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
type: string;
|
|
17
|
+
name: string;
|
|
18
|
+
inputs: never[];
|
|
19
|
+
outputs: {
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
internalType: string;
|
|
23
|
+
components: {
|
|
24
|
+
name: string;
|
|
25
|
+
type: string;
|
|
26
|
+
internalType: string;
|
|
27
|
+
}[];
|
|
28
|
+
}[];
|
|
29
|
+
stateMutability: string;
|
|
30
|
+
anonymous?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
type: string;
|
|
33
|
+
name: string;
|
|
34
|
+
inputs: ({
|
|
35
|
+
name: string;
|
|
36
|
+
type: string;
|
|
37
|
+
internalType: string;
|
|
38
|
+
components: {
|
|
39
|
+
name: string;
|
|
40
|
+
type: string;
|
|
41
|
+
internalType: string;
|
|
42
|
+
}[];
|
|
43
|
+
} | {
|
|
44
|
+
name: string;
|
|
45
|
+
type: string;
|
|
46
|
+
internalType: string;
|
|
47
|
+
components?: undefined;
|
|
48
|
+
})[];
|
|
49
|
+
outputs: never[];
|
|
50
|
+
stateMutability: string;
|
|
51
|
+
anonymous?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
type: string;
|
|
54
|
+
name: string;
|
|
55
|
+
inputs: {
|
|
56
|
+
name: string;
|
|
57
|
+
type: string;
|
|
58
|
+
internalType: string;
|
|
59
|
+
components: {
|
|
60
|
+
name: string;
|
|
61
|
+
type: string;
|
|
62
|
+
internalType: string;
|
|
63
|
+
}[];
|
|
64
|
+
}[];
|
|
65
|
+
outputs: {
|
|
66
|
+
name: string;
|
|
67
|
+
type: string;
|
|
68
|
+
internalType: string;
|
|
69
|
+
}[];
|
|
70
|
+
stateMutability: string;
|
|
71
|
+
anonymous?: undefined;
|
|
72
|
+
} | {
|
|
73
|
+
type: string;
|
|
74
|
+
name: string;
|
|
75
|
+
inputs: {
|
|
76
|
+
name: string;
|
|
77
|
+
type: string;
|
|
78
|
+
internalType: string;
|
|
79
|
+
}[];
|
|
80
|
+
outputs: {
|
|
81
|
+
name: string;
|
|
82
|
+
type: string;
|
|
83
|
+
internalType: string;
|
|
84
|
+
}[];
|
|
85
|
+
stateMutability: string;
|
|
86
|
+
anonymous?: undefined;
|
|
87
|
+
} | {
|
|
88
|
+
type: string;
|
|
89
|
+
name: string;
|
|
90
|
+
inputs: {
|
|
91
|
+
name: string;
|
|
92
|
+
type: string;
|
|
93
|
+
indexed: boolean;
|
|
94
|
+
internalType: string;
|
|
95
|
+
}[];
|
|
96
|
+
anonymous: boolean;
|
|
97
|
+
stateMutability?: undefined;
|
|
98
|
+
outputs?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
type: string;
|
|
101
|
+
name: string;
|
|
102
|
+
inputs: never[];
|
|
103
|
+
stateMutability?: undefined;
|
|
104
|
+
outputs?: undefined;
|
|
105
|
+
anonymous?: undefined;
|
|
106
|
+
})[];
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMART_ACCOUNT_SVM = void 0;
|
|
4
|
+
exports.SMART_ACCOUNT_SVM = [
|
|
5
|
+
{ type: 'constructor', inputs: [], stateMutability: 'nonpayable' },
|
|
6
|
+
{ type: 'receive', stateMutability: 'payable' },
|
|
7
|
+
{
|
|
8
|
+
type: 'function',
|
|
9
|
+
name: 'VERIFIER_PRECOMPILE',
|
|
10
|
+
inputs: [],
|
|
11
|
+
outputs: [{ name: '', type: 'address', internalType: 'address' }],
|
|
12
|
+
stateMutability: 'view',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: 'function',
|
|
16
|
+
name: 'VERSION',
|
|
17
|
+
inputs: [],
|
|
18
|
+
outputs: [{ name: '', type: 'string', internalType: 'string' }],
|
|
19
|
+
stateMutability: 'view',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: 'function',
|
|
23
|
+
name: 'accountId',
|
|
24
|
+
inputs: [],
|
|
25
|
+
outputs: [
|
|
26
|
+
{
|
|
27
|
+
name: '',
|
|
28
|
+
type: 'tuple',
|
|
29
|
+
internalType: 'struct AccountId',
|
|
30
|
+
components: [
|
|
31
|
+
{ name: 'namespace', type: 'string', internalType: 'string' },
|
|
32
|
+
{ name: 'chainId', type: 'string', internalType: 'string' },
|
|
33
|
+
{ name: 'ownerKey', type: 'bytes', internalType: 'bytes' },
|
|
34
|
+
{
|
|
35
|
+
name: 'vmType',
|
|
36
|
+
type: 'uint8',
|
|
37
|
+
internalType: 'enum VM_TYPE',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
stateMutability: 'view',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'function',
|
|
46
|
+
name: 'domainSeparator',
|
|
47
|
+
inputs: [],
|
|
48
|
+
outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
|
|
49
|
+
stateMutability: 'view',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: 'function',
|
|
53
|
+
name: 'executePayload',
|
|
54
|
+
inputs: [
|
|
55
|
+
{
|
|
56
|
+
name: 'payload',
|
|
57
|
+
type: 'tuple',
|
|
58
|
+
internalType: 'struct CrossChainPayload',
|
|
59
|
+
components: [
|
|
60
|
+
{ name: 'target', type: 'address', internalType: 'address' },
|
|
61
|
+
{ name: 'value', type: 'uint256', internalType: 'uint256' },
|
|
62
|
+
{ name: 'data', type: 'bytes', internalType: 'bytes' },
|
|
63
|
+
{
|
|
64
|
+
name: 'gasLimit',
|
|
65
|
+
type: 'uint256',
|
|
66
|
+
internalType: 'uint256',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'maxFeePerGas',
|
|
70
|
+
type: 'uint256',
|
|
71
|
+
internalType: 'uint256',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'maxPriorityFeePerGas',
|
|
75
|
+
type: 'uint256',
|
|
76
|
+
internalType: 'uint256',
|
|
77
|
+
},
|
|
78
|
+
{ name: 'nonce', type: 'uint256', internalType: 'uint256' },
|
|
79
|
+
{ name: 'deadline', type: 'uint256', internalType: 'uint256' },
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{ name: 'signature', type: 'bytes', internalType: 'bytes' },
|
|
83
|
+
],
|
|
84
|
+
outputs: [],
|
|
85
|
+
stateMutability: 'nonpayable',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: 'function',
|
|
89
|
+
name: 'getTransactionHash',
|
|
90
|
+
inputs: [
|
|
91
|
+
{
|
|
92
|
+
name: 'payload',
|
|
93
|
+
type: 'tuple',
|
|
94
|
+
internalType: 'struct CrossChainPayload',
|
|
95
|
+
components: [
|
|
96
|
+
{ name: 'target', type: 'address', internalType: 'address' },
|
|
97
|
+
{ name: 'value', type: 'uint256', internalType: 'uint256' },
|
|
98
|
+
{ name: 'data', type: 'bytes', internalType: 'bytes' },
|
|
99
|
+
{
|
|
100
|
+
name: 'gasLimit',
|
|
101
|
+
type: 'uint256',
|
|
102
|
+
internalType: 'uint256',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'maxFeePerGas',
|
|
106
|
+
type: 'uint256',
|
|
107
|
+
internalType: 'uint256',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'maxPriorityFeePerGas',
|
|
111
|
+
type: 'uint256',
|
|
112
|
+
internalType: 'uint256',
|
|
113
|
+
},
|
|
114
|
+
{ name: 'nonce', type: 'uint256', internalType: 'uint256' },
|
|
115
|
+
{ name: 'deadline', type: 'uint256', internalType: 'uint256' },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
|
|
120
|
+
stateMutability: 'view',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'function',
|
|
124
|
+
name: 'initialize',
|
|
125
|
+
inputs: [
|
|
126
|
+
{
|
|
127
|
+
name: '_accountId',
|
|
128
|
+
type: 'tuple',
|
|
129
|
+
internalType: 'struct AccountId',
|
|
130
|
+
components: [
|
|
131
|
+
{ name: 'namespace', type: 'string', internalType: 'string' },
|
|
132
|
+
{ name: 'chainId', type: 'string', internalType: 'string' },
|
|
133
|
+
{ name: 'ownerKey', type: 'bytes', internalType: 'bytes' },
|
|
134
|
+
{
|
|
135
|
+
name: 'vmType',
|
|
136
|
+
type: 'uint8',
|
|
137
|
+
internalType: 'enum VM_TYPE',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
outputs: [],
|
|
143
|
+
stateMutability: 'nonpayable',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'function',
|
|
147
|
+
name: 'nonce',
|
|
148
|
+
inputs: [],
|
|
149
|
+
outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
|
|
150
|
+
stateMutability: 'view',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
type: 'function',
|
|
154
|
+
name: 'verifyPayloadSignature',
|
|
155
|
+
inputs: [
|
|
156
|
+
{ name: 'messageHash', type: 'bytes32', internalType: 'bytes32' },
|
|
157
|
+
{ name: 'signature', type: 'bytes', internalType: 'bytes' },
|
|
158
|
+
],
|
|
159
|
+
outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
|
|
160
|
+
stateMutability: 'view',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
type: 'event',
|
|
164
|
+
name: 'Initialized',
|
|
165
|
+
inputs: [
|
|
166
|
+
{
|
|
167
|
+
name: 'version',
|
|
168
|
+
type: 'uint64',
|
|
169
|
+
indexed: false,
|
|
170
|
+
internalType: 'uint64',
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
anonymous: false,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
type: 'event',
|
|
177
|
+
name: 'PayloadExecuted',
|
|
178
|
+
inputs: [
|
|
179
|
+
{
|
|
180
|
+
name: 'caller',
|
|
181
|
+
type: 'bytes',
|
|
182
|
+
indexed: false,
|
|
183
|
+
internalType: 'bytes',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'target',
|
|
187
|
+
type: 'address',
|
|
188
|
+
indexed: false,
|
|
189
|
+
internalType: 'address',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'data',
|
|
193
|
+
type: 'bytes',
|
|
194
|
+
indexed: false,
|
|
195
|
+
internalType: 'bytes',
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
anonymous: false,
|
|
199
|
+
},
|
|
200
|
+
{ type: 'error', name: 'ExecutionFailed', inputs: [] },
|
|
201
|
+
{ type: 'error', name: 'ExpiredDeadline', inputs: [] },
|
|
202
|
+
{ type: 'error', name: 'InvalidInitialization', inputs: [] },
|
|
203
|
+
{ type: 'error', name: 'InvalidInputArgs', inputs: [] },
|
|
204
|
+
{ type: 'error', name: 'InvalidSVMSignature', inputs: [] },
|
|
205
|
+
{ type: 'error', name: 'NotInitializing', inputs: [] },
|
|
206
|
+
{ type: 'error', name: 'PrecompileCallFailed', inputs: [] },
|
|
207
|
+
{ type: 'error', name: 'ReentrancyGuardReentrantCall', inputs: [] },
|
|
208
|
+
];
|
|
209
|
+
//# sourceMappingURL=smartAccount.svm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartAccount.svm.js","sourceRoot":"","sources":["../../../../../../../packages/core/src/lib/constants/abi/smartAccount.svm.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE;IAClE,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE;IAC/C;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,EAAE;QACV,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,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;QAC/D,eAAe,EAAE,MAAM;KACxB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,OAAO;gBACb,YAAY,EAAE,kBAAkB;gBAChC,UAAU,EAAE;oBACV,EAAE,IAAI,EAA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EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,EAAE,EAAE;IACtD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,EAAE,EAAE,EAAE;IAC3D,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,8BAA8B,EAAE,MAAM,EAAE,EAAE,EAAE;CACpE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CHAIN, VM } from './enums';
|
|
2
|
+
/**
|
|
3
|
+
* Maps VM type to its namespace
|
|
4
|
+
* References -
|
|
5
|
+
* https://chainagnostic.org/CAIPs/caip-2
|
|
6
|
+
*/
|
|
7
|
+
export declare const VM_NAMESPACE: Record<VM, string>;
|
|
8
|
+
/**
|
|
9
|
+
* Canonical metadata for each chain supported by the SDK.
|
|
10
|
+
* Acts as a single source of truth for chainId, vm type, locker contract, etc.
|
|
11
|
+
* References -
|
|
12
|
+
* https://namespaces.chainagnostic.org/solana/caip2
|
|
13
|
+
*/
|
|
14
|
+
export declare const CHAIN_INFO: Record<CHAIN, {
|
|
15
|
+
chainId: string;
|
|
16
|
+
vm: VM;
|
|
17
|
+
lockerContract?: string;
|
|
18
|
+
defaultRPC: string;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Extra required info regarding Push Chain
|
|
22
|
+
*/
|
|
23
|
+
export declare const PUSH_CHAIN_INFO: Record<CHAIN.PUSH_MAINNET | CHAIN.PUSH_TESTNET | CHAIN.PUSH_LOCALNET, (typeof CHAIN_INFO)[CHAIN.PUSH_MAINNET] & {
|
|
24
|
+
denom: string;
|
|
25
|
+
tendermintRpc: string;
|
|
26
|
+
prefix: string;
|
|
27
|
+
factoryAddress: `0x${string}`;
|
|
28
|
+
pushDecimals: bigint;
|
|
29
|
+
usdcDecimals: bigint;
|
|
30
|
+
pushToUsdcNumerator: bigint;
|
|
31
|
+
pushToUsdcDenominator: bigint;
|
|
32
|
+
}>;
|