@virtuals-protocol/acp-node 0.3.0-beta.13 → 0.3.0-beta.15

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.mts CHANGED
@@ -288,7 +288,7 @@ declare class AcpJob {
288
288
  userOpHash: Address;
289
289
  txnHash: Address;
290
290
  }>;
291
- deliverPayable(deliverable: DeliverablePayload, amount: FareAmountBase, expiredAt?: Date): Promise<{
291
+ deliverPayable(deliverable: DeliverablePayload, amount: FareAmountBase, skipFee?: boolean, expiredAt?: Date): Promise<{
292
292
  userOpHash: Address;
293
293
  txnHash: Address;
294
294
  }>;
@@ -297,7 +297,7 @@ declare class AcpJob {
297
297
  userOpHash: Address;
298
298
  txnHash: Address;
299
299
  }>;
300
- createPayableNotification(content: string, amount: FareAmountBase, expiredAt?: Date): Promise<{
300
+ createPayableNotification(content: string, amount: FareAmountBase, skipFee?: boolean, expiredAt?: Date): Promise<{
301
301
  userOpHash: Address;
302
302
  txnHash: Address;
303
303
  }>;
@@ -343,6 +343,7 @@ interface IAcpClientOptions {
343
343
  onNewTask?: (job: AcpJob, memoToSign?: AcpMemo) => void;
344
344
  onEvaluate?: (job: AcpJob) => void;
345
345
  customRpcUrl?: string;
346
+ skipSocketConnection?: boolean;
346
347
  }
347
348
  type AcpAgent = {
348
349
  id: number;
@@ -581,6 +582,7 @@ declare abstract class BaseAcpContractClient {
581
582
  jobCreatedSignature: string;
582
583
  publicClient: ReturnType<typeof createPublicClient>;
583
584
  constructor(agentWalletAddress: Address, config?: AcpContractConfig);
585
+ protected validateSessionKeyOnChain(sessionSignerAddress: Address, sessionEntityKeyId: number): Promise<void>;
584
586
  abstract handleOperation(operations: OperationPayload[]): Promise<{
585
587
  userOpHash: Address;
586
588
  txnHash: Address;
@@ -604,6 +606,10 @@ declare abstract class BaseAcpContractClient {
604
606
  abstract getAcpVersion(): string;
605
607
  }
606
608
 
609
+ declare class AcpError extends Error {
610
+ constructor(message: string, originalError?: unknown);
611
+ }
612
+
607
613
  interface IAcpBrowseAgentsOptions {
608
614
  cluster?: string;
609
615
  sort_by?: AcpAgentSort[];
@@ -620,8 +626,8 @@ declare class AcpClient {
620
626
  get acpContractClient(): BaseAcpContractClient;
621
627
  get acpUrl(): string;
622
628
  private defaultOnEvaluate;
623
- get walletAddress(): any;
624
- init(): Promise<void>;
629
+ get walletAddress(): `0x${string}`;
630
+ init(skipSocketConnection?: boolean): Promise<void>;
625
631
  browseAgents(keyword: string, options: IAcpBrowseAgentsOptions): Promise<{
626
632
  id: number;
627
633
  name: string;
@@ -646,12 +652,12 @@ declare class AcpClient {
646
652
  }[];
647
653
  }[]>;
648
654
  initiateJob(providerAddress: Address, serviceRequirement: Object | string, fareAmount: FareAmountBase, evaluatorAddress?: Address, expiredAt?: Date): Promise<number>;
649
- getActiveJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
650
- getPendingMemoJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
651
- getCompletedJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
652
- getCancelledJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
653
- getJobById(jobId: number): Promise<AcpJob | undefined>;
654
- getMemoById(jobId: number, memoId: number): Promise<AcpMemo | undefined>;
655
+ getActiveJobs(page?: number, pageSize?: number): Promise<AcpError | AcpJob[]>;
656
+ getPendingMemoJobs(page?: number, pageSize?: number): Promise<AcpError | AcpJob[]>;
657
+ getCompletedJobs(page?: number, pageSize?: number): Promise<AcpError | AcpJob[]>;
658
+ getCancelledJobs(page?: number, pageSize?: number): Promise<Error | AcpJob[]>;
659
+ getJobById(jobId: number): Promise<AcpError | AcpJob | undefined>;
660
+ getMemoById(jobId: number, memoId: number): Promise<AcpError | AcpMemo | undefined>;
655
661
  getAgent(walletAddress: Address): Promise<AcpAgent | undefined>;
656
662
  getAccountByJobId(jobId: number, acpContractClient?: BaseAcpContractClient): Promise<AcpAccount | null>;
657
663
  getByClientAndProvider(clientAddress: Address, providerAddress: Address, acpContractClient?: BaseAcpContractClient): Promise<AcpAccount | null>;
@@ -8948,10 +8954,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
8948
8954
 
8949
8955
  declare function preparePayload(payload: string | object): string;
8950
8956
 
8951
- declare class AcpError extends Error {
8952
- constructor(message: string, originalError?: unknown);
8953
- }
8954
-
8955
8957
  declare class AcpContractClientV2 extends BaseAcpContractClient {
8956
8958
  private jobManagerAddress;
8957
8959
  private memoManagerAddress;
package/dist/index.d.ts CHANGED
@@ -288,7 +288,7 @@ declare class AcpJob {
288
288
  userOpHash: Address;
289
289
  txnHash: Address;
290
290
  }>;
291
- deliverPayable(deliverable: DeliverablePayload, amount: FareAmountBase, expiredAt?: Date): Promise<{
291
+ deliverPayable(deliverable: DeliverablePayload, amount: FareAmountBase, skipFee?: boolean, expiredAt?: Date): Promise<{
292
292
  userOpHash: Address;
293
293
  txnHash: Address;
294
294
  }>;
@@ -297,7 +297,7 @@ declare class AcpJob {
297
297
  userOpHash: Address;
298
298
  txnHash: Address;
299
299
  }>;
300
- createPayableNotification(content: string, amount: FareAmountBase, expiredAt?: Date): Promise<{
300
+ createPayableNotification(content: string, amount: FareAmountBase, skipFee?: boolean, expiredAt?: Date): Promise<{
301
301
  userOpHash: Address;
302
302
  txnHash: Address;
303
303
  }>;
@@ -343,6 +343,7 @@ interface IAcpClientOptions {
343
343
  onNewTask?: (job: AcpJob, memoToSign?: AcpMemo) => void;
344
344
  onEvaluate?: (job: AcpJob) => void;
345
345
  customRpcUrl?: string;
346
+ skipSocketConnection?: boolean;
346
347
  }
347
348
  type AcpAgent = {
348
349
  id: number;
@@ -581,6 +582,7 @@ declare abstract class BaseAcpContractClient {
581
582
  jobCreatedSignature: string;
582
583
  publicClient: ReturnType<typeof createPublicClient>;
583
584
  constructor(agentWalletAddress: Address, config?: AcpContractConfig);
585
+ protected validateSessionKeyOnChain(sessionSignerAddress: Address, sessionEntityKeyId: number): Promise<void>;
584
586
  abstract handleOperation(operations: OperationPayload[]): Promise<{
585
587
  userOpHash: Address;
586
588
  txnHash: Address;
@@ -604,6 +606,10 @@ declare abstract class BaseAcpContractClient {
604
606
  abstract getAcpVersion(): string;
605
607
  }
606
608
 
609
+ declare class AcpError extends Error {
610
+ constructor(message: string, originalError?: unknown);
611
+ }
612
+
607
613
  interface IAcpBrowseAgentsOptions {
608
614
  cluster?: string;
609
615
  sort_by?: AcpAgentSort[];
@@ -620,8 +626,8 @@ declare class AcpClient {
620
626
  get acpContractClient(): BaseAcpContractClient;
621
627
  get acpUrl(): string;
622
628
  private defaultOnEvaluate;
623
- get walletAddress(): any;
624
- init(): Promise<void>;
629
+ get walletAddress(): `0x${string}`;
630
+ init(skipSocketConnection?: boolean): Promise<void>;
625
631
  browseAgents(keyword: string, options: IAcpBrowseAgentsOptions): Promise<{
626
632
  id: number;
627
633
  name: string;
@@ -646,12 +652,12 @@ declare class AcpClient {
646
652
  }[];
647
653
  }[]>;
648
654
  initiateJob(providerAddress: Address, serviceRequirement: Object | string, fareAmount: FareAmountBase, evaluatorAddress?: Address, expiredAt?: Date): Promise<number>;
649
- getActiveJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
650
- getPendingMemoJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
651
- getCompletedJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
652
- getCancelledJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
653
- getJobById(jobId: number): Promise<AcpJob | undefined>;
654
- getMemoById(jobId: number, memoId: number): Promise<AcpMemo | undefined>;
655
+ getActiveJobs(page?: number, pageSize?: number): Promise<AcpError | AcpJob[]>;
656
+ getPendingMemoJobs(page?: number, pageSize?: number): Promise<AcpError | AcpJob[]>;
657
+ getCompletedJobs(page?: number, pageSize?: number): Promise<AcpError | AcpJob[]>;
658
+ getCancelledJobs(page?: number, pageSize?: number): Promise<Error | AcpJob[]>;
659
+ getJobById(jobId: number): Promise<AcpError | AcpJob | undefined>;
660
+ getMemoById(jobId: number, memoId: number): Promise<AcpError | AcpMemo | undefined>;
655
661
  getAgent(walletAddress: Address): Promise<AcpAgent | undefined>;
656
662
  getAccountByJobId(jobId: number, acpContractClient?: BaseAcpContractClient): Promise<AcpAccount | null>;
657
663
  getByClientAndProvider(clientAddress: Address, providerAddress: Address, acpContractClient?: BaseAcpContractClient): Promise<AcpAccount | null>;
@@ -8948,10 +8954,6 @@ declare class AcpContractClient extends BaseAcpContractClient {
8948
8954
 
8949
8955
  declare function preparePayload(payload: string | object): string;
8950
8956
 
8951
- declare class AcpError extends Error {
8952
- constructor(message: string, originalError?: unknown);
8953
- }
8954
-
8955
8957
  declare class AcpContractClientV2 extends BaseAcpContractClient {
8956
8958
  private jobManagerAddress;
8957
8959
  private memoManagerAddress;