@virtuals-protocol/acp-node 0.3.0-beta.4 → 0.3.0-beta.6

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/dist/index.d.ts CHANGED
@@ -218,6 +218,11 @@ declare enum FeeType {
218
218
  IMMEDIATE_FEE = 1,
219
219
  DEFERRED_FEE = 2
220
220
  }
221
+ interface OperationPayload {
222
+ data: `0x${string}`;
223
+ contractAddress: Address;
224
+ value?: bigint;
225
+ }
221
226
  declare abstract class BaseAcpContractClient {
222
227
  agentWalletAddress: Address;
223
228
  config: AcpContractConfig;
@@ -226,24 +231,18 @@ declare abstract class BaseAcpContractClient {
226
231
  abi: typeof ACP_ABI | typeof ACP_V2_ABI;
227
232
  jobCreatedSignature: string;
228
233
  constructor(agentWalletAddress: Address, config?: AcpContractConfig);
229
- abstract handleOperation(data: `0x${string}`, contractAddress: Address, value?: bigint): Promise<Address>;
234
+ abstract handleOperation(operations: OperationPayload[]): Promise<Address>;
230
235
  abstract getJobId(hash: Address, clientAddress: Address, providerAddress: Address): Promise<number>;
231
236
  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}`>;
237
+ createJobWithAccount(accountId: number, providerAddress: Address, evaluatorAddress: Address, budgetBaseUnit: bigint, paymentTokenAddress: Address, expiredAt: Date): OperationPayload;
238
+ createJob(providerAddress: Address, evaluatorAddress: Address, expiredAt: Date, paymentTokenAddress: Address, budgetBaseUnit: bigint, metadata: string): OperationPayload;
239
+ approveAllowance(amountBaseUnit: bigint, paymentTokenAddress?: Address): OperationPayload;
240
+ 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;
241
+ createMemo(jobId: number, content: string, type: MemoType, isSecured: boolean, nextPhase: AcpJobPhases): OperationPayload;
242
+ signMemo(memoId: number, isApproved: boolean, reason?: string): OperationPayload;
243
+ setBudgetWithPaymentToken(jobId: number, budgetBaseUnit: bigint, paymentTokenAddress?: Address): OperationPayload | undefined;
244
+ updateAccountMetadata(accountId: number, metadata: string): OperationPayload;
245
+ wrapEth(amountBaseUnit: bigint): OperationPayload;
247
246
  }
248
247
 
249
248
  declare class AcpAccount {
@@ -253,7 +252,7 @@ declare class AcpAccount {
253
252
  providerAddress: Address;
254
253
  metadata: Record<string, any>;
255
254
  constructor(contractClient: BaseAcpContractClient, id: number, clientAddress: Address, providerAddress: Address, metadata: Record<string, any>);
256
- updateMetadata(metadata: Record<string, any>): Promise<`0x${string}`>;
255
+ updateMetadata(metadata: Record<string, any>): Promise<OperationPayload>;
257
256
  }
258
257
 
259
258
  declare class AcpMemo {
@@ -271,7 +270,7 @@ declare class AcpMemo {
271
270
  constructor(contractClient: BaseAcpContractClient, id: number, type: MemoType, content: string, nextPhase: AcpJobPhases, status: AcpMemoStatus, senderAddress: Address, signedReason?: string | undefined, expiry?: Date | undefined, payableDetails?: PayableDetails | undefined);
272
271
  get payloadType(): PayloadType | undefined;
273
272
  getStructuredContent<T>(): GenericPayload<T> | undefined;
274
- create(jobId: number, isSecured?: boolean): Promise<`0x${string}`>;
273
+ create(jobId: number, isSecured?: boolean): Promise<OperationPayload>;
275
274
  sign(approved: boolean, reason?: string): Promise<`0x${string}`>;
276
275
  }
277
276
 
@@ -401,22 +400,6 @@ type ClosePositionPayload = {
401
400
  positionId: number;
402
401
  amount: number;
403
402
  };
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
403
  type RequestClosePositionPayload = {
421
404
  positionId: number;
422
405
  };
@@ -450,83 +433,14 @@ declare class AcpJob {
450
433
  createPayableRequirement(content: string, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, amount: FareAmountBase, recipient: Address, expiredAt?: Date): Promise<`0x${string}`>;
451
434
  payAndAcceptRequirement(reason?: string): Promise<`0x${string}`>;
452
435
  respond(accept: boolean, reason?: string): Promise<`0x${string}`>;
453
- accept(reason?: string): Promise<void>;
436
+ accept(reason?: string): Promise<`0x${string}`>;
454
437
  reject(reason?: string): Promise<`0x${string}`>;
438
+ rejectPayable(reason: string | undefined, amount: FareAmountBase, expiredAt?: Date): Promise<`0x${string}`>;
455
439
  deliver(deliverable: DeliverablePayload): Promise<`0x${string}`>;
456
440
  deliverPayable(deliverable: DeliverablePayload, amount: FareAmountBase, expiredAt?: Date): Promise<`0x${string}`>;
457
441
  evaluate(accept: boolean, reason?: string): Promise<void>;
458
- pay(reason?: string): Promise<`0x${string}`>;
459
442
  createNotification(content: string): Promise<`0x${string}`>;
460
443
  createPayableNotification(content: string, amount: FareAmountBase, expiredAt?: Date): Promise<`0x${string}`>;
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>;
530
444
  }
531
445
 
532
446
  declare class AcpJobOffering {
@@ -583,17 +497,6 @@ declare class AcpClient {
583
497
  }[];
584
498
  }[]>;
585
499
  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
500
  getActiveJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
598
501
  getPendingMemoJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
599
502
  getCompletedJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
@@ -626,6 +529,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
626
529
  request?: (parameters: viem.CcipRequestParameters) => Promise<viem__types_utils_ccip.CcipRequestReturnType>;
627
530
  } | undefined;
628
531
  chain: viem.Chain;
532
+ experimental_blockTag?: viem.BlockTag | undefined;
629
533
  key: string;
630
534
  name: string;
631
535
  pollingInterval: number;
@@ -639,7 +543,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
639
543
  ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
640
544
  }, {
641
545
  Method: "eth_getUserOperationReceipt";
642
- Parameters: [viem.Hash];
546
+ Parameters: [viem.Hash, ("pending" | "latest")?];
643
547
  ReturnType: _aa_sdk_core.UserOperationReceipt | null;
644
548
  }, {
645
549
  Method: "eth_getUserOperationByHash";
@@ -679,7 +583,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
679
583
  ReturnType: viem.Quantity;
680
584
  }, {
681
585
  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];
586
+ 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
587
  ReturnType: viem.Hex;
684
588
  }, {
685
589
  Method: "eth_createAccessList";
@@ -828,6 +732,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
828
732
  Method: "eth_sendRawTransaction";
829
733
  Parameters: [signedTransaction: viem.Hex];
830
734
  ReturnType: viem.Hash;
735
+ }, {
736
+ Method: "eth_sendRawTransactionSync";
737
+ Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
738
+ ReturnType: viem.RpcTransactionReceipt;
831
739
  }, {
832
740
  Method: "eth_simulateV1";
833
741
  Parameters: [{
@@ -1085,7 +993,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
1085
993
  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
994
  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
995
  getUserOperationByHash: (hash: viem.Hash) => Promise<_aa_sdk_core.UserOperationResponse | null>;
1088
- getUserOperationReceipt: (hash: viem.Hash) => Promise<_aa_sdk_core.UserOperationReceipt | null>;
996
+ getUserOperationReceipt: (hash: viem.Hash, tag?: "pending" | "latest") => Promise<_aa_sdk_core.UserOperationReceipt | null>;
1089
997
  getSupportedEntryPoints: () => Promise<Address$1[]>;
1090
998
  call: (parameters: viem.CallParameters<viem.Chain | undefined>) => Promise<viem.CallReturnType>;
1091
999
  createAccessList: (parameters: viem.CreateAccessListParameters<viem.Chain | undefined>) => Promise<{
@@ -7914,10 +7822,12 @@ declare class AcpContractClient extends BaseAcpContractClient {
7914
7822
  }, (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
7823
  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
7824
  sendRawTransaction: (args: viem.SendRawTransactionParameters) => Promise<viem.SendRawTransactionReturnType>;
7825
+ sendRawTransactionSync: (args: viem.SendRawTransactionSyncParameters) => Promise<viem.TransactionReceipt>;
7917
7826
  simulate: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
7918
7827
  simulateBlocks: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
7919
7828
  simulateCalls: <const calls extends readonly unknown[]>(args: viem.SimulateCallsParameters<calls>) => Promise<viem.SimulateCallsReturnType<calls>>;
7920
7829
  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>>;
7830
+ verifyHash: (args: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>;
7921
7831
  verifyMessage: (args: viem.VerifyMessageActionParameters) => Promise<viem.VerifyMessageActionReturnType>;
7922
7832
  verifySiweMessage: (args: viem__types_actions_siwe_verifySiweMessage.VerifySiweMessageParameters) => Promise<viem__types_actions_siwe_verifySiweMessage.VerifySiweMessageReturnType>;
7923
7833
  verifyTypedData: (args: viem.VerifyTypedDataActionParameters) => Promise<viem.VerifyTypedDataActionReturnType>;
@@ -7935,6 +7845,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
7935
7845
  cacheTime?: undefined;
7936
7846
  ccipRead?: undefined;
7937
7847
  chain?: undefined;
7848
+ experimental_blockTag?: undefined;
7938
7849
  key?: undefined;
7939
7850
  name?: undefined;
7940
7851
  pollingInterval?: undefined;
@@ -7952,7 +7863,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
7952
7863
  ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
7953
7864
  }, {
7954
7865
  Method: "eth_getUserOperationReceipt";
7955
- Parameters: [viem.Hash];
7866
+ Parameters: [viem.Hash, ("pending" | "latest")?];
7956
7867
  ReturnType: _aa_sdk_core.UserOperationReceipt | null;
7957
7868
  }, {
7958
7869
  Method: "eth_getUserOperationByHash";
@@ -7992,7 +7903,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
7992
7903
  ReturnType: viem.Quantity;
7993
7904
  }, {
7994
7905
  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];
7906
+ 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
7907
  ReturnType: viem.Hex;
7997
7908
  }, {
7998
7909
  Method: "eth_createAccessList";
@@ -8141,6 +8052,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
8141
8052
  Method: "eth_sendRawTransaction";
8142
8053
  Parameters: [signedTransaction: viem.Hex];
8143
8054
  ReturnType: viem.Hash;
8055
+ }, {
8056
+ Method: "eth_sendRawTransactionSync";
8057
+ Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
8058
+ ReturnType: viem.RpcTransactionReceipt;
8144
8059
  }, {
8145
8060
  Method: "eth_simulateV1";
8146
8061
  Parameters: [{
@@ -8403,7 +8318,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
8403
8318
  ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
8404
8319
  }, {
8405
8320
  Method: "eth_getUserOperationReceipt";
8406
- Parameters: [viem.Hash];
8321
+ Parameters: [viem.Hash, ("pending" | "latest")?];
8407
8322
  ReturnType: _aa_sdk_core.UserOperationReceipt | null;
8408
8323
  }, {
8409
8324
  Method: "eth_getUserOperationByHash";
@@ -8443,7 +8358,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
8443
8358
  ReturnType: viem.Quantity;
8444
8359
  }, {
8445
8360
  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];
8361
+ 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
8362
  ReturnType: viem.Hex;
8448
8363
  }, {
8449
8364
  Method: "eth_createAccessList";
@@ -8592,6 +8507,10 @@ declare class AcpContractClient extends BaseAcpContractClient {
8592
8507
  Method: "eth_sendRawTransaction";
8593
8508
  Parameters: [signedTransaction: viem.Hex];
8594
8509
  ReturnType: viem.Hash;
8510
+ }, {
8511
+ Method: "eth_sendRawTransactionSync";
8512
+ Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
8513
+ ReturnType: viem.RpcTransactionReceipt;
8595
8514
  }, {
8596
8515
  Method: "eth_simulateV1";
8597
8516
  Parameters: [{
@@ -8847,18 +8766,13 @@ declare class AcpContractClient extends BaseAcpContractClient {
8847
8766
  } & _aa_sdk_core.BundlerActions & viem.PublicActions>;
8848
8767
  };
8849
8768
  private calculateGasFees;
8850
- handleOperation(data: `0x${string}`, contractAddress?: Address$1, value?: bigint): Promise<`0x${string}`>;
8769
+ handleOperation(operations: OperationPayload[]): Promise<`0x${string}`>;
8851
8770
  getJobId(hash: Address$1, clientAddress: Address$1, providerAddress: Address$1): Promise<number>;
8852
- createJob(providerAddress: Address$1, evaluatorAddress: Address$1, expireAt: Date, paymentTokenAddress: Address$1, budgetBaseUnit: bigint, metadata: string): Promise<{
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;
8860
- }>;
8861
- updateAccountMetadata(accountId: number, metadata: string): Promise<Address$1>;
8771
+ createJob(providerAddress: Address$1, evaluatorAddress: Address$1, expireAt: Date, paymentTokenAddress: Address$1, budgetBaseUnit: bigint, metadata: string): OperationPayload;
8772
+ setBudgetWithPaymentToken(jobId: number, budgetBaseUnit: bigint, paymentTokenAddress?: Address$1): OperationPayload;
8773
+ 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;
8774
+ createJobWithAccount(accountId: number, providerAddress: Address$1, evaluatorAddress: Address$1, budgetBaseUnit: bigint, paymentTokenAddress: Address$1, expiredAt: Date): OperationPayload;
8775
+ updateAccountMetadata(accountId: number, metadata: string): OperationPayload;
8862
8776
  }
8863
8777
 
8864
8778
  declare function preparePayload(payload: string | object): string;
@@ -8891,6 +8805,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
8891
8805
  request?: (parameters: viem.CcipRequestParameters) => Promise<viem__types_utils_ccip.CcipRequestReturnType>;
8892
8806
  } | undefined;
8893
8807
  chain: viem.Chain;
8808
+ experimental_blockTag?: viem.BlockTag | undefined;
8894
8809
  key: string;
8895
8810
  name: string;
8896
8811
  pollingInterval: number;
@@ -8904,7 +8819,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
8904
8819
  ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
8905
8820
  }, {
8906
8821
  Method: "eth_getUserOperationReceipt";
8907
- Parameters: [viem.Hash];
8822
+ Parameters: [viem.Hash, ("pending" | "latest")?];
8908
8823
  ReturnType: _aa_sdk_core.UserOperationReceipt | null;
8909
8824
  }, {
8910
8825
  Method: "eth_getUserOperationByHash";
@@ -8944,7 +8859,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
8944
8859
  ReturnType: viem.Quantity;
8945
8860
  }, {
8946
8861
  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];
8862
+ 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
8863
  ReturnType: viem.Hex;
8949
8864
  }, {
8950
8865
  Method: "eth_createAccessList";
@@ -9093,6 +9008,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
9093
9008
  Method: "eth_sendRawTransaction";
9094
9009
  Parameters: [signedTransaction: viem.Hex];
9095
9010
  ReturnType: viem.Hash;
9011
+ }, {
9012
+ Method: "eth_sendRawTransactionSync";
9013
+ Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
9014
+ ReturnType: viem.RpcTransactionReceipt;
9096
9015
  }, {
9097
9016
  Method: "eth_simulateV1";
9098
9017
  Parameters: [{
@@ -9350,7 +9269,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
9350
9269
  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
9270
  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
9271
  getUserOperationByHash: (hash: viem.Hash) => Promise<_aa_sdk_core.UserOperationResponse | null>;
9353
- getUserOperationReceipt: (hash: viem.Hash) => Promise<_aa_sdk_core.UserOperationReceipt | null>;
9272
+ getUserOperationReceipt: (hash: viem.Hash, tag?: "pending" | "latest") => Promise<_aa_sdk_core.UserOperationReceipt | null>;
9354
9273
  getSupportedEntryPoints: () => Promise<Address$1[]>;
9355
9274
  call: (parameters: viem.CallParameters<viem.Chain | undefined>) => Promise<viem.CallReturnType>;
9356
9275
  createAccessList: (parameters: viem.CreateAccessListParameters<viem.Chain | undefined>) => Promise<{
@@ -16179,10 +16098,12 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
16179
16098
  }, (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
16099
  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
16100
  sendRawTransaction: (args: viem.SendRawTransactionParameters) => Promise<viem.SendRawTransactionReturnType>;
16101
+ sendRawTransactionSync: (args: viem.SendRawTransactionSyncParameters) => Promise<viem.TransactionReceipt>;
16182
16102
  simulate: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
16183
16103
  simulateBlocks: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
16184
16104
  simulateCalls: <const calls extends readonly unknown[]>(args: viem.SimulateCallsParameters<calls>) => Promise<viem.SimulateCallsReturnType<calls>>;
16185
16105
  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>>;
16106
+ verifyHash: (args: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>;
16186
16107
  verifyMessage: (args: viem.VerifyMessageActionParameters) => Promise<viem.VerifyMessageActionReturnType>;
16187
16108
  verifySiweMessage: (args: viem__types_actions_siwe_verifySiweMessage.VerifySiweMessageParameters) => Promise<viem__types_actions_siwe_verifySiweMessage.VerifySiweMessageReturnType>;
16188
16109
  verifyTypedData: (args: viem.VerifyTypedDataActionParameters) => Promise<viem.VerifyTypedDataActionReturnType>;
@@ -16200,6 +16121,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
16200
16121
  cacheTime?: undefined;
16201
16122
  ccipRead?: undefined;
16202
16123
  chain?: undefined;
16124
+ experimental_blockTag?: undefined;
16203
16125
  key?: undefined;
16204
16126
  name?: undefined;
16205
16127
  pollingInterval?: undefined;
@@ -16217,7 +16139,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
16217
16139
  ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
16218
16140
  }, {
16219
16141
  Method: "eth_getUserOperationReceipt";
16220
- Parameters: [viem.Hash];
16142
+ Parameters: [viem.Hash, ("pending" | "latest")?];
16221
16143
  ReturnType: _aa_sdk_core.UserOperationReceipt | null;
16222
16144
  }, {
16223
16145
  Method: "eth_getUserOperationByHash";
@@ -16257,7 +16179,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
16257
16179
  ReturnType: viem.Quantity;
16258
16180
  }, {
16259
16181
  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];
16182
+ 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
16183
  ReturnType: viem.Hex;
16262
16184
  }, {
16263
16185
  Method: "eth_createAccessList";
@@ -16406,6 +16328,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
16406
16328
  Method: "eth_sendRawTransaction";
16407
16329
  Parameters: [signedTransaction: viem.Hex];
16408
16330
  ReturnType: viem.Hash;
16331
+ }, {
16332
+ Method: "eth_sendRawTransactionSync";
16333
+ Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
16334
+ ReturnType: viem.RpcTransactionReceipt;
16409
16335
  }, {
16410
16336
  Method: "eth_simulateV1";
16411
16337
  Parameters: [{
@@ -16668,7 +16594,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
16668
16594
  ReturnType: _aa_sdk_core.UserOperationEstimateGasResponse;
16669
16595
  }, {
16670
16596
  Method: "eth_getUserOperationReceipt";
16671
- Parameters: [viem.Hash];
16597
+ Parameters: [viem.Hash, ("pending" | "latest")?];
16672
16598
  ReturnType: _aa_sdk_core.UserOperationReceipt | null;
16673
16599
  }, {
16674
16600
  Method: "eth_getUserOperationByHash";
@@ -16708,7 +16634,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
16708
16634
  ReturnType: viem.Quantity;
16709
16635
  }, {
16710
16636
  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];
16637
+ 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
16638
  ReturnType: viem.Hex;
16713
16639
  }, {
16714
16640
  Method: "eth_createAccessList";
@@ -16857,6 +16783,10 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
16857
16783
  Method: "eth_sendRawTransaction";
16858
16784
  Parameters: [signedTransaction: viem.Hex];
16859
16785
  ReturnType: viem.Hash;
16786
+ }, {
16787
+ Method: "eth_sendRawTransactionSync";
16788
+ Parameters: [signedTransaction: viem.Hex] | [signedTransaction: viem.Hex, timeout: viem.Hex];
16789
+ ReturnType: viem.RpcTransactionReceipt;
16860
16790
  }, {
16861
16791
  Method: "eth_simulateV1";
16862
16792
  Parameters: [{
@@ -17112,7 +17042,7 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
17112
17042
  } & _aa_sdk_core.BundlerActions & viem.PublicActions>;
17113
17043
  };
17114
17044
  private calculateGasFees;
17115
- handleOperation(data: `0x${string}`, contractAddress?: Address$1, value?: bigint): Promise<`0x${string}`>;
17045
+ handleOperation(operations: OperationPayload[]): Promise<Address$1>;
17116
17046
  getJobId(hash: Address$1, clientAddress: Address$1, providerAddress: Address$1): Promise<number>;
17117
17047
  }
17118
17048