Skip to content

Commit 331f875

Browse files
committed
pulled from main
1 parent f56a281 commit 331f875

File tree

97 files changed

+930
-479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+930
-479
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,6 @@ https
149149
# Auto generated OpenAPI file
150150
openapi.json
151151
.aider*
152+
153+
# Jetbrains IDEs
154+
.idea

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,6 @@
104104
"secp256k1": ">=4.0.4",
105105
"ws": ">=8.17.1",
106106
"cross-spawn": ">=7.0.6"
107-
}
107+
},
108+
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
108109
}

sdk/src/services/AccountFactoryService.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class AccountFactoryService {
1212
/**
1313
* Get all smart accounts
1414
* Get all the smart accounts for this account factory.
15-
* @param chain Chain ID or name
15+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
1616
* @param contractAddress Contract address
1717
* @returns any Default Response
1818
* @throws ApiError
@@ -45,7 +45,7 @@ export class AccountFactoryService {
4545
* Get associated smart accounts
4646
* Get all the smart accounts for this account factory associated with the specific admin wallet.
4747
* @param signerAddress The address of the signer to get associated accounts from
48-
* @param chain Chain ID or name
48+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
4949
* @param contractAddress Contract address
5050
* @returns any Default Response
5151
* @throws ApiError
@@ -82,7 +82,7 @@ export class AccountFactoryService {
8282
* Check if deployed
8383
* Check if a smart account has been deployed to the blockchain.
8484
* @param adminAddress The address of the admin to check if the account address is deployed
85-
* @param chain Chain ID or name
85+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
8686
* @param contractAddress Contract address
8787
* @param extraData Extra data to use in predicting the account address
8888
* @returns any Default Response
@@ -122,7 +122,7 @@ export class AccountFactoryService {
122122
* Predict smart account address
123123
* Get the counterfactual address of a smart account.
124124
* @param adminAddress The address of the admin to predict the account address for
125-
* @param chain Chain ID or name
125+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
126126
* @param contractAddress Contract address
127127
* @param extraData Extra data (account salt) to add to use in predicting the account address
128128
* @returns any Default Response
@@ -161,14 +161,14 @@ export class AccountFactoryService {
161161
/**
162162
* Create smart account
163163
* Create a smart account for this account factory.
164-
* @param chain Chain ID or name
164+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
165165
* @param contractAddress Contract address
166166
* @param xBackendWalletAddress Backend wallet address
167167
* @param requestBody
168-
* @param simulateTx Simulate the transaction on-chain without executing
168+
* @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes.
169169
* @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared.
170170
* @param xAccountAddress Smart account address
171-
* @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain.
171+
* @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract.
172172
* @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop.
173173
* @returns any Default Response
174174
* @throws ApiError
@@ -191,6 +191,10 @@ export class AccountFactoryService {
191191
* Gas limit for the transaction
192192
*/
193193
gas?: string;
194+
/**
195+
* Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.
196+
*/
197+
gasPrice?: string;
194198
/**
195199
* Maximum fee per gas
196200
*/

sdk/src/services/AccountService.ts

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class AccountService {
1212
/**
1313
* Get all admins
1414
* Get all admins for a smart account.
15-
* @param chain Chain ID or name
15+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
1616
* @param contractAddress Contract address
1717
* @returns any Default Response
1818
* @throws ApiError
@@ -44,7 +44,7 @@ export class AccountService {
4444
/**
4545
* Get all session keys
4646
* Get all session keys for a smart account.
47-
* @param chain Chain ID or name
47+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
4848
* @param contractAddress Contract address
4949
* @returns any Default Response
5050
* @throws ApiError
@@ -82,14 +82,14 @@ export class AccountService {
8282
/**
8383
* Grant admin
8484
* Grant a smart account's admin permission.
85-
* @param chain Chain ID or name
85+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
8686
* @param contractAddress Contract address
8787
* @param xBackendWalletAddress Backend wallet address
8888
* @param requestBody
89-
* @param simulateTx Simulate the transaction on-chain without executing
89+
* @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes.
9090
* @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared.
9191
* @param xAccountAddress Smart account address
92-
* @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain.
92+
* @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract.
9393
* @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop.
9494
* @returns any Default Response
9595
* @throws ApiError
@@ -108,6 +108,10 @@ export class AccountService {
108108
* Gas limit for the transaction
109109
*/
110110
gas?: string;
111+
/**
112+
* Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.
113+
*/
114+
gasPrice?: string;
111115
/**
112116
* Maximum fee per gas
113117
*/
@@ -169,14 +173,14 @@ export class AccountService {
169173
/**
170174
* Revoke admin
171175
* Revoke a smart account's admin permission.
172-
* @param chain Chain ID or name
176+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
173177
* @param contractAddress Contract address
174178
* @param xBackendWalletAddress Backend wallet address
175179
* @param requestBody
176-
* @param simulateTx Simulate the transaction on-chain without executing
180+
* @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes.
177181
* @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared.
178182
* @param xAccountAddress Smart account address
179-
* @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain.
183+
* @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract.
180184
* @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop.
181185
* @returns any Default Response
182186
* @throws ApiError
@@ -195,6 +199,10 @@ export class AccountService {
195199
* Gas limit for the transaction
196200
*/
197201
gas?: string;
202+
/**
203+
* Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.
204+
*/
205+
gasPrice?: string;
198206
/**
199207
* Maximum fee per gas
200208
*/
@@ -256,14 +264,14 @@ export class AccountService {
256264
/**
257265
* Create session key
258266
* Create a session key for a smart account.
259-
* @param chain Chain ID or name
267+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
260268
* @param contractAddress Contract address
261269
* @param xBackendWalletAddress Backend wallet address
262270
* @param requestBody
263-
* @param simulateTx Simulate the transaction on-chain without executing
271+
* @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes.
264272
* @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared.
265273
* @param xAccountAddress Smart account address
266-
* @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain.
274+
* @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract.
267275
* @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop.
268276
* @returns any Default Response
269277
* @throws ApiError
@@ -286,6 +294,10 @@ export class AccountService {
286294
* Gas limit for the transaction
287295
*/
288296
gas?: string;
297+
/**
298+
* Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.
299+
*/
300+
gasPrice?: string;
289301
/**
290302
* Maximum fee per gas
291303
*/
@@ -347,14 +359,14 @@ export class AccountService {
347359
/**
348360
* Revoke session key
349361
* Revoke a session key for a smart account.
350-
* @param chain Chain ID or name
362+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
351363
* @param contractAddress Contract address
352364
* @param xBackendWalletAddress Backend wallet address
353365
* @param requestBody
354-
* @param simulateTx Simulate the transaction on-chain without executing
366+
* @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes.
355367
* @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared.
356368
* @param xAccountAddress Smart account address
357-
* @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain.
369+
* @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract.
358370
* @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop.
359371
* @returns any Default Response
360372
* @throws ApiError
@@ -373,6 +385,10 @@ export class AccountService {
373385
* Gas limit for the transaction
374386
*/
375387
gas?: string;
388+
/**
389+
* Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.
390+
*/
391+
gasPrice?: string;
376392
/**
377393
* Maximum fee per gas
378394
*/
@@ -434,14 +450,14 @@ export class AccountService {
434450
/**
435451
* Update session key
436452
* Update a session key for a smart account.
437-
* @param chain Chain ID or name
453+
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
438454
* @param contractAddress Contract address
439455
* @param xBackendWalletAddress Backend wallet address
440456
* @param requestBody
441-
* @param simulateTx Simulate the transaction on-chain without executing
457+
* @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes.
442458
* @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared.
443459
* @param xAccountAddress Smart account address
444-
* @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain.
460+
* @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract.
445461
* @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop.
446462
* @returns any Default Response
447463
* @throws ApiError
@@ -464,6 +480,10 @@ export class AccountService {
464480
* Gas limit for the transaction
465481
*/
466482
gas?: string;
483+
/**
484+
* Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.
485+
*/
486+
gasPrice?: string;
467487
/**
468488
* Maximum fee per gas
469489
*/

0 commit comments

Comments
 (0)