@virtuals-protocol/acp-node 0.3.0-beta.2 → 0.3.0-beta.21
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 +53 -46
- package/dist/index.d.mts +451 -275
- package/dist/index.d.ts +451 -275
- package/dist/index.js +4872 -3168
- package/dist/index.mjs +4895 -3173
- package/package.json +19 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
|
-
import { Address, Chain } from 'viem';
|
|
2
|
+
import { Address, Chain, createPublicClient } from 'viem';
|
|
3
3
|
import * as _aa_sdk_core from '@aa-sdk/core';
|
|
4
4
|
import { Address as Address$1, SmartAccountSigner } from '@aa-sdk/core';
|
|
5
|
-
import { baseSepolia, base } from '@account-kit/infra';
|
|
5
|
+
import { baseSepolia, base, mainnet, sepolia, polygon, polygonAmoy, bsc, bscTestnet, arbitrum, arbitrumSepolia } from '@account-kit/infra';
|
|
6
|
+
import * as util from 'util';
|
|
7
|
+
import util__default from 'util';
|
|
6
8
|
import * as viem__types_actions_siwe_verifySiweMessage from 'viem/_types/actions/siwe/verifySiweMessage';
|
|
7
9
|
import * as _aa_sdk_core_dist_types_actions_smartAccount_signTypedData from '@aa-sdk/core/dist/types/actions/smartAccount/signTypedData';
|
|
8
10
|
import * as _aa_sdk_core_dist_types_actions_smartAccount_signMessage from '@aa-sdk/core/dist/types/actions/smartAccount/signMessage';
|
|
9
11
|
import * as _aa_sdk_core_dist_types_actions_smartAccount_checkGasSponsorshipEligibility from '@aa-sdk/core/dist/types/actions/smartAccount/checkGasSponsorshipEligibility';
|
|
10
12
|
import * as viem__types_utils_ccip from 'viem/_types/utils/ccip';
|
|
11
13
|
import * as _account_kit_smart_contracts from '@account-kit/smart-contracts';
|
|
14
|
+
import { ModularAccountV2Client } from '@account-kit/smart-contracts';
|
|
12
15
|
|
|
13
16
|
declare const ACP_ABI: ({
|
|
14
17
|
inputs: never[];
|
|
@@ -95,9 +98,10 @@ declare const ACP_ABI: ({
|
|
|
95
98
|
declare class Fare {
|
|
96
99
|
contractAddress: Address;
|
|
97
100
|
decimals: number;
|
|
98
|
-
|
|
101
|
+
chainId?: number | undefined;
|
|
102
|
+
constructor(contractAddress: Address, decimals: number, chainId?: number | undefined);
|
|
99
103
|
formatAmount(amount: number): bigint;
|
|
100
|
-
static fromContractAddress(contractAddress: Address, config?: AcpContractConfig): Promise<Fare>;
|
|
104
|
+
static fromContractAddress(contractAddress: Address, config?: AcpContractConfig, chainId?: number): Promise<Fare>;
|
|
101
105
|
}
|
|
102
106
|
declare abstract class FareAmountBase {
|
|
103
107
|
amount: bigint;
|
|
@@ -176,76 +180,6 @@ declare const ACP_V2_ABI: ({
|
|
|
176
180
|
anonymous?: undefined;
|
|
177
181
|
})[];
|
|
178
182
|
|
|
179
|
-
declare class AcpContractConfig {
|
|
180
|
-
chain: typeof baseSepolia | typeof base;
|
|
181
|
-
contractAddress: Address$1;
|
|
182
|
-
baseFare: Fare;
|
|
183
|
-
alchemyRpcUrl: string;
|
|
184
|
-
acpUrl: string;
|
|
185
|
-
abi: typeof ACP_ABI | typeof ACP_V2_ABI;
|
|
186
|
-
rpcEndpoint?: string | undefined;
|
|
187
|
-
constructor(chain: typeof baseSepolia | typeof base, contractAddress: Address$1, baseFare: Fare, alchemyRpcUrl: string, acpUrl: string, abi: typeof ACP_ABI | typeof ACP_V2_ABI, rpcEndpoint?: string | undefined);
|
|
188
|
-
}
|
|
189
|
-
declare const baseSepoliaAcpConfig: AcpContractConfig;
|
|
190
|
-
declare const baseSepoliaAcpConfigV2: AcpContractConfig;
|
|
191
|
-
declare const baseAcpConfig: AcpContractConfig;
|
|
192
|
-
declare const baseAcpConfigV2: AcpContractConfig;
|
|
193
|
-
|
|
194
|
-
declare enum MemoType {
|
|
195
|
-
MESSAGE = 0,// 0 - Text message
|
|
196
|
-
CONTEXT_URL = 1,// 1 - URL for context
|
|
197
|
-
IMAGE_URL = 2,// 2 - Image URL
|
|
198
|
-
VOICE_URL = 3,// 3 - Voice/audio URL
|
|
199
|
-
OBJECT_URL = 4,// 4 - Object/file URL
|
|
200
|
-
TXHASH = 5,// 5 - Transaction hash reference
|
|
201
|
-
PAYABLE_REQUEST = 6,// 6 - Payment request
|
|
202
|
-
PAYABLE_TRANSFER = 7,// 7 - Direct payment transfer
|
|
203
|
-
PAYABLE_TRANSFER_ESCROW = 8,// 8 - Escrowed payment transfer
|
|
204
|
-
NOTIFICATION = 9,// 9 - Notification
|
|
205
|
-
PAYABLE_NOTIFICATION = 10
|
|
206
|
-
}
|
|
207
|
-
declare enum AcpJobPhases {
|
|
208
|
-
REQUEST = 0,
|
|
209
|
-
NEGOTIATION = 1,
|
|
210
|
-
TRANSACTION = 2,
|
|
211
|
-
EVALUATION = 3,
|
|
212
|
-
COMPLETED = 4,
|
|
213
|
-
REJECTED = 5,
|
|
214
|
-
EXPIRED = 6
|
|
215
|
-
}
|
|
216
|
-
declare enum FeeType {
|
|
217
|
-
NO_FEE = 0,
|
|
218
|
-
IMMEDIATE_FEE = 1,
|
|
219
|
-
DEFERRED_FEE = 2
|
|
220
|
-
}
|
|
221
|
-
declare abstract class BaseAcpContractClient {
|
|
222
|
-
agentWalletAddress: Address;
|
|
223
|
-
config: AcpContractConfig;
|
|
224
|
-
contractAddress: Address;
|
|
225
|
-
chain: Chain;
|
|
226
|
-
abi: typeof ACP_ABI | typeof ACP_V2_ABI;
|
|
227
|
-
jobCreatedSignature: string;
|
|
228
|
-
constructor(agentWalletAddress: Address, config?: AcpContractConfig);
|
|
229
|
-
abstract handleOperation(data: `0x${string}`, contractAddress: Address, value?: bigint): Promise<Address>;
|
|
230
|
-
abstract getJobId(hash: Address, clientAddress: Address, providerAddress: Address): Promise<number>;
|
|
231
|
-
get walletAddress(): `0x${string}`;
|
|
232
|
-
createJobWithAccount(accountId: number, providerAddress: Address, evaluatorAddress: Address, budgetBaseUnit: bigint, paymentTokenAddress: Address, expiredAt: Date): Promise<{
|
|
233
|
-
txHash: string;
|
|
234
|
-
jobId: number;
|
|
235
|
-
}>;
|
|
236
|
-
createJob(providerAddress: Address, evaluatorAddress: Address, expiredAt: Date, paymentTokenAddress: Address, budgetBaseUnit: bigint, metadata: string): Promise<{
|
|
237
|
-
txHash: string;
|
|
238
|
-
jobId: number;
|
|
239
|
-
}>;
|
|
240
|
-
approveAllowance(amountBaseUnit: bigint, paymentTokenAddress?: Address): Promise<`0x${string}`>;
|
|
241
|
-
createPayableMemo(jobId: number, content: string, amountBaseUnit: bigint, recipient: Address, feeAmountBaseUnit: bigint, feeType: FeeType, nextPhase: AcpJobPhases, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW | MemoType.PAYABLE_TRANSFER | MemoType.PAYABLE_NOTIFICATION, expiredAt: Date, token?: Address, secured?: boolean): Promise<`0x${string}`>;
|
|
242
|
-
createMemo(jobId: number, content: string, type: MemoType, isSecured: boolean, nextPhase: AcpJobPhases): Promise<Address>;
|
|
243
|
-
signMemo(memoId: number, isApproved: boolean, reason?: string): Promise<`0x${string}`>;
|
|
244
|
-
setBudgetWithPaymentToken(jobId: number, budgetBaseUnit: bigint, paymentTokenAddress?: Address): Promise<`0x${string}`>;
|
|
245
|
-
updateAccountMetadata(accountId: number, metadata: string): Promise<`0x${string}`>;
|
|
246
|
-
wrapEth(amountBaseUnit: bigint): Promise<`0x${string}`>;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
183
|
declare class AcpAccount {
|
|
250
184
|
contractClient: BaseAcpContractClient;
|
|
251
185
|
id: number;
|
|
@@ -253,7 +187,7 @@ declare class AcpAccount {
|
|
|
253
187
|
providerAddress: Address;
|
|
254
188
|
metadata: Record<string, any>;
|
|
255
189
|
constructor(contractClient: BaseAcpContractClient, id: number, clientAddress: Address, providerAddress: Address, metadata: Record<string, any>);
|
|
256
|
-
updateMetadata(metadata: Record<string, any>): Promise
|
|
190
|
+
updateMetadata(metadata: Record<string, any>): Promise<OperationPayload>;
|
|
257
191
|
}
|
|
258
192
|
|
|
259
193
|
declare class AcpMemo {
|
|
@@ -267,12 +201,140 @@ declare class AcpMemo {
|
|
|
267
201
|
signedReason?: string | undefined;
|
|
268
202
|
expiry?: Date | undefined;
|
|
269
203
|
payableDetails?: PayableDetails | undefined;
|
|
204
|
+
txHash?: `0x${string}` | undefined;
|
|
205
|
+
signedTxHash?: `0x${string}` | undefined;
|
|
206
|
+
state?: AcpMemoState | undefined;
|
|
270
207
|
structuredContent: GenericPayload | undefined;
|
|
271
|
-
constructor(contractClient: BaseAcpContractClient, id: number, type: MemoType, content: string, nextPhase: AcpJobPhases, status: AcpMemoStatus, senderAddress: Address, signedReason?: string | undefined, expiry?: Date | undefined, payableDetails?: PayableDetails | undefined);
|
|
208
|
+
constructor(contractClient: BaseAcpContractClient, id: number, type: MemoType, content: string, nextPhase: AcpJobPhases, status: AcpMemoStatus, senderAddress: Address, signedReason?: string | undefined, expiry?: Date | undefined, payableDetails?: PayableDetails | undefined, txHash?: `0x${string}` | undefined, signedTxHash?: `0x${string}` | undefined, state?: AcpMemoState | undefined);
|
|
272
209
|
get payloadType(): PayloadType | undefined;
|
|
273
210
|
getStructuredContent<T>(): GenericPayload<T> | undefined;
|
|
274
|
-
create(jobId: number, isSecured?: boolean): Promise
|
|
275
|
-
sign(approved: boolean, reason?: string): Promise
|
|
211
|
+
create(jobId: number, isSecured?: boolean): Promise<OperationPayload>;
|
|
212
|
+
sign(approved: boolean, reason?: string): Promise<{
|
|
213
|
+
userOpHash: Address;
|
|
214
|
+
txnHash: Address;
|
|
215
|
+
}>;
|
|
216
|
+
[util__default.inspect.custom](): {
|
|
217
|
+
id: number;
|
|
218
|
+
senderAddress: `0x${string}`;
|
|
219
|
+
type: string;
|
|
220
|
+
status: AcpMemoStatus;
|
|
221
|
+
content: string;
|
|
222
|
+
signedReason: string | undefined;
|
|
223
|
+
txHash: `0x${string}` | undefined;
|
|
224
|
+
signedTxHash: `0x${string}` | undefined;
|
|
225
|
+
nextPhase: string;
|
|
226
|
+
expiry: Date | undefined;
|
|
227
|
+
payableDetails: PayableDetails | undefined;
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
declare enum PriceType {
|
|
232
|
+
FIXED = "fixed",
|
|
233
|
+
PERCENTAGE = "percentage"
|
|
234
|
+
}
|
|
235
|
+
declare class AcpJobOffering {
|
|
236
|
+
private readonly acpClient;
|
|
237
|
+
private readonly acpContractClient;
|
|
238
|
+
providerAddress: Address;
|
|
239
|
+
name: string;
|
|
240
|
+
price: number;
|
|
241
|
+
priceType: PriceType;
|
|
242
|
+
requirement?: (Object | string) | undefined;
|
|
243
|
+
private ajv;
|
|
244
|
+
constructor(acpClient: AcpClient, acpContractClient: BaseAcpContractClient, providerAddress: Address, name: string, price: number, priceType?: PriceType, requirement?: (Object | string) | undefined);
|
|
245
|
+
initiateJob(serviceRequirement: Object | string, evaluatorAddress?: Address, expiredAt?: Date): Promise<number>;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
declare class AcpJob {
|
|
249
|
+
private acpClient;
|
|
250
|
+
id: number;
|
|
251
|
+
clientAddress: Address;
|
|
252
|
+
providerAddress: Address;
|
|
253
|
+
evaluatorAddress: Address;
|
|
254
|
+
price: number;
|
|
255
|
+
priceTokenAddress: Address;
|
|
256
|
+
memos: AcpMemo[];
|
|
257
|
+
phase: AcpJobPhases;
|
|
258
|
+
context: Record<string, any>;
|
|
259
|
+
contractAddress: Address;
|
|
260
|
+
netPayableAmount?: number | undefined;
|
|
261
|
+
name: string | undefined;
|
|
262
|
+
requirement: Record<string, any> | string | undefined;
|
|
263
|
+
priceType: PriceType;
|
|
264
|
+
priceValue: number;
|
|
265
|
+
constructor(acpClient: AcpClient, id: number, clientAddress: Address, providerAddress: Address, evaluatorAddress: Address, price: number, priceTokenAddress: Address, memos: AcpMemo[], phase: AcpJobPhases, context: Record<string, any>, contractAddress: Address, netPayableAmount?: number | undefined);
|
|
266
|
+
get acpContractClient(): BaseAcpContractClient;
|
|
267
|
+
get config(): AcpContractConfig;
|
|
268
|
+
get baseFare(): Fare;
|
|
269
|
+
get deliverable(): string | undefined;
|
|
270
|
+
get rejectionReason(): string | undefined;
|
|
271
|
+
get providerAgent(): Promise<AcpAgent | undefined>;
|
|
272
|
+
get clientAgent(): Promise<AcpAgent | undefined>;
|
|
273
|
+
get evaluatorAgent(): Promise<AcpAgent | undefined>;
|
|
274
|
+
get account(): Promise<AcpAccount | null>;
|
|
275
|
+
get latestMemo(): AcpMemo | undefined;
|
|
276
|
+
createRequirement(content: string): Promise<{
|
|
277
|
+
userOpHash: Address;
|
|
278
|
+
txnHash: Address;
|
|
279
|
+
}>;
|
|
280
|
+
createPayableRequirement(content: string, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW | MemoType.PAYABLE_TRANSFER, amount: FareAmountBase, recipient: Address, expiredAt?: Date): Promise<{
|
|
281
|
+
userOpHash: Address;
|
|
282
|
+
txnHash: Address;
|
|
283
|
+
}>;
|
|
284
|
+
payAndAcceptRequirement(reason?: string): Promise<{
|
|
285
|
+
userOpHash: Address;
|
|
286
|
+
txnHash: Address;
|
|
287
|
+
}>;
|
|
288
|
+
respond(accept: boolean, reason?: string): Promise<{
|
|
289
|
+
userOpHash: Address;
|
|
290
|
+
txnHash: Address;
|
|
291
|
+
}>;
|
|
292
|
+
accept(reason?: string): Promise<{
|
|
293
|
+
userOpHash: Address;
|
|
294
|
+
txnHash: Address;
|
|
295
|
+
}>;
|
|
296
|
+
reject(reason?: string): Promise<{
|
|
297
|
+
userOpHash: Address;
|
|
298
|
+
txnHash: Address;
|
|
299
|
+
}>;
|
|
300
|
+
rejectPayable(reason: string | undefined, amount: FareAmountBase, expiredAt?: Date): Promise<{
|
|
301
|
+
userOpHash: Address;
|
|
302
|
+
txnHash: Address;
|
|
303
|
+
}>;
|
|
304
|
+
deliver(deliverable: DeliverablePayload): Promise<{
|
|
305
|
+
userOpHash: Address;
|
|
306
|
+
txnHash: Address;
|
|
307
|
+
}>;
|
|
308
|
+
deliverPayable(deliverable: DeliverablePayload, amount: FareAmountBase, skipFee?: boolean, expiredAt?: Date): Promise<void | {
|
|
309
|
+
userOpHash: Address;
|
|
310
|
+
txnHash: Address;
|
|
311
|
+
}>;
|
|
312
|
+
evaluate(accept: boolean, reason?: string): Promise<void>;
|
|
313
|
+
createNotification(content: string): Promise<{
|
|
314
|
+
userOpHash: Address;
|
|
315
|
+
txnHash: Address;
|
|
316
|
+
}>;
|
|
317
|
+
createPayableNotification(content: string, amount: FareAmountBase, skipFee?: boolean, expiredAt?: Date): Promise<{
|
|
318
|
+
userOpHash: Address;
|
|
319
|
+
txnHash: Address;
|
|
320
|
+
}>;
|
|
321
|
+
private performX402Payment;
|
|
322
|
+
deliverCrossChainPayable(recipient: Address, amount: FareAmountBase, isRequest?: boolean): Promise<void>;
|
|
323
|
+
[util.inspect.custom](): {
|
|
324
|
+
id: number;
|
|
325
|
+
clientAddress: `0x${string}`;
|
|
326
|
+
providerAddress: `0x${string}`;
|
|
327
|
+
name: string | undefined;
|
|
328
|
+
requirement: string | Record<string, any> | undefined;
|
|
329
|
+
priceType: PriceType;
|
|
330
|
+
priceValue: number;
|
|
331
|
+
priceTokenAddress: `0x${string}`;
|
|
332
|
+
memos: AcpMemo[];
|
|
333
|
+
phase: AcpJobPhases;
|
|
334
|
+
context: Record<string, any>;
|
|
335
|
+
contractAddress: `0x${string}`;
|
|
336
|
+
netPayableAmount: number | undefined;
|
|
337
|
+
};
|
|
276
338
|
}
|
|
277
339
|
|
|
278
340
|
type DeliverablePayload = string | Record<string, unknown>;
|
|
@@ -283,11 +345,21 @@ declare enum AcpMemoStatus {
|
|
|
283
345
|
APPROVED = "APPROVED",
|
|
284
346
|
REJECTED = "REJECTED"
|
|
285
347
|
}
|
|
348
|
+
declare enum AcpMemoState {
|
|
349
|
+
NONE = 0,
|
|
350
|
+
PENDING = 1,
|
|
351
|
+
IN_PROGRESS = 2,
|
|
352
|
+
READY = 3,
|
|
353
|
+
COMPLETED = 4,
|
|
354
|
+
REJECTED = 5
|
|
355
|
+
}
|
|
286
356
|
interface PayableDetails {
|
|
287
357
|
amount: bigint;
|
|
288
358
|
token: Address;
|
|
289
359
|
recipient: Address;
|
|
290
360
|
feeAmount: bigint;
|
|
361
|
+
lzSrcEid?: number;
|
|
362
|
+
lzDstEid?: number;
|
|
291
363
|
}
|
|
292
364
|
declare enum AcpAgentSort {
|
|
293
365
|
SUCCESSFUL_JOB_COUNT = "successfulJobCount",
|
|
@@ -305,11 +377,16 @@ declare enum AcpOnlineStatus {
|
|
|
305
377
|
ONLINE = "online",
|
|
306
378
|
OFFLINE = "offline"
|
|
307
379
|
}
|
|
380
|
+
interface IAcpJobX402PaymentDetails {
|
|
381
|
+
isX402: boolean;
|
|
382
|
+
isBudgetReceived: boolean;
|
|
383
|
+
}
|
|
308
384
|
interface IAcpClientOptions {
|
|
309
385
|
acpContractClient: BaseAcpContractClient | BaseAcpContractClient[];
|
|
310
386
|
onNewTask?: (job: AcpJob, memoToSign?: AcpMemo) => void;
|
|
311
387
|
onEvaluate?: (job: AcpJob) => void;
|
|
312
388
|
customRpcUrl?: string;
|
|
389
|
+
skipSocketConnection?: boolean;
|
|
313
390
|
}
|
|
314
391
|
type AcpAgent = {
|
|
315
392
|
id: number;
|
|
@@ -326,7 +403,10 @@ type AcpAgent = {
|
|
|
326
403
|
twitterHandle: string;
|
|
327
404
|
jobs: {
|
|
328
405
|
name: string;
|
|
329
|
-
|
|
406
|
+
priceV2: {
|
|
407
|
+
type: PriceType;
|
|
408
|
+
value: number;
|
|
409
|
+
};
|
|
330
410
|
requirement?: Object | string;
|
|
331
411
|
deliverable?: Object | string;
|
|
332
412
|
}[];
|
|
@@ -401,144 +481,186 @@ type ClosePositionPayload = {
|
|
|
401
481
|
positionId: number;
|
|
402
482
|
amount: number;
|
|
403
483
|
};
|
|
404
|
-
type PositionFulfilledPayload = {
|
|
405
|
-
symbol: string;
|
|
406
|
-
amount: number;
|
|
407
|
-
contractAddress: string;
|
|
408
|
-
type: "TP" | "SL" | "CLOSE";
|
|
409
|
-
pnl: number;
|
|
410
|
-
entryPrice: number;
|
|
411
|
-
exitPrice: number;
|
|
412
|
-
};
|
|
413
|
-
type UnfulfilledPositionPayload = {
|
|
414
|
-
symbol: string;
|
|
415
|
-
amount: number;
|
|
416
|
-
contractAddress: string;
|
|
417
|
-
type: "ERROR" | "PARTIAL";
|
|
418
|
-
reason?: string;
|
|
419
|
-
};
|
|
420
484
|
type RequestClosePositionPayload = {
|
|
421
485
|
positionId: number;
|
|
422
486
|
};
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
487
|
+
type X402Config = {
|
|
488
|
+
url: string;
|
|
489
|
+
};
|
|
490
|
+
type X402PayableRequirements = {
|
|
491
|
+
x402Version: number;
|
|
492
|
+
error: string;
|
|
493
|
+
accepts: X402Requirement[];
|
|
494
|
+
};
|
|
495
|
+
type X402Requirement = {
|
|
496
|
+
scheme: string;
|
|
497
|
+
network: string;
|
|
498
|
+
maxAmountRequired: string;
|
|
499
|
+
resource: string;
|
|
500
|
+
description: string;
|
|
501
|
+
mimeType: string;
|
|
502
|
+
payTo: Address;
|
|
503
|
+
maxTimeoutSeconds: number;
|
|
504
|
+
asset: Address;
|
|
505
|
+
extra: {
|
|
506
|
+
name: string;
|
|
507
|
+
version: string;
|
|
508
|
+
};
|
|
509
|
+
outputSchema: any;
|
|
510
|
+
};
|
|
511
|
+
type X402PayableRequest = {
|
|
512
|
+
to: Address;
|
|
513
|
+
value: number;
|
|
514
|
+
maxTimeoutSeconds: number;
|
|
515
|
+
asset: Address;
|
|
516
|
+
};
|
|
517
|
+
type X402Payment = {
|
|
518
|
+
encodedPayment: string;
|
|
519
|
+
signature: string;
|
|
520
|
+
message: {
|
|
521
|
+
from: Address;
|
|
522
|
+
to: Address;
|
|
523
|
+
value: string;
|
|
524
|
+
validAfter: string;
|
|
525
|
+
validBefore: string;
|
|
526
|
+
nonce: string;
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
type OffChainJob = {
|
|
426
530
|
id: number;
|
|
531
|
+
documentId: string;
|
|
532
|
+
txHash: Address;
|
|
533
|
+
clientId: number;
|
|
534
|
+
providerId: number;
|
|
535
|
+
budget: number;
|
|
536
|
+
createdAt: string;
|
|
537
|
+
updatedAt: string;
|
|
538
|
+
publishedAt: string;
|
|
539
|
+
locale: string | null;
|
|
427
540
|
clientAddress: Address;
|
|
428
541
|
providerAddress: Address;
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
priceTokenAddress: Address;
|
|
432
|
-
memos: AcpMemo[];
|
|
542
|
+
evaluators: Address[];
|
|
543
|
+
budgetTxHash: Address | null;
|
|
433
544
|
phase: AcpJobPhases;
|
|
434
|
-
|
|
545
|
+
agentIdPair: string;
|
|
546
|
+
onChainJobId: string;
|
|
547
|
+
summary: string;
|
|
548
|
+
userOpHash: Address | null;
|
|
549
|
+
amountClaimed: number;
|
|
550
|
+
context: Record<string, any> | null;
|
|
551
|
+
expiry: string;
|
|
552
|
+
refundRetryTimes: number;
|
|
553
|
+
additionalFees: number;
|
|
554
|
+
budgetTokenAddress: Address;
|
|
555
|
+
budgetUSD: number;
|
|
556
|
+
amountClaimedUSD: number | null;
|
|
557
|
+
additionalFeesUSD: number | null;
|
|
435
558
|
contractAddress: Address;
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* @deprecated The method should not be used
|
|
463
|
-
*/
|
|
464
|
-
openPosition(payload: OpenPositionPayload[], feeAmount: number, expiredAt?: Date, // 3 minutes
|
|
465
|
-
walletAddress?: Address): Promise<`0x${string}`>;
|
|
466
|
-
/**
|
|
467
|
-
* @deprecated The method should not be used
|
|
468
|
-
*/
|
|
469
|
-
swapToken(payload: SwapTokenPayload, decimals: number, feeAmount: number, walletAddress?: Address): Promise<`0x${string}`>;
|
|
470
|
-
/**
|
|
471
|
-
* @deprecated The method should not be used
|
|
472
|
-
*/
|
|
473
|
-
responseSwapToken(memoId: number, accept: boolean, reason: string): Promise<`0x${string}`>;
|
|
474
|
-
/**
|
|
475
|
-
* @deprecated The method should not be used
|
|
476
|
-
*/
|
|
477
|
-
transferFunds<T>(payload: GenericPayload<T>, fareAmount: FareAmountBase, walletAddress?: Address, expiredAt?: Date): Promise<`0x${string}`>;
|
|
478
|
-
/**
|
|
479
|
-
* @deprecated The method should not be used
|
|
480
|
-
*/
|
|
481
|
-
responseOpenPosition(memoId: number, accept: boolean, reason: string): Promise<`0x${string}`>;
|
|
482
|
-
/**
|
|
483
|
-
* @deprecated The method should not be used
|
|
484
|
-
*/
|
|
485
|
-
closePartialPosition(payload: ClosePositionPayload, expireAt?: Date): Promise<`0x${string}`>;
|
|
486
|
-
/**
|
|
487
|
-
* @deprecated The method should not be used
|
|
488
|
-
*/
|
|
489
|
-
responseClosePartialPosition(memoId: number, accept: boolean, reason: string): Promise<`0x${string}`>;
|
|
490
|
-
/**
|
|
491
|
-
* @deprecated The method should not be used
|
|
492
|
-
*/
|
|
493
|
-
requestClosePosition(payload: RequestClosePositionPayload): Promise<`0x${string}`>;
|
|
494
|
-
/**
|
|
495
|
-
* @deprecated The method should not be used
|
|
496
|
-
*/
|
|
497
|
-
responseRequestClosePosition(memoId: number, accept: boolean, payload: ClosePositionPayload, reason?: string, expiredAt?: Date): Promise<`0x${string}` | undefined>;
|
|
498
|
-
/**
|
|
499
|
-
* @deprecated The method should not be used
|
|
500
|
-
*/
|
|
501
|
-
confirmClosePosition(memoId: number, accept: boolean, reason?: string): Promise<void>;
|
|
502
|
-
/**
|
|
503
|
-
* @deprecated The method should not be used
|
|
504
|
-
*/
|
|
505
|
-
positionFulfilled(payload: PositionFulfilledPayload, expiredAt?: Date): Promise<`0x${string}`>;
|
|
506
|
-
/**
|
|
507
|
-
* @deprecated The method should not be used
|
|
508
|
-
*/
|
|
509
|
-
unfulfilledPosition(payload: UnfulfilledPositionPayload, expiredAt?: Date): Promise<`0x${string}`>;
|
|
510
|
-
/**
|
|
511
|
-
* @deprecated The method should not be used
|
|
512
|
-
*/
|
|
513
|
-
responseUnfulfilledPosition(memoId: number, accept: boolean, reason: string): Promise<`0x${string}`>;
|
|
514
|
-
/**
|
|
515
|
-
* @deprecated The method should not be used
|
|
516
|
-
*/
|
|
517
|
-
responsePositionFulfilled(memoId: number, accept: boolean, reason: string): Promise<`0x${string}`>;
|
|
518
|
-
/**
|
|
519
|
-
* @deprecated The method should not be used
|
|
520
|
-
*/
|
|
521
|
-
closeJob(message?: string): Promise<`0x${string}`>;
|
|
522
|
-
/**
|
|
523
|
-
* @deprecated The method should not be used
|
|
524
|
-
*/
|
|
525
|
-
responseCloseJob(memoId: number, accept: boolean, fulfilledPositions: PositionFulfilledPayload[], reason?: string, expiredAt?: Date): Promise<`0x${string}` | undefined>;
|
|
526
|
-
/**
|
|
527
|
-
* @deprecated The method should not be used
|
|
528
|
-
*/
|
|
529
|
-
confirmJobClosure(memoId: number, accept: boolean, reason?: string): Promise<void>;
|
|
559
|
+
accountId: number | null;
|
|
560
|
+
x402Nonce: string;
|
|
561
|
+
};
|
|
562
|
+
type X402PaymentResponse = {
|
|
563
|
+
isPaymentRequired: boolean;
|
|
564
|
+
data: X402PayableRequirements;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
type SupportedChain = typeof mainnet | typeof sepolia | typeof polygon | typeof polygonAmoy | typeof bsc | typeof bscTestnet | typeof arbitrum | typeof arbitrumSepolia;
|
|
568
|
+
type ChainConfig = {
|
|
569
|
+
chain: SupportedChain;
|
|
570
|
+
rpcUrl?: string;
|
|
571
|
+
};
|
|
572
|
+
declare class AcpContractConfig {
|
|
573
|
+
chain: typeof baseSepolia | typeof base;
|
|
574
|
+
contractAddress: Address$1;
|
|
575
|
+
baseFare: Fare;
|
|
576
|
+
alchemyRpcUrl: string;
|
|
577
|
+
acpUrl: string;
|
|
578
|
+
abi: typeof ACP_ABI | typeof ACP_V2_ABI;
|
|
579
|
+
maxRetries: number;
|
|
580
|
+
rpcEndpoint?: string | undefined;
|
|
581
|
+
x402Config?: X402Config | undefined;
|
|
582
|
+
chains: ChainConfig[];
|
|
583
|
+
constructor(chain: typeof baseSepolia | typeof base, contractAddress: Address$1, baseFare: Fare, alchemyRpcUrl: string, acpUrl: string, abi: typeof ACP_ABI | typeof ACP_V2_ABI, maxRetries: number, rpcEndpoint?: string | undefined, x402Config?: X402Config | undefined, chains?: ChainConfig[]);
|
|
530
584
|
}
|
|
585
|
+
declare const baseSepoliaAcpConfig: AcpContractConfig;
|
|
586
|
+
declare const baseSepoliaAcpConfigV2: AcpContractConfig;
|
|
587
|
+
declare const baseSepoliaAcpX402ConfigV2: AcpContractConfig;
|
|
588
|
+
declare const baseAcpConfig: AcpContractConfig;
|
|
589
|
+
declare const baseAcpX402Config: AcpContractConfig;
|
|
590
|
+
declare const baseAcpConfigV2: AcpContractConfig;
|
|
591
|
+
declare const baseAcpX402ConfigV2: AcpContractConfig;
|
|
531
592
|
|
|
532
|
-
declare
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
593
|
+
declare enum MemoType {
|
|
594
|
+
MESSAGE = 0,// 0 - Text message
|
|
595
|
+
CONTEXT_URL = 1,// 1 - URL for context
|
|
596
|
+
IMAGE_URL = 2,// 2 - Image URL
|
|
597
|
+
VOICE_URL = 3,// 3 - Voice/audio URL
|
|
598
|
+
OBJECT_URL = 4,// 4 - Object/file URL
|
|
599
|
+
TXHASH = 5,// 5 - Transaction hash reference
|
|
600
|
+
PAYABLE_REQUEST = 6,// 6 - Payment request
|
|
601
|
+
PAYABLE_TRANSFER = 7,// 7 - Direct payment transfer
|
|
602
|
+
PAYABLE_TRANSFER_ESCROW = 8,// 8 - Escrowed payment transfer
|
|
603
|
+
NOTIFICATION = 9,// 9 - Notification
|
|
604
|
+
PAYABLE_NOTIFICATION = 10
|
|
605
|
+
}
|
|
606
|
+
declare enum AcpJobPhases {
|
|
607
|
+
REQUEST = 0,
|
|
608
|
+
NEGOTIATION = 1,
|
|
609
|
+
TRANSACTION = 2,
|
|
610
|
+
EVALUATION = 3,
|
|
611
|
+
COMPLETED = 4,
|
|
612
|
+
REJECTED = 5,
|
|
613
|
+
EXPIRED = 6
|
|
614
|
+
}
|
|
615
|
+
declare enum FeeType {
|
|
616
|
+
NO_FEE = 0,
|
|
617
|
+
IMMEDIATE_FEE = 1,
|
|
618
|
+
DEFERRED_FEE = 2,
|
|
619
|
+
PERCENTAGE_FEE = 3
|
|
620
|
+
}
|
|
621
|
+
interface OperationPayload {
|
|
622
|
+
data: `0x${string}`;
|
|
623
|
+
contractAddress: Address;
|
|
624
|
+
value?: bigint;
|
|
625
|
+
}
|
|
626
|
+
declare abstract class BaseAcpContractClient {
|
|
627
|
+
agentWalletAddress: Address;
|
|
628
|
+
config: AcpContractConfig;
|
|
629
|
+
contractAddress: Address;
|
|
630
|
+
chain: Chain;
|
|
631
|
+
abi: typeof ACP_ABI | typeof ACP_V2_ABI;
|
|
632
|
+
jobCreatedSignature: string;
|
|
633
|
+
publicClient: ReturnType<typeof createPublicClient>;
|
|
634
|
+
publicClients: Record<number, ReturnType<typeof createPublicClient>>;
|
|
635
|
+
constructor(agentWalletAddress: Address, config?: AcpContractConfig);
|
|
636
|
+
protected validateSessionKeyOnChain(sessionSignerAddress: Address, sessionEntityKeyId: number): Promise<void>;
|
|
637
|
+
abstract handleOperation(operations: OperationPayload[], chainId?: number): Promise<{
|
|
638
|
+
userOpHash: Address;
|
|
639
|
+
txnHash: Address;
|
|
640
|
+
}>;
|
|
641
|
+
abstract getJobId(createJobUserOpHash: Address, clientAddress: Address, providerAddress: Address): Promise<number>;
|
|
642
|
+
get walletAddress(): `0x${string}`;
|
|
643
|
+
createJobWithAccount(accountId: number, evaluatorAddress: Address, budgetBaseUnit: bigint, paymentTokenAddress: Address, expiredAt: Date, isX402Job?: boolean): OperationPayload;
|
|
644
|
+
createJob(providerAddress: Address, evaluatorAddress: Address, expiredAt: Date, paymentTokenAddress: Address, budgetBaseUnit: bigint, metadata: string, isX402Job?: boolean): OperationPayload;
|
|
645
|
+
approveAllowance(amountBaseUnit: bigint, paymentTokenAddress?: Address, targetAddress?: Address): OperationPayload;
|
|
646
|
+
createPayableMemo(jobId: number, content: string, amountBaseUnit: bigint, recipient: Address, feeAmountBaseUnit: bigint, feeType: FeeType, nextPhase: AcpJobPhases, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW | MemoType.PAYABLE_TRANSFER | MemoType.PAYABLE_NOTIFICATION, expiredAt: Date, token?: Address, secured?: boolean): OperationPayload;
|
|
647
|
+
createCrossChainPayableMemo(jobId: number, content: string, token: Address, amountBaseUnit: bigint, recipient: Address, feeAmountBaseUnit: bigint, feeType: FeeType, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER | MemoType.PAYABLE_NOTIFICATION, expiredAt: Date, nextPhase: AcpJobPhases, destinationEid: number, secured?: boolean): OperationPayload;
|
|
648
|
+
createMemo(jobId: number, content: string, type: MemoType, isSecured: boolean, nextPhase: AcpJobPhases): OperationPayload;
|
|
649
|
+
createMemoWithMetadata(jobId: number, content: string, type: MemoType, isSecured: boolean, nextPhase: AcpJobPhases, metadata: string): OperationPayload;
|
|
650
|
+
signMemo(memoId: number, isApproved: boolean, reason?: string): OperationPayload;
|
|
651
|
+
setBudgetWithPaymentToken(jobId: number, budgetBaseUnit: bigint, paymentTokenAddress?: Address): OperationPayload | undefined;
|
|
652
|
+
updateAccountMetadata(accountId: number, metadata: string): OperationPayload;
|
|
653
|
+
wrapEth(amountBaseUnit: bigint): OperationPayload;
|
|
654
|
+
getX402PaymentDetails(jobId: number): Promise<IAcpJobX402PaymentDetails>;
|
|
655
|
+
abstract updateJobX402Nonce(jobId: number, nonce: string): Promise<OffChainJob>;
|
|
656
|
+
abstract generateX402Payment(payableRequest: X402PayableRequest, requirements: X402PayableRequirements): Promise<X402Payment>;
|
|
657
|
+
abstract performX402Request(url: string, version: string, budget?: string, signature?: string): Promise<X402PaymentResponse>;
|
|
658
|
+
submitTransferWithAuthorization(from: Address, to: Address, value: bigint, validAfter: bigint, validBefore: bigint, nonce: string, signature: string): Promise<OperationPayload[]>;
|
|
659
|
+
getERC20Balance(chainId: number, tokenAddress: Address, walletAddress: Address): Promise<bigint>;
|
|
660
|
+
getERC20Allowance(chainId: number, tokenAddress: Address, walletAddress: Address, spenderAddress: Address): Promise<bigint>;
|
|
661
|
+
getERC20Symbol(chainId: number, tokenAddress: Address): Promise<string>;
|
|
662
|
+
abstract getAssetManager(): Promise<Address>;
|
|
663
|
+
abstract getAcpVersion(): string;
|
|
542
664
|
}
|
|
543
665
|
|
|
544
666
|
interface IAcpBrowseAgentsOptions {
|
|
@@ -547,6 +669,7 @@ interface IAcpBrowseAgentsOptions {
|
|
|
547
669
|
top_k?: number;
|
|
548
670
|
graduationStatus?: AcpGraduationStatus;
|
|
549
671
|
onlineStatus?: AcpOnlineStatus;
|
|
672
|
+
showHiddenOfferings?: boolean;
|
|
550
673
|
}
|
|
551
674
|
declare class AcpClient {
|
|
552
675
|
private contractClients;
|
|
@@ -557,8 +680,8 @@ declare class AcpClient {
|
|
|
557
680
|
get acpContractClient(): BaseAcpContractClient;
|
|
558
681
|
get acpUrl(): string;
|
|
559
682
|
private defaultOnEvaluate;
|
|
560
|
-
get walletAddress():
|
|
561
|
-
init(): Promise<void>;
|
|
683
|
+
get walletAddress(): `0x${string}`;
|
|
684
|
+
init(skipSocketConnection?: boolean): Promise<void>;
|
|
562
685
|
browseAgents(keyword: string, options: IAcpBrowseAgentsOptions): Promise<{
|
|
563
686
|
id: number;
|
|
564
687
|
name: string;
|
|
@@ -574,7 +697,7 @@ declare class AcpClient {
|
|
|
574
697
|
minsFromLastOnline: number;
|
|
575
698
|
isOnline: boolean;
|
|
576
699
|
} | undefined;
|
|
577
|
-
|
|
700
|
+
resources: {
|
|
578
701
|
name: string;
|
|
579
702
|
description: string;
|
|
580
703
|
url: string;
|
|
@@ -583,21 +706,12 @@ declare class AcpClient {
|
|
|
583
706
|
}[];
|
|
584
707
|
}[]>;
|
|
585
708
|
initiateJob(providerAddress: Address, serviceRequirement: Object | string, fareAmount: FareAmountBase, evaluatorAddress?: Address, expiredAt?: Date): Promise<number>;
|
|
586
|
-
createMemo(jobId: number, content: string, nextPhase: AcpJobPhases): Promise<`0x${string}`>;
|
|
587
|
-
createPayableMemo(jobId: number, content: string, amount: FareAmountBase, recipient: Address, nextPhase: AcpJobPhases, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, expiredAt: Date): Promise<`0x${string}`>;
|
|
588
|
-
respondJob(jobId: number, memoId: number, accept: boolean, content?: string, reason?: string): Promise<`0x${string}` | undefined>;
|
|
589
|
-
payJob(jobId: number, amountBaseUnit: bigint, memoId: number, reason?: string): Promise<`0x${string}`>;
|
|
590
|
-
requestFunds<T>(jobId: number, transferFareAmount: FareAmountBase, recipient: Address, feeFareAmount: FareAmountBase, feeType: FeeType, reason: GenericPayload<T>, nextPhase: AcpJobPhases, expiredAt: Date): Promise<`0x${string}`>;
|
|
591
|
-
responseFundsRequest(memoId: number, accept: boolean, amountBaseUnit: bigint, reason?: string): Promise<`0x${string}`>;
|
|
592
|
-
transferFunds<T>(jobId: number, transferFareAmount: FareAmountBase, recipient: Address, feeFareAmount: FareAmountBase, feeType: FeeType, reason: GenericPayload<T>, nextPhase: AcpJobPhases, expiredAt: Date): Promise<`0x${string}`>;
|
|
593
|
-
sendMessage<T>(jobId: number, message: GenericPayload<T>, nextPhase: AcpJobPhases): Promise<`0x${string}`>;
|
|
594
|
-
responseFundsTransfer(memoId: number, accept: boolean, reason?: string): Promise<`0x${string}`>;
|
|
595
|
-
rejectJob(jobId: number, reason?: string): Promise<`0x${string}`>;
|
|
596
|
-
deliverJob(jobId: number, deliverable: DeliverablePayload): Promise<`0x${string}`>;
|
|
597
709
|
getActiveJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
|
|
598
710
|
getPendingMemoJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
|
|
599
711
|
getCompletedJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
|
|
600
712
|
getCancelledJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
|
|
713
|
+
private _fetchJobList;
|
|
714
|
+
private _hydrateJobs;
|
|
601
715
|
getJobById(jobId: number): Promise<AcpJob | undefined>;
|
|
602
716
|
getMemoById(jobId: number, memoId: number): Promise<AcpMemo | undefined>;
|
|
603
717
|
getAgent(walletAddress: Address): Promise<AcpAgent | undefined>;
|
|
@@ -605,12 +719,26 @@ declare class AcpClient {
|
|
|
605
719
|
getByClientAndProvider(clientAddress: Address, providerAddress: Address, acpContractClient?: BaseAcpContractClient): Promise<AcpAccount | null>;
|
|
606
720
|
}
|
|
607
721
|
|
|
722
|
+
declare class AcpX402 {
|
|
723
|
+
private config;
|
|
724
|
+
private sessionKeyClient;
|
|
725
|
+
private publicClient;
|
|
726
|
+
constructor(config: AcpContractConfig, sessionKeyClient: ModularAccountV2Client, publicClient: ReturnType<typeof createPublicClient>);
|
|
727
|
+
signUpdateJobNonceMessage(jobId: number, nonce: string): Promise<`0x${string}`>;
|
|
728
|
+
updateJobNonce(jobId: number, nonce: string): Promise<OffChainJob>;
|
|
729
|
+
generatePayment(payableRequest: X402PayableRequest, requirements: X402PayableRequirements): Promise<X402Payment>;
|
|
730
|
+
performRequest(url: string, version: string, budget?: string, signature?: string): Promise<{
|
|
731
|
+
isPaymentRequired: boolean;
|
|
732
|
+
data: any;
|
|
733
|
+
}>;
|
|
734
|
+
}
|
|
735
|
+
|
|
608
736
|
declare class AcpContractClient extends BaseAcpContractClient {
|
|
609
|
-
protected MAX_RETRIES: number;
|
|
610
737
|
protected PRIORITY_FEE_MULTIPLIER: number;
|
|
611
738
|
protected MAX_FEE_PER_GAS: number;
|
|
612
739
|
protected MAX_PRIORITY_FEE_PER_GAS: number;
|
|
613
740
|
private _sessionKeyClient;
|
|
741
|
+
private _acpX402;
|
|
614
742
|
constructor(agentWalletAddress: Address$1, config?: AcpContractConfig);
|
|
615
743
|
static build(walletPrivateKey: Address$1, sessionEntityKeyId: number, agentWalletAddress: Address$1, config?: AcpContractConfig): Promise<AcpContractClient>;
|
|
616
744
|
init(privateKey: Address$1, sessionEntityKeyId: number): Promise<void>;
|
|
@@ -626,6 +754,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
626
754
|
request?: (parameters: viem.CcipRequestParameters) => Promise<viem__types_utils_ccip.CcipRequestReturnType>;
|
|
627
755
|
} | undefined;
|
|
628
756
|
chain: viem.Chain;
|
|
757
|
+
experimental_blockTag?: viem.BlockTag | undefined;
|
|
629
758
|
key: string;
|
|
630
759
|
name: string;
|
|
631
760
|
pollingInterval: number;
|
|
@@ -639,7 +768,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
639
768
|
ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
|
|
640
769
|
}, {
|
|
641
770
|
Method: "eth_getUserOperationReceipt";
|
|
642
|
-
Parameters: [viem.Hash];
|
|
771
|
+
Parameters: [viem.Hash, ("pending" | "latest")?];
|
|
643
772
|
ReturnType: _aa_sdk_core.UserOperationReceipt | null;
|
|
644
773
|
}, {
|
|
645
774
|
Method: "eth_getUserOperationByHash";
|
|
@@ -679,7 +808,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
679
808
|
ReturnType: viem.Quantity;
|
|
680
809
|
}, {
|
|
681
810
|
Method: "eth_call";
|
|
682
|
-
Parameters: [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride];
|
|
811
|
+
Parameters: readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride, blockOverrides: viem.RpcBlockOverrides];
|
|
683
812
|
ReturnType: viem.Hex;
|
|
684
813
|
}, {
|
|
685
814
|
Method: "eth_createAccessList";
|
|
@@ -828,6 +957,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
828
957
|
Method: "eth_sendRawTransaction";
|
|
829
958
|
Parameters: [signedTransaction: viem.Hex];
|
|
830
959
|
ReturnType: viem.Hash;
|
|
960
|
+
}, {
|
|
961
|
+
Method: "eth_sendRawTransactionSync";
|
|
962
|
+
Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
|
|
963
|
+
ReturnType: viem.RpcTransactionReceipt;
|
|
831
964
|
}, {
|
|
832
965
|
Method: "eth_simulateV1";
|
|
833
966
|
Parameters: [{
|
|
@@ -884,8 +1017,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
884
1017
|
[x: `uint8[${string}]`]: undefined;
|
|
885
1018
|
[x: `bool[${string}]`]: undefined;
|
|
886
1019
|
[x: `bytes4[${string}]`]: undefined;
|
|
1020
|
+
[x: `uint32[${string}]`]: undefined;
|
|
887
1021
|
[x: `bytes[${string}]`]: undefined;
|
|
888
1022
|
[x: `bytes6[${string}]`]: undefined;
|
|
1023
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
889
1024
|
[x: `bytes1[${string}]`]: undefined;
|
|
890
1025
|
[x: `bytes2[${string}]`]: undefined;
|
|
891
1026
|
[x: `bytes3[${string}]`]: undefined;
|
|
@@ -893,7 +1028,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
893
1028
|
[x: `bytes7[${string}]`]: undefined;
|
|
894
1029
|
[x: `bytes8[${string}]`]: undefined;
|
|
895
1030
|
[x: `bytes9[${string}]`]: undefined;
|
|
896
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
897
1031
|
[x: `bytes11[${string}]`]: undefined;
|
|
898
1032
|
[x: `bytes12[${string}]`]: undefined;
|
|
899
1033
|
[x: `bytes13[${string}]`]: undefined;
|
|
@@ -951,7 +1085,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
951
1085
|
[x: `uint[${string}]`]: undefined;
|
|
952
1086
|
[x: `uint16[${string}]`]: undefined;
|
|
953
1087
|
[x: `uint24[${string}]`]: undefined;
|
|
954
|
-
[x: `uint32[${string}]`]: undefined;
|
|
955
1088
|
[x: `uint40[${string}]`]: undefined;
|
|
956
1089
|
[x: `uint48[${string}]`]: undefined;
|
|
957
1090
|
[x: `uint56[${string}]`]: undefined;
|
|
@@ -986,8 +1119,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
986
1119
|
uint8?: undefined;
|
|
987
1120
|
bool?: undefined;
|
|
988
1121
|
bytes4?: undefined;
|
|
1122
|
+
uint32?: undefined;
|
|
989
1123
|
bytes?: undefined;
|
|
990
1124
|
bytes6?: undefined;
|
|
1125
|
+
bytes10?: undefined;
|
|
991
1126
|
bytes1?: undefined;
|
|
992
1127
|
bytes2?: undefined;
|
|
993
1128
|
bytes3?: undefined;
|
|
@@ -995,7 +1130,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
995
1130
|
bytes7?: undefined;
|
|
996
1131
|
bytes8?: undefined;
|
|
997
1132
|
bytes9?: undefined;
|
|
998
|
-
bytes10?: undefined;
|
|
999
1133
|
bytes11?: undefined;
|
|
1000
1134
|
bytes12?: undefined;
|
|
1001
1135
|
bytes13?: undefined;
|
|
@@ -1051,7 +1185,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
1051
1185
|
int256?: undefined;
|
|
1052
1186
|
uint16?: undefined;
|
|
1053
1187
|
uint24?: undefined;
|
|
1054
|
-
uint32?: undefined;
|
|
1055
1188
|
uint40?: undefined;
|
|
1056
1189
|
uint48?: undefined;
|
|
1057
1190
|
uint56?: undefined;
|
|
@@ -1085,7 +1218,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
1085
1218
|
estimateUserOperationGas: <TEntryPointVersion extends _aa_sdk_core.EntryPointVersion = keyof _aa_sdk_core.EntryPointRegistryBase<unknown>>(request: _aa_sdk_core.UserOperationRequest<TEntryPointVersion>, entryPoint: Address$1, stateOverride?: viem.StateOverride) => Promise<_aa_sdk_core.UserOperationEstimateGasResponse<TEntryPointVersion>>;
|
|
1086
1219
|
sendRawUserOperation: <TEntryPointVersion extends _aa_sdk_core.EntryPointVersion = keyof _aa_sdk_core.EntryPointRegistryBase<unknown>>(request: _aa_sdk_core.UserOperationRequest<TEntryPointVersion>, entryPoint: Address$1) => Promise<viem.Hash>;
|
|
1087
1220
|
getUserOperationByHash: (hash: viem.Hash) => Promise<_aa_sdk_core.UserOperationResponse | null>;
|
|
1088
|
-
getUserOperationReceipt: (hash: viem.Hash) => Promise<_aa_sdk_core.UserOperationReceipt | null>;
|
|
1221
|
+
getUserOperationReceipt: (hash: viem.Hash, tag?: "pending" | "latest") => Promise<_aa_sdk_core.UserOperationReceipt | null>;
|
|
1089
1222
|
getSupportedEntryPoints: () => Promise<Address$1[]>;
|
|
1090
1223
|
call: (parameters: viem.CallParameters<viem.Chain | undefined>) => Promise<viem.CallReturnType>;
|
|
1091
1224
|
createAccessList: (parameters: viem.CreateAccessListParameters<viem.Chain | undefined>) => Promise<{
|
|
@@ -7914,10 +8047,12 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
7914
8047
|
}, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
|
|
7915
8048
|
readContract: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "pure" | "view">, const args extends viem.ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: viem.ReadContractParameters<abi, functionName, args>) => Promise<viem.ReadContractReturnType<abi, functionName, args>>;
|
|
7916
8049
|
sendRawTransaction: (args: viem.SendRawTransactionParameters) => Promise<viem.SendRawTransactionReturnType>;
|
|
8050
|
+
sendRawTransactionSync: (args: viem.SendRawTransactionSyncParameters) => Promise<viem.TransactionReceipt>;
|
|
7917
8051
|
simulate: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
|
|
7918
8052
|
simulateBlocks: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
|
|
7919
8053
|
simulateCalls: <const calls extends readonly unknown[]>(args: viem.SimulateCallsParameters<calls>) => Promise<viem.SimulateCallsReturnType<calls>>;
|
|
7920
8054
|
simulateContract: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends viem.ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends viem.Chain | undefined, accountOverride extends viem.Account | Address$1 | undefined = undefined>(args: viem.SimulateContractParameters<abi, functionName, args_1, viem.Chain | undefined, chainOverride, accountOverride>) => Promise<viem.SimulateContractReturnType<abi, functionName, args_1, viem.Chain | undefined, viem.Account | undefined, chainOverride, accountOverride>>;
|
|
8055
|
+
verifyHash: (args: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>;
|
|
7921
8056
|
verifyMessage: (args: viem.VerifyMessageActionParameters) => Promise<viem.VerifyMessageActionReturnType>;
|
|
7922
8057
|
verifySiweMessage: (args: viem__types_actions_siwe_verifySiweMessage.VerifySiweMessageParameters) => Promise<viem__types_actions_siwe_verifySiweMessage.VerifySiweMessageReturnType>;
|
|
7923
8058
|
verifyTypedData: (args: viem.VerifyTypedDataActionParameters) => Promise<viem.VerifyTypedDataActionReturnType>;
|
|
@@ -7935,6 +8070,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
7935
8070
|
cacheTime?: undefined;
|
|
7936
8071
|
ccipRead?: undefined;
|
|
7937
8072
|
chain?: undefined;
|
|
8073
|
+
experimental_blockTag?: undefined;
|
|
7938
8074
|
key?: undefined;
|
|
7939
8075
|
name?: undefined;
|
|
7940
8076
|
pollingInterval?: undefined;
|
|
@@ -7952,7 +8088,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
7952
8088
|
ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
|
|
7953
8089
|
}, {
|
|
7954
8090
|
Method: "eth_getUserOperationReceipt";
|
|
7955
|
-
Parameters: [viem.Hash];
|
|
8091
|
+
Parameters: [viem.Hash, ("pending" | "latest")?];
|
|
7956
8092
|
ReturnType: _aa_sdk_core.UserOperationReceipt | null;
|
|
7957
8093
|
}, {
|
|
7958
8094
|
Method: "eth_getUserOperationByHash";
|
|
@@ -7992,7 +8128,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
7992
8128
|
ReturnType: viem.Quantity;
|
|
7993
8129
|
}, {
|
|
7994
8130
|
Method: "eth_call";
|
|
7995
|
-
Parameters: [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride];
|
|
8131
|
+
Parameters: readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride, blockOverrides: viem.RpcBlockOverrides];
|
|
7996
8132
|
ReturnType: viem.Hex;
|
|
7997
8133
|
}, {
|
|
7998
8134
|
Method: "eth_createAccessList";
|
|
@@ -8141,6 +8277,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8141
8277
|
Method: "eth_sendRawTransaction";
|
|
8142
8278
|
Parameters: [signedTransaction: viem.Hex];
|
|
8143
8279
|
ReturnType: viem.Hash;
|
|
8280
|
+
}, {
|
|
8281
|
+
Method: "eth_sendRawTransactionSync";
|
|
8282
|
+
Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
|
|
8283
|
+
ReturnType: viem.RpcTransactionReceipt;
|
|
8144
8284
|
}, {
|
|
8145
8285
|
Method: "eth_simulateV1";
|
|
8146
8286
|
Parameters: [{
|
|
@@ -8194,8 +8334,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8194
8334
|
[x: `uint8[${string}]`]: undefined;
|
|
8195
8335
|
[x: `bool[${string}]`]: undefined;
|
|
8196
8336
|
[x: `bytes4[${string}]`]: undefined;
|
|
8337
|
+
[x: `uint32[${string}]`]: undefined;
|
|
8197
8338
|
[x: `bytes[${string}]`]: undefined;
|
|
8198
8339
|
[x: `bytes6[${string}]`]: undefined;
|
|
8340
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
8199
8341
|
[x: `bytes1[${string}]`]: undefined;
|
|
8200
8342
|
[x: `bytes2[${string}]`]: undefined;
|
|
8201
8343
|
[x: `bytes3[${string}]`]: undefined;
|
|
@@ -8203,7 +8345,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8203
8345
|
[x: `bytes7[${string}]`]: undefined;
|
|
8204
8346
|
[x: `bytes8[${string}]`]: undefined;
|
|
8205
8347
|
[x: `bytes9[${string}]`]: undefined;
|
|
8206
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
8207
8348
|
[x: `bytes11[${string}]`]: undefined;
|
|
8208
8349
|
[x: `bytes12[${string}]`]: undefined;
|
|
8209
8350
|
[x: `bytes13[${string}]`]: undefined;
|
|
@@ -8261,7 +8402,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8261
8402
|
[x: `uint[${string}]`]: undefined;
|
|
8262
8403
|
[x: `uint16[${string}]`]: undefined;
|
|
8263
8404
|
[x: `uint24[${string}]`]: undefined;
|
|
8264
|
-
[x: `uint32[${string}]`]: undefined;
|
|
8265
8405
|
[x: `uint40[${string}]`]: undefined;
|
|
8266
8406
|
[x: `uint48[${string}]`]: undefined;
|
|
8267
8407
|
[x: `uint56[${string}]`]: undefined;
|
|
@@ -8296,8 +8436,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8296
8436
|
uint8?: undefined;
|
|
8297
8437
|
bool?: undefined;
|
|
8298
8438
|
bytes4?: undefined;
|
|
8439
|
+
uint32?: undefined;
|
|
8299
8440
|
bytes?: undefined;
|
|
8300
8441
|
bytes6?: undefined;
|
|
8442
|
+
bytes10?: undefined;
|
|
8301
8443
|
bytes1?: undefined;
|
|
8302
8444
|
bytes2?: undefined;
|
|
8303
8445
|
bytes3?: undefined;
|
|
@@ -8305,7 +8447,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8305
8447
|
bytes7?: undefined;
|
|
8306
8448
|
bytes8?: undefined;
|
|
8307
8449
|
bytes9?: undefined;
|
|
8308
|
-
bytes10?: undefined;
|
|
8309
8450
|
bytes11?: undefined;
|
|
8310
8451
|
bytes12?: undefined;
|
|
8311
8452
|
bytes13?: undefined;
|
|
@@ -8361,7 +8502,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8361
8502
|
int256?: undefined;
|
|
8362
8503
|
uint16?: undefined;
|
|
8363
8504
|
uint24?: undefined;
|
|
8364
|
-
uint32?: undefined;
|
|
8365
8505
|
uint40?: undefined;
|
|
8366
8506
|
uint48?: undefined;
|
|
8367
8507
|
uint56?: undefined;
|
|
@@ -8403,7 +8543,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8403
8543
|
ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
|
|
8404
8544
|
}, {
|
|
8405
8545
|
Method: "eth_getUserOperationReceipt";
|
|
8406
|
-
Parameters: [viem.Hash];
|
|
8546
|
+
Parameters: [viem.Hash, ("pending" | "latest")?];
|
|
8407
8547
|
ReturnType: _aa_sdk_core.UserOperationReceipt | null;
|
|
8408
8548
|
}, {
|
|
8409
8549
|
Method: "eth_getUserOperationByHash";
|
|
@@ -8443,7 +8583,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8443
8583
|
ReturnType: viem.Quantity;
|
|
8444
8584
|
}, {
|
|
8445
8585
|
Method: "eth_call";
|
|
8446
|
-
Parameters: [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride];
|
|
8586
|
+
Parameters: readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride, blockOverrides: viem.RpcBlockOverrides];
|
|
8447
8587
|
ReturnType: viem.Hex;
|
|
8448
8588
|
}, {
|
|
8449
8589
|
Method: "eth_createAccessList";
|
|
@@ -8592,6 +8732,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8592
8732
|
Method: "eth_sendRawTransaction";
|
|
8593
8733
|
Parameters: [signedTransaction: viem.Hex];
|
|
8594
8734
|
ReturnType: viem.Hash;
|
|
8735
|
+
}, {
|
|
8736
|
+
Method: "eth_sendRawTransactionSync";
|
|
8737
|
+
Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
|
|
8738
|
+
ReturnType: viem.RpcTransactionReceipt;
|
|
8595
8739
|
}, {
|
|
8596
8740
|
Method: "eth_simulateV1";
|
|
8597
8741
|
Parameters: [{
|
|
@@ -8645,8 +8789,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8645
8789
|
[x: `uint8[${string}]`]: undefined;
|
|
8646
8790
|
[x: `bool[${string}]`]: undefined;
|
|
8647
8791
|
[x: `bytes4[${string}]`]: undefined;
|
|
8792
|
+
[x: `uint32[${string}]`]: undefined;
|
|
8648
8793
|
[x: `bytes[${string}]`]: undefined;
|
|
8649
8794
|
[x: `bytes6[${string}]`]: undefined;
|
|
8795
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
8650
8796
|
[x: `bytes1[${string}]`]: undefined;
|
|
8651
8797
|
[x: `bytes2[${string}]`]: undefined;
|
|
8652
8798
|
[x: `bytes3[${string}]`]: undefined;
|
|
@@ -8654,7 +8800,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8654
8800
|
[x: `bytes7[${string}]`]: undefined;
|
|
8655
8801
|
[x: `bytes8[${string}]`]: undefined;
|
|
8656
8802
|
[x: `bytes9[${string}]`]: undefined;
|
|
8657
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
8658
8803
|
[x: `bytes11[${string}]`]: undefined;
|
|
8659
8804
|
[x: `bytes12[${string}]`]: undefined;
|
|
8660
8805
|
[x: `bytes13[${string}]`]: undefined;
|
|
@@ -8712,7 +8857,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8712
8857
|
[x: `uint[${string}]`]: undefined;
|
|
8713
8858
|
[x: `uint16[${string}]`]: undefined;
|
|
8714
8859
|
[x: `uint24[${string}]`]: undefined;
|
|
8715
|
-
[x: `uint32[${string}]`]: undefined;
|
|
8716
8860
|
[x: `uint40[${string}]`]: undefined;
|
|
8717
8861
|
[x: `uint48[${string}]`]: undefined;
|
|
8718
8862
|
[x: `uint56[${string}]`]: undefined;
|
|
@@ -8747,8 +8891,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8747
8891
|
uint8?: undefined;
|
|
8748
8892
|
bool?: undefined;
|
|
8749
8893
|
bytes4?: undefined;
|
|
8894
|
+
uint32?: undefined;
|
|
8750
8895
|
bytes?: undefined;
|
|
8751
8896
|
bytes6?: undefined;
|
|
8897
|
+
bytes10?: undefined;
|
|
8752
8898
|
bytes1?: undefined;
|
|
8753
8899
|
bytes2?: undefined;
|
|
8754
8900
|
bytes3?: undefined;
|
|
@@ -8756,7 +8902,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8756
8902
|
bytes7?: undefined;
|
|
8757
8903
|
bytes8?: undefined;
|
|
8758
8904
|
bytes9?: undefined;
|
|
8759
|
-
bytes10?: undefined;
|
|
8760
8905
|
bytes11?: undefined;
|
|
8761
8906
|
bytes12?: undefined;
|
|
8762
8907
|
bytes13?: undefined;
|
|
@@ -8812,7 +8957,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8812
8957
|
int256?: undefined;
|
|
8813
8958
|
uint16?: undefined;
|
|
8814
8959
|
uint24?: undefined;
|
|
8815
|
-
uint32?: undefined;
|
|
8816
8960
|
uint40?: undefined;
|
|
8817
8961
|
uint48?: undefined;
|
|
8818
8962
|
uint56?: undefined;
|
|
@@ -8846,19 +8990,23 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
8846
8990
|
getAddress: () => Address$1;
|
|
8847
8991
|
} & _aa_sdk_core.BundlerActions & viem.PublicActions>;
|
|
8848
8992
|
};
|
|
8993
|
+
get acpX402(): AcpX402;
|
|
8849
8994
|
private calculateGasFees;
|
|
8850
|
-
handleOperation(
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
txHash: string;
|
|
8854
|
-
jobId: number;
|
|
8855
|
-
}>;
|
|
8856
|
-
createPayableMemo(jobId: number, content: string, amountBaseUnit: bigint, recipient: Address$1, feeAmountBaseUnit: bigint, feeType: FeeType, nextPhase: AcpJobPhases, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, expiredAt: Date, token?: Address$1, secured?: boolean): Promise<`0x${string}`>;
|
|
8857
|
-
createJobWithAccount(accountId: number, providerAddress: Address$1, evaluatorAddress: Address$1, budgetBaseUnit: bigint, paymentTokenAddress: Address$1, expiredAt: Date): Promise<{
|
|
8858
|
-
txHash: string;
|
|
8859
|
-
jobId: number;
|
|
8995
|
+
handleOperation(operations: OperationPayload[]): Promise<{
|
|
8996
|
+
userOpHash: Address$1;
|
|
8997
|
+
txnHash: Address$1;
|
|
8860
8998
|
}>;
|
|
8861
|
-
|
|
8999
|
+
getJobId(createJobUserOpHash: Address$1, clientAddress: Address$1, providerAddress: Address$1): Promise<number>;
|
|
9000
|
+
createJob(providerAddress: Address$1, evaluatorAddress: Address$1, expireAt: Date, paymentTokenAddress: Address$1, budgetBaseUnit: bigint, metadata: string, isX402Job?: boolean): OperationPayload;
|
|
9001
|
+
setBudgetWithPaymentToken(jobId: number, budgetBaseUnit: bigint, paymentTokenAddress?: Address$1): OperationPayload;
|
|
9002
|
+
createPayableMemo(jobId: number, content: string, amountBaseUnit: bigint, recipient: Address$1, feeAmountBaseUnit: bigint, feeType: FeeType, nextPhase: AcpJobPhases, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, expiredAt: Date, token?: Address$1, secured?: boolean): OperationPayload;
|
|
9003
|
+
createJobWithAccount(accountId: number, evaluatorAddress: Address$1, budgetBaseUnit: bigint, paymentTokenAddress: Address$1, expiredAt: Date, isX402Job?: boolean): OperationPayload;
|
|
9004
|
+
updateAccountMetadata(accountId: number, metadata: string): OperationPayload;
|
|
9005
|
+
updateJobX402Nonce(jobId: number, nonce: string): Promise<OffChainJob>;
|
|
9006
|
+
generateX402Payment(payableRequest: X402PayableRequest, requirements: X402PayableRequirements): Promise<X402Payment>;
|
|
9007
|
+
performX402Request(url: string, version: string, budget?: string, signature?: string): Promise<X402PaymentResponse>;
|
|
9008
|
+
getAssetManager(): Promise<Address$1>;
|
|
9009
|
+
getAcpVersion(): string;
|
|
8862
9010
|
}
|
|
8863
9011
|
|
|
8864
9012
|
declare function preparePayload(payload: string | object): string;
|
|
@@ -8871,11 +9019,13 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
8871
9019
|
private jobManagerAddress;
|
|
8872
9020
|
private memoManagerAddress;
|
|
8873
9021
|
private accountManagerAddress;
|
|
8874
|
-
private MAX_RETRIES;
|
|
8875
9022
|
private PRIORITY_FEE_MULTIPLIER;
|
|
8876
9023
|
private MAX_FEE_PER_GAS;
|
|
8877
9024
|
private MAX_PRIORITY_FEE_PER_GAS;
|
|
9025
|
+
private GAS_FEE_MULTIPLIER;
|
|
8878
9026
|
private _sessionKeyClient;
|
|
9027
|
+
private _sessionKeyClients;
|
|
9028
|
+
private _acpX402;
|
|
8879
9029
|
constructor(jobManagerAddress: Address$1, memoManagerAddress: Address$1, accountManagerAddress: Address$1, agentWalletAddress: Address$1, config?: AcpContractConfig);
|
|
8880
9030
|
static build(walletPrivateKey: Address$1, sessionEntityKeyId: number, agentWalletAddress: Address$1, config?: AcpContractConfig): Promise<AcpContractClientV2>;
|
|
8881
9031
|
init(privateKey: Address$1, sessionEntityKeyId: number): Promise<void>;
|
|
@@ -8891,6 +9041,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
8891
9041
|
request?: (parameters: viem.CcipRequestParameters) => Promise<viem__types_utils_ccip.CcipRequestReturnType>;
|
|
8892
9042
|
} | undefined;
|
|
8893
9043
|
chain: viem.Chain;
|
|
9044
|
+
experimental_blockTag?: viem.BlockTag | undefined;
|
|
8894
9045
|
key: string;
|
|
8895
9046
|
name: string;
|
|
8896
9047
|
pollingInterval: number;
|
|
@@ -8904,7 +9055,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
8904
9055
|
ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
|
|
8905
9056
|
}, {
|
|
8906
9057
|
Method: "eth_getUserOperationReceipt";
|
|
8907
|
-
Parameters: [viem.Hash];
|
|
9058
|
+
Parameters: [viem.Hash, ("pending" | "latest")?];
|
|
8908
9059
|
ReturnType: _aa_sdk_core.UserOperationReceipt | null;
|
|
8909
9060
|
}, {
|
|
8910
9061
|
Method: "eth_getUserOperationByHash";
|
|
@@ -8944,7 +9095,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
8944
9095
|
ReturnType: viem.Quantity;
|
|
8945
9096
|
}, {
|
|
8946
9097
|
Method: "eth_call";
|
|
8947
|
-
Parameters: [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride];
|
|
9098
|
+
Parameters: readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride, blockOverrides: viem.RpcBlockOverrides];
|
|
8948
9099
|
ReturnType: viem.Hex;
|
|
8949
9100
|
}, {
|
|
8950
9101
|
Method: "eth_createAccessList";
|
|
@@ -9093,6 +9244,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
9093
9244
|
Method: "eth_sendRawTransaction";
|
|
9094
9245
|
Parameters: [signedTransaction: viem.Hex];
|
|
9095
9246
|
ReturnType: viem.Hash;
|
|
9247
|
+
}, {
|
|
9248
|
+
Method: "eth_sendRawTransactionSync";
|
|
9249
|
+
Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
|
|
9250
|
+
ReturnType: viem.RpcTransactionReceipt;
|
|
9096
9251
|
}, {
|
|
9097
9252
|
Method: "eth_simulateV1";
|
|
9098
9253
|
Parameters: [{
|
|
@@ -9149,8 +9304,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
9149
9304
|
[x: `uint8[${string}]`]: undefined;
|
|
9150
9305
|
[x: `bool[${string}]`]: undefined;
|
|
9151
9306
|
[x: `bytes4[${string}]`]: undefined;
|
|
9307
|
+
[x: `uint32[${string}]`]: undefined;
|
|
9152
9308
|
[x: `bytes[${string}]`]: undefined;
|
|
9153
9309
|
[x: `bytes6[${string}]`]: undefined;
|
|
9310
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
9154
9311
|
[x: `bytes1[${string}]`]: undefined;
|
|
9155
9312
|
[x: `bytes2[${string}]`]: undefined;
|
|
9156
9313
|
[x: `bytes3[${string}]`]: undefined;
|
|
@@ -9158,7 +9315,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
9158
9315
|
[x: `bytes7[${string}]`]: undefined;
|
|
9159
9316
|
[x: `bytes8[${string}]`]: undefined;
|
|
9160
9317
|
[x: `bytes9[${string}]`]: undefined;
|
|
9161
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
9162
9318
|
[x: `bytes11[${string}]`]: undefined;
|
|
9163
9319
|
[x: `bytes12[${string}]`]: undefined;
|
|
9164
9320
|
[x: `bytes13[${string}]`]: undefined;
|
|
@@ -9216,7 +9372,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
9216
9372
|
[x: `uint[${string}]`]: undefined;
|
|
9217
9373
|
[x: `uint16[${string}]`]: undefined;
|
|
9218
9374
|
[x: `uint24[${string}]`]: undefined;
|
|
9219
|
-
[x: `uint32[${string}]`]: undefined;
|
|
9220
9375
|
[x: `uint40[${string}]`]: undefined;
|
|
9221
9376
|
[x: `uint48[${string}]`]: undefined;
|
|
9222
9377
|
[x: `uint56[${string}]`]: undefined;
|
|
@@ -9251,8 +9406,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
9251
9406
|
uint8?: undefined;
|
|
9252
9407
|
bool?: undefined;
|
|
9253
9408
|
bytes4?: undefined;
|
|
9409
|
+
uint32?: undefined;
|
|
9254
9410
|
bytes?: undefined;
|
|
9255
9411
|
bytes6?: undefined;
|
|
9412
|
+
bytes10?: undefined;
|
|
9256
9413
|
bytes1?: undefined;
|
|
9257
9414
|
bytes2?: undefined;
|
|
9258
9415
|
bytes3?: undefined;
|
|
@@ -9260,7 +9417,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
9260
9417
|
bytes7?: undefined;
|
|
9261
9418
|
bytes8?: undefined;
|
|
9262
9419
|
bytes9?: undefined;
|
|
9263
|
-
bytes10?: undefined;
|
|
9264
9420
|
bytes11?: undefined;
|
|
9265
9421
|
bytes12?: undefined;
|
|
9266
9422
|
bytes13?: undefined;
|
|
@@ -9316,7 +9472,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
9316
9472
|
int256?: undefined;
|
|
9317
9473
|
uint16?: undefined;
|
|
9318
9474
|
uint24?: undefined;
|
|
9319
|
-
uint32?: undefined;
|
|
9320
9475
|
uint40?: undefined;
|
|
9321
9476
|
uint48?: undefined;
|
|
9322
9477
|
uint56?: undefined;
|
|
@@ -9350,7 +9505,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
9350
9505
|
estimateUserOperationGas: <TEntryPointVersion extends _aa_sdk_core.EntryPointVersion = keyof _aa_sdk_core.EntryPointRegistryBase<unknown>>(request: _aa_sdk_core.UserOperationRequest<TEntryPointVersion>, entryPoint: Address$1, stateOverride?: viem.StateOverride) => Promise<_aa_sdk_core.UserOperationEstimateGasResponse<TEntryPointVersion>>;
|
|
9351
9506
|
sendRawUserOperation: <TEntryPointVersion extends _aa_sdk_core.EntryPointVersion = keyof _aa_sdk_core.EntryPointRegistryBase<unknown>>(request: _aa_sdk_core.UserOperationRequest<TEntryPointVersion>, entryPoint: Address$1) => Promise<viem.Hash>;
|
|
9352
9507
|
getUserOperationByHash: (hash: viem.Hash) => Promise<_aa_sdk_core.UserOperationResponse | null>;
|
|
9353
|
-
getUserOperationReceipt: (hash: viem.Hash) => Promise<_aa_sdk_core.UserOperationReceipt | null>;
|
|
9508
|
+
getUserOperationReceipt: (hash: viem.Hash, tag?: "pending" | "latest") => Promise<_aa_sdk_core.UserOperationReceipt | null>;
|
|
9354
9509
|
getSupportedEntryPoints: () => Promise<Address$1[]>;
|
|
9355
9510
|
call: (parameters: viem.CallParameters<viem.Chain | undefined>) => Promise<viem.CallReturnType>;
|
|
9356
9511
|
createAccessList: (parameters: viem.CreateAccessListParameters<viem.Chain | undefined>) => Promise<{
|
|
@@ -16179,10 +16334,12 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16179
16334
|
}, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
|
|
16180
16335
|
readContract: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "pure" | "view">, const args extends viem.ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: viem.ReadContractParameters<abi, functionName, args>) => Promise<viem.ReadContractReturnType<abi, functionName, args>>;
|
|
16181
16336
|
sendRawTransaction: (args: viem.SendRawTransactionParameters) => Promise<viem.SendRawTransactionReturnType>;
|
|
16337
|
+
sendRawTransactionSync: (args: viem.SendRawTransactionSyncParameters) => Promise<viem.TransactionReceipt>;
|
|
16182
16338
|
simulate: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
|
|
16183
16339
|
simulateBlocks: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
|
|
16184
16340
|
simulateCalls: <const calls extends readonly unknown[]>(args: viem.SimulateCallsParameters<calls>) => Promise<viem.SimulateCallsReturnType<calls>>;
|
|
16185
16341
|
simulateContract: <const abi extends viem.Abi | readonly unknown[], functionName extends viem.ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends viem.ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends viem.Chain | undefined, accountOverride extends viem.Account | Address$1 | undefined = undefined>(args: viem.SimulateContractParameters<abi, functionName, args_1, viem.Chain | undefined, chainOverride, accountOverride>) => Promise<viem.SimulateContractReturnType<abi, functionName, args_1, viem.Chain | undefined, viem.Account | undefined, chainOverride, accountOverride>>;
|
|
16342
|
+
verifyHash: (args: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>;
|
|
16186
16343
|
verifyMessage: (args: viem.VerifyMessageActionParameters) => Promise<viem.VerifyMessageActionReturnType>;
|
|
16187
16344
|
verifySiweMessage: (args: viem__types_actions_siwe_verifySiweMessage.VerifySiweMessageParameters) => Promise<viem__types_actions_siwe_verifySiweMessage.VerifySiweMessageReturnType>;
|
|
16188
16345
|
verifyTypedData: (args: viem.VerifyTypedDataActionParameters) => Promise<viem.VerifyTypedDataActionReturnType>;
|
|
@@ -16200,6 +16357,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16200
16357
|
cacheTime?: undefined;
|
|
16201
16358
|
ccipRead?: undefined;
|
|
16202
16359
|
chain?: undefined;
|
|
16360
|
+
experimental_blockTag?: undefined;
|
|
16203
16361
|
key?: undefined;
|
|
16204
16362
|
name?: undefined;
|
|
16205
16363
|
pollingInterval?: undefined;
|
|
@@ -16217,7 +16375,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16217
16375
|
ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
|
|
16218
16376
|
}, {
|
|
16219
16377
|
Method: "eth_getUserOperationReceipt";
|
|
16220
|
-
Parameters: [viem.Hash];
|
|
16378
|
+
Parameters: [viem.Hash, ("pending" | "latest")?];
|
|
16221
16379
|
ReturnType: _aa_sdk_core.UserOperationReceipt | null;
|
|
16222
16380
|
}, {
|
|
16223
16381
|
Method: "eth_getUserOperationByHash";
|
|
@@ -16257,7 +16415,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16257
16415
|
ReturnType: viem.Quantity;
|
|
16258
16416
|
}, {
|
|
16259
16417
|
Method: "eth_call";
|
|
16260
|
-
Parameters: [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride];
|
|
16418
|
+
Parameters: readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride, blockOverrides: viem.RpcBlockOverrides];
|
|
16261
16419
|
ReturnType: viem.Hex;
|
|
16262
16420
|
}, {
|
|
16263
16421
|
Method: "eth_createAccessList";
|
|
@@ -16406,6 +16564,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16406
16564
|
Method: "eth_sendRawTransaction";
|
|
16407
16565
|
Parameters: [signedTransaction: viem.Hex];
|
|
16408
16566
|
ReturnType: viem.Hash;
|
|
16567
|
+
}, {
|
|
16568
|
+
Method: "eth_sendRawTransactionSync";
|
|
16569
|
+
Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
|
|
16570
|
+
ReturnType: viem.RpcTransactionReceipt;
|
|
16409
16571
|
}, {
|
|
16410
16572
|
Method: "eth_simulateV1";
|
|
16411
16573
|
Parameters: [{
|
|
@@ -16459,8 +16621,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16459
16621
|
[x: `uint8[${string}]`]: undefined;
|
|
16460
16622
|
[x: `bool[${string}]`]: undefined;
|
|
16461
16623
|
[x: `bytes4[${string}]`]: undefined;
|
|
16624
|
+
[x: `uint32[${string}]`]: undefined;
|
|
16462
16625
|
[x: `bytes[${string}]`]: undefined;
|
|
16463
16626
|
[x: `bytes6[${string}]`]: undefined;
|
|
16627
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
16464
16628
|
[x: `bytes1[${string}]`]: undefined;
|
|
16465
16629
|
[x: `bytes2[${string}]`]: undefined;
|
|
16466
16630
|
[x: `bytes3[${string}]`]: undefined;
|
|
@@ -16468,7 +16632,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16468
16632
|
[x: `bytes7[${string}]`]: undefined;
|
|
16469
16633
|
[x: `bytes8[${string}]`]: undefined;
|
|
16470
16634
|
[x: `bytes9[${string}]`]: undefined;
|
|
16471
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
16472
16635
|
[x: `bytes11[${string}]`]: undefined;
|
|
16473
16636
|
[x: `bytes12[${string}]`]: undefined;
|
|
16474
16637
|
[x: `bytes13[${string}]`]: undefined;
|
|
@@ -16526,7 +16689,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16526
16689
|
[x: `uint[${string}]`]: undefined;
|
|
16527
16690
|
[x: `uint16[${string}]`]: undefined;
|
|
16528
16691
|
[x: `uint24[${string}]`]: undefined;
|
|
16529
|
-
[x: `uint32[${string}]`]: undefined;
|
|
16530
16692
|
[x: `uint40[${string}]`]: undefined;
|
|
16531
16693
|
[x: `uint48[${string}]`]: undefined;
|
|
16532
16694
|
[x: `uint56[${string}]`]: undefined;
|
|
@@ -16561,8 +16723,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16561
16723
|
uint8?: undefined;
|
|
16562
16724
|
bool?: undefined;
|
|
16563
16725
|
bytes4?: undefined;
|
|
16726
|
+
uint32?: undefined;
|
|
16564
16727
|
bytes?: undefined;
|
|
16565
16728
|
bytes6?: undefined;
|
|
16729
|
+
bytes10?: undefined;
|
|
16566
16730
|
bytes1?: undefined;
|
|
16567
16731
|
bytes2?: undefined;
|
|
16568
16732
|
bytes3?: undefined;
|
|
@@ -16570,7 +16734,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16570
16734
|
bytes7?: undefined;
|
|
16571
16735
|
bytes8?: undefined;
|
|
16572
16736
|
bytes9?: undefined;
|
|
16573
|
-
bytes10?: undefined;
|
|
16574
16737
|
bytes11?: undefined;
|
|
16575
16738
|
bytes12?: undefined;
|
|
16576
16739
|
bytes13?: undefined;
|
|
@@ -16626,7 +16789,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16626
16789
|
int256?: undefined;
|
|
16627
16790
|
uint16?: undefined;
|
|
16628
16791
|
uint24?: undefined;
|
|
16629
|
-
uint32?: undefined;
|
|
16630
16792
|
uint40?: undefined;
|
|
16631
16793
|
uint48?: undefined;
|
|
16632
16794
|
uint56?: undefined;
|
|
@@ -16668,7 +16830,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16668
16830
|
ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
|
|
16669
16831
|
}, {
|
|
16670
16832
|
Method: "eth_getUserOperationReceipt";
|
|
16671
|
-
Parameters: [viem.Hash];
|
|
16833
|
+
Parameters: [viem.Hash, ("pending" | "latest")?];
|
|
16672
16834
|
ReturnType: _aa_sdk_core.UserOperationReceipt | null;
|
|
16673
16835
|
}, {
|
|
16674
16836
|
Method: "eth_getUserOperationByHash";
|
|
@@ -16708,7 +16870,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16708
16870
|
ReturnType: viem.Quantity;
|
|
16709
16871
|
}, {
|
|
16710
16872
|
Method: "eth_call";
|
|
16711
|
-
Parameters: [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride];
|
|
16873
|
+
Parameters: readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride] | readonly [transaction: viem.ExactPartial<viem.RpcTransactionRequest>, block: viem.RpcBlockNumber | viem.BlockTag | viem.RpcBlockIdentifier, stateOverrideSet: viem.RpcStateOverride, blockOverrides: viem.RpcBlockOverrides];
|
|
16712
16874
|
ReturnType: viem.Hex;
|
|
16713
16875
|
}, {
|
|
16714
16876
|
Method: "eth_createAccessList";
|
|
@@ -16857,6 +17019,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16857
17019
|
Method: "eth_sendRawTransaction";
|
|
16858
17020
|
Parameters: [signedTransaction: viem.Hex];
|
|
16859
17021
|
ReturnType: viem.Hash;
|
|
17022
|
+
}, {
|
|
17023
|
+
Method: "eth_sendRawTransactionSync";
|
|
17024
|
+
Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
|
|
17025
|
+
ReturnType: viem.RpcTransactionReceipt;
|
|
16860
17026
|
}, {
|
|
16861
17027
|
Method: "eth_simulateV1";
|
|
16862
17028
|
Parameters: [{
|
|
@@ -16910,8 +17076,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16910
17076
|
[x: `uint8[${string}]`]: undefined;
|
|
16911
17077
|
[x: `bool[${string}]`]: undefined;
|
|
16912
17078
|
[x: `bytes4[${string}]`]: undefined;
|
|
17079
|
+
[x: `uint32[${string}]`]: undefined;
|
|
16913
17080
|
[x: `bytes[${string}]`]: undefined;
|
|
16914
17081
|
[x: `bytes6[${string}]`]: undefined;
|
|
17082
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
16915
17083
|
[x: `bytes1[${string}]`]: undefined;
|
|
16916
17084
|
[x: `bytes2[${string}]`]: undefined;
|
|
16917
17085
|
[x: `bytes3[${string}]`]: undefined;
|
|
@@ -16919,7 +17087,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16919
17087
|
[x: `bytes7[${string}]`]: undefined;
|
|
16920
17088
|
[x: `bytes8[${string}]`]: undefined;
|
|
16921
17089
|
[x: `bytes9[${string}]`]: undefined;
|
|
16922
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
16923
17090
|
[x: `bytes11[${string}]`]: undefined;
|
|
16924
17091
|
[x: `bytes12[${string}]`]: undefined;
|
|
16925
17092
|
[x: `bytes13[${string}]`]: undefined;
|
|
@@ -16977,7 +17144,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
16977
17144
|
[x: `uint[${string}]`]: undefined;
|
|
16978
17145
|
[x: `uint16[${string}]`]: undefined;
|
|
16979
17146
|
[x: `uint24[${string}]`]: undefined;
|
|
16980
|
-
[x: `uint32[${string}]`]: undefined;
|
|
16981
17147
|
[x: `uint40[${string}]`]: undefined;
|
|
16982
17148
|
[x: `uint48[${string}]`]: undefined;
|
|
16983
17149
|
[x: `uint56[${string}]`]: undefined;
|
|
@@ -17012,8 +17178,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
17012
17178
|
uint8?: undefined;
|
|
17013
17179
|
bool?: undefined;
|
|
17014
17180
|
bytes4?: undefined;
|
|
17181
|
+
uint32?: undefined;
|
|
17015
17182
|
bytes?: undefined;
|
|
17016
17183
|
bytes6?: undefined;
|
|
17184
|
+
bytes10?: undefined;
|
|
17017
17185
|
bytes1?: undefined;
|
|
17018
17186
|
bytes2?: undefined;
|
|
17019
17187
|
bytes3?: undefined;
|
|
@@ -17021,7 +17189,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
17021
17189
|
bytes7?: undefined;
|
|
17022
17190
|
bytes8?: undefined;
|
|
17023
17191
|
bytes9?: undefined;
|
|
17024
|
-
bytes10?: undefined;
|
|
17025
17192
|
bytes11?: undefined;
|
|
17026
17193
|
bytes12?: undefined;
|
|
17027
17194
|
bytes13?: undefined;
|
|
@@ -17077,7 +17244,6 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
17077
17244
|
int256?: undefined;
|
|
17078
17245
|
uint16?: undefined;
|
|
17079
17246
|
uint24?: undefined;
|
|
17080
|
-
uint32?: undefined;
|
|
17081
17247
|
uint40?: undefined;
|
|
17082
17248
|
uint48?: undefined;
|
|
17083
17249
|
uint56?: undefined;
|
|
@@ -17111,9 +17277,19 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
17111
17277
|
getAddress: () => Address$1;
|
|
17112
17278
|
} & _aa_sdk_core.BundlerActions & viem.PublicActions>;
|
|
17113
17279
|
};
|
|
17280
|
+
get acpX402(): AcpX402;
|
|
17114
17281
|
private calculateGasFees;
|
|
17115
|
-
handleOperation(
|
|
17116
|
-
|
|
17282
|
+
handleOperation(operations: OperationPayload[], chainId?: number): Promise<{
|
|
17283
|
+
userOpHash: Address$1;
|
|
17284
|
+
txnHash: Address$1;
|
|
17285
|
+
}>;
|
|
17286
|
+
getJobId(createJobUserOpHash: Address$1, clientAddress: Address$1, providerAddress: Address$1): Promise<number>;
|
|
17287
|
+
updateJobX402Nonce(jobId: number, nonce: string): Promise<OffChainJob>;
|
|
17288
|
+
generateX402Payment(payableRequest: X402PayableRequest, requirements: X402PayableRequirements): Promise<X402Payment>;
|
|
17289
|
+
performX402Request(url: string, version: string, budget?: string, signature?: string): Promise<X402PaymentResponse>;
|
|
17290
|
+
getX402PaymentDetails(jobId: number): Promise<IAcpJobX402PaymentDetails>;
|
|
17291
|
+
getAssetManager(): Promise<Address$1>;
|
|
17292
|
+
getAcpVersion(): string;
|
|
17117
17293
|
}
|
|
17118
17294
|
|
|
17119
|
-
export { ACP_ABI, AcpAgentSort, AcpContractClient, AcpContractClientV2, AcpContractConfig, AcpError, AcpGraduationStatus, AcpJob, AcpJobPhases, AcpMemo, AcpMemoStatus, AcpOnlineStatus, BaseAcpContractClient, type ClosePositionPayload, type DeliverablePayload, Fare, FareAmount, FareBigInt, type FundResponsePayload, type IDeliverable, MemoType, type OpenPositionPayload, PayloadType, PositionDirection, type RequestClosePositionPayload, type ResponseSwapTokenPayload, type SwapTokenPayload, baseAcpConfig, baseAcpConfigV2, baseSepoliaAcpConfig, baseSepoliaAcpConfigV2, AcpClient as default, ethFare, preparePayload, wethFare };
|
|
17295
|
+
export { ACP_ABI, AcpAgentSort, AcpContractClient, AcpContractClientV2, AcpContractConfig, AcpError, AcpGraduationStatus, AcpJob, AcpJobPhases, AcpMemo, AcpMemoState, AcpMemoStatus, AcpOnlineStatus, BaseAcpContractClient, type ClosePositionPayload, type DeliverablePayload, Fare, FareAmount, FareBigInt, type FundResponsePayload, type IDeliverable, MemoType, type OpenPositionPayload, PayloadType, PositionDirection, type RequestClosePositionPayload, type ResponseSwapTokenPayload, type SwapTokenPayload, baseAcpConfig, baseAcpConfigV2, baseAcpX402Config, baseAcpX402ConfigV2, baseSepoliaAcpConfig, baseSepoliaAcpConfigV2, baseSepoliaAcpX402ConfigV2, AcpClient as default, ethFare, preparePayload, wethFare };
|