@virtuals-protocol/acp-node 0.2.0-beta.5 → 0.2.0-beta.7
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 +5 -3
- package/dist/index.d.mts +27 -14
- package/dist/index.d.ts +27 -14
- package/dist/index.js +1027 -230
- package/dist/index.mjs +1029 -231
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,15 +50,17 @@ The ACP Node SDK provides the following core functionalities:
|
|
|
50
50
|
### Testing Flow
|
|
51
51
|
#### 1. Register a New Agent
|
|
52
52
|
- You’ll be working in the sandbox environment. Follow the [tutorial](https://whitepaper.virtuals.io/info-hub/builders-hub/agent-commerce-protocol-acp-builder-guide/acp-tech-playbook#id-2.-agent-creation-and-whitelisting) here to create your agent.
|
|
53
|
+
- Create two agents: one as the buyer agent (to initiate test jobs for your seller agent) and one as your seller agent (service provider agent).
|
|
54
|
+
- The seller agent should be your actual agent, the one you intend to make live on the ACP platform.
|
|
53
55
|
|
|
54
56
|
#### 2. Create Smart Wallet and Whitelist Dev Wallet
|
|
55
57
|
- Follow the [tutorial](https://whitepaper.virtuals.io/info-hub/builders-hub/agent-commerce-protocol-acp-builder-guide/acp-tech-playbook#id-2b.-create-smart-wallet-account-and-wallet-whitelisting-steps) here
|
|
56
58
|
|
|
57
59
|
#### 3. Use Self-Evaluation Flow to Test the Full Job Lifecycle
|
|
58
|
-
- Node SDK (Self Evaluation Example): [Link](https://github.com/Virtual-Protocol/acp-node/tree/main/examples/acp-base/self-evaluation)
|
|
60
|
+
- ACP Node SDK (Self Evaluation Example): [Link](https://github.com/Virtual-Protocol/acp-node/tree/main/examples/acp-base/self-evaluation)
|
|
59
61
|
|
|
60
62
|
#### 4. Fund Your Test Agent
|
|
61
|
-
- Top up your test buyer agent with $
|
|
63
|
+
- Top up your test buyer agent with $USDC. Gas fee is sponsored, ETH is not required.
|
|
62
64
|
- It is recommended to set the service price of the seller agent to $0.01 for testing purposes.
|
|
63
65
|
|
|
64
66
|
#### 5. Run Your Test Agent
|
|
@@ -282,6 +284,6 @@ We welcome contributions from the community to help improve the ACP Node SDK. Th
|
|
|
282
284
|
- It includes the links to the multi-agent demo dashboard and paper.
|
|
283
285
|
|
|
284
286
|
|
|
285
|
-
4. [ACP FAQs](https://
|
|
287
|
+
4. [ACP FAQs](https://whitepaper.virtuals.io/info-hub/builders-hub/agent-commerce-protocol-acp-builder-guide/acp-faq-debugging-tips-and-best-practices)
|
|
286
288
|
- Comprehensive FAQ section covering common plugin questions—everything from installation and configuration to key API usage patterns.
|
|
287
289
|
- Step-by-step troubleshooting tips for resolving frequent errors like incomplete deliverable evaluations and wallet credential issues.
|
package/dist/index.d.mts
CHANGED
|
@@ -95,7 +95,8 @@ declare const ACP_ABI: ({
|
|
|
95
95
|
type AcpContractConfig = {
|
|
96
96
|
chain: typeof baseSepolia | typeof base;
|
|
97
97
|
contractAddress: Address;
|
|
98
|
-
|
|
98
|
+
paymentTokenAddress: Address;
|
|
99
|
+
paymentTokenDecimals: number;
|
|
99
100
|
acpUrl: string;
|
|
100
101
|
alchemyRpcUrl: string;
|
|
101
102
|
priorityFeeMultiplier: number;
|
|
@@ -140,7 +141,7 @@ declare class AcpContractClient {
|
|
|
140
141
|
private _sessionKeyClient;
|
|
141
142
|
private chain;
|
|
142
143
|
private contractAddress;
|
|
143
|
-
private
|
|
144
|
+
private paymentTokenAddress;
|
|
144
145
|
private customRpcClient;
|
|
145
146
|
constructor(walletPrivateKey: Address, sessionEntityKeyId: number, agentWalletAddress: Address, config?: AcpContractConfig, customRpcUrl?: string | undefined);
|
|
146
147
|
static build(walletPrivateKey: Address, sessionEntityKeyId: number, agentWalletAddress: Address, customRpcUrl?: string, config?: AcpContractConfig): Promise<AcpContractClient>;
|
|
@@ -415,11 +416,11 @@ declare class AcpContractClient {
|
|
|
415
416
|
[x: `bool[${string}]`]: undefined;
|
|
416
417
|
[x: `bytes4[${string}]`]: undefined;
|
|
417
418
|
[x: `bytes[${string}]`]: undefined;
|
|
419
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
418
420
|
[x: `bytes2[${string}]`]: undefined;
|
|
419
421
|
[x: `bytes1[${string}]`]: undefined;
|
|
420
422
|
[x: `bytes3[${string}]`]: undefined;
|
|
421
423
|
[x: `bytes5[${string}]`]: undefined;
|
|
422
|
-
[x: `bytes6[${string}]`]: undefined;
|
|
423
424
|
[x: `bytes7[${string}]`]: undefined;
|
|
424
425
|
[x: `bytes8[${string}]`]: undefined;
|
|
425
426
|
[x: `bytes9[${string}]`]: undefined;
|
|
@@ -517,11 +518,11 @@ declare class AcpContractClient {
|
|
|
517
518
|
bool?: undefined;
|
|
518
519
|
bytes4?: undefined;
|
|
519
520
|
bytes?: undefined;
|
|
521
|
+
bytes6?: undefined;
|
|
520
522
|
bytes2?: undefined;
|
|
521
523
|
bytes1?: undefined;
|
|
522
524
|
bytes3?: undefined;
|
|
523
525
|
bytes5?: undefined;
|
|
524
|
-
bytes6?: undefined;
|
|
525
526
|
bytes7?: undefined;
|
|
526
527
|
bytes8?: undefined;
|
|
527
528
|
bytes9?: undefined;
|
|
@@ -7725,11 +7726,11 @@ declare class AcpContractClient {
|
|
|
7725
7726
|
[x: `bool[${string}]`]: undefined;
|
|
7726
7727
|
[x: `bytes4[${string}]`]: undefined;
|
|
7727
7728
|
[x: `bytes[${string}]`]: undefined;
|
|
7729
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
7728
7730
|
[x: `bytes2[${string}]`]: undefined;
|
|
7729
7731
|
[x: `bytes1[${string}]`]: undefined;
|
|
7730
7732
|
[x: `bytes3[${string}]`]: undefined;
|
|
7731
7733
|
[x: `bytes5[${string}]`]: undefined;
|
|
7732
|
-
[x: `bytes6[${string}]`]: undefined;
|
|
7733
7734
|
[x: `bytes7[${string}]`]: undefined;
|
|
7734
7735
|
[x: `bytes8[${string}]`]: undefined;
|
|
7735
7736
|
[x: `bytes9[${string}]`]: undefined;
|
|
@@ -7827,11 +7828,11 @@ declare class AcpContractClient {
|
|
|
7827
7828
|
bool?: undefined;
|
|
7828
7829
|
bytes4?: undefined;
|
|
7829
7830
|
bytes?: undefined;
|
|
7831
|
+
bytes6?: undefined;
|
|
7830
7832
|
bytes2?: undefined;
|
|
7831
7833
|
bytes1?: undefined;
|
|
7832
7834
|
bytes3?: undefined;
|
|
7833
7835
|
bytes5?: undefined;
|
|
7834
|
-
bytes6?: undefined;
|
|
7835
7836
|
bytes7?: undefined;
|
|
7836
7837
|
bytes8?: undefined;
|
|
7837
7838
|
bytes9?: undefined;
|
|
@@ -8176,11 +8177,11 @@ declare class AcpContractClient {
|
|
|
8176
8177
|
[x: `bool[${string}]`]: undefined;
|
|
8177
8178
|
[x: `bytes4[${string}]`]: undefined;
|
|
8178
8179
|
[x: `bytes[${string}]`]: undefined;
|
|
8180
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
8179
8181
|
[x: `bytes2[${string}]`]: undefined;
|
|
8180
8182
|
[x: `bytes1[${string}]`]: undefined;
|
|
8181
8183
|
[x: `bytes3[${string}]`]: undefined;
|
|
8182
8184
|
[x: `bytes5[${string}]`]: undefined;
|
|
8183
|
-
[x: `bytes6[${string}]`]: undefined;
|
|
8184
8185
|
[x: `bytes7[${string}]`]: undefined;
|
|
8185
8186
|
[x: `bytes8[${string}]`]: undefined;
|
|
8186
8187
|
[x: `bytes9[${string}]`]: undefined;
|
|
@@ -8278,11 +8279,11 @@ declare class AcpContractClient {
|
|
|
8278
8279
|
bool?: undefined;
|
|
8279
8280
|
bytes4?: undefined;
|
|
8280
8281
|
bytes?: undefined;
|
|
8282
|
+
bytes6?: undefined;
|
|
8281
8283
|
bytes2?: undefined;
|
|
8282
8284
|
bytes1?: undefined;
|
|
8283
8285
|
bytes3?: undefined;
|
|
8284
8286
|
bytes5?: undefined;
|
|
8285
|
-
bytes6?: undefined;
|
|
8286
8287
|
bytes7?: undefined;
|
|
8287
8288
|
bytes8?: undefined;
|
|
8288
8289
|
bytes9?: undefined;
|
|
@@ -8380,16 +8381,18 @@ declare class AcpContractClient {
|
|
|
8380
8381
|
private calculateGasFees;
|
|
8381
8382
|
private handleSendUserOperation;
|
|
8382
8383
|
private getJobId;
|
|
8384
|
+
private formatAmount;
|
|
8383
8385
|
createJob(providerAddress: string, evaluatorAddress: string, expireAt: Date): Promise<{
|
|
8384
8386
|
txHash: string;
|
|
8385
8387
|
jobId: number;
|
|
8386
8388
|
}>;
|
|
8387
|
-
approveAllowance(
|
|
8388
|
-
createPayableMemo(jobId: number, content: string, amount:
|
|
8389
|
+
approveAllowance(amount: number, paymentTokenAddress?: Address): Promise<`0x${string}`>;
|
|
8390
|
+
createPayableMemo(jobId: number, content: string, amount: number, recipient: Address, feeAmount: number, feeType: FeeType, nextPhase: AcpJobPhases, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, expiredAt: Date, token?: Address): Promise<`0x${string}`>;
|
|
8389
8391
|
createMemo(jobId: number, content: string, type: MemoType, isSecured: boolean, nextPhase: AcpJobPhases): Promise<Address>;
|
|
8390
8392
|
getMemoId(hash: Address): Promise<number>;
|
|
8391
8393
|
signMemo(memoId: number, isApproved: boolean, reason?: string): Promise<`0x${string}`>;
|
|
8392
|
-
setBudget(jobId: number, budget:
|
|
8394
|
+
setBudget(jobId: number, budget: number): Promise<`0x${string}`>;
|
|
8395
|
+
setBudgetWithPaymentToken(jobId: number, budget: number, paymentTokenAddress?: Address): Promise<`0x${string}`>;
|
|
8393
8396
|
}
|
|
8394
8397
|
|
|
8395
8398
|
declare class AcpMemo {
|
|
@@ -8401,8 +8404,9 @@ declare class AcpMemo {
|
|
|
8401
8404
|
status: AcpMemoStatus;
|
|
8402
8405
|
signedReason?: string | undefined;
|
|
8403
8406
|
expiry?: Date | undefined;
|
|
8407
|
+
payableDetails?: PayableDetails | undefined;
|
|
8404
8408
|
structuredContent: GenericPayload | undefined;
|
|
8405
|
-
constructor(acpClient: AcpClient, id: number, type: MemoType, content: string, nextPhase: AcpJobPhases, status: AcpMemoStatus, signedReason?: string | undefined, expiry?: Date | undefined);
|
|
8409
|
+
constructor(acpClient: AcpClient, id: number, type: MemoType, content: string, nextPhase: AcpJobPhases, status: AcpMemoStatus, signedReason?: string | undefined, expiry?: Date | undefined, payableDetails?: PayableDetails | undefined);
|
|
8406
8410
|
get payloadType(): PayloadType | undefined;
|
|
8407
8411
|
getStructuredContent<T>(): GenericPayload<T> | undefined;
|
|
8408
8412
|
create(jobId: number, isSecured?: boolean): Promise<`0x${string}`>;
|
|
@@ -8418,6 +8422,12 @@ declare enum AcpMemoStatus {
|
|
|
8418
8422
|
APPROVED = "APPROVED",
|
|
8419
8423
|
REJECTED = "REJECTED"
|
|
8420
8424
|
}
|
|
8425
|
+
interface PayableDetails {
|
|
8426
|
+
amount: string;
|
|
8427
|
+
token: Address$1;
|
|
8428
|
+
recipient: Address$1;
|
|
8429
|
+
feeAmount: string;
|
|
8430
|
+
}
|
|
8421
8431
|
declare enum AcpAgentSort {
|
|
8422
8432
|
SUCCESSFUL_JOB_COUNT = "successfulJobCount",
|
|
8423
8433
|
SUCCESS_RATE = "successRate",
|
|
@@ -8456,6 +8466,7 @@ type AcpAgent = {
|
|
|
8456
8466
|
offerings: {
|
|
8457
8467
|
name: string;
|
|
8458
8468
|
price: number;
|
|
8469
|
+
priceUsd: number;
|
|
8459
8470
|
requirementSchema?: Object;
|
|
8460
8471
|
deliverableSchema?: Object;
|
|
8461
8472
|
}[];
|
|
@@ -8531,11 +8542,13 @@ declare class AcpJob {
|
|
|
8531
8542
|
providerAddress: Address$1;
|
|
8532
8543
|
evaluatorAddress: Address$1;
|
|
8533
8544
|
price: number;
|
|
8545
|
+
priceTokenAddress: Address$1;
|
|
8534
8546
|
memos: AcpMemo[];
|
|
8535
8547
|
phase: AcpJobPhases;
|
|
8536
8548
|
context: Record<string, any>;
|
|
8537
|
-
constructor(acpClient: AcpClient, id: number, clientAddress: Address$1, providerAddress: Address$1, evaluatorAddress: Address$1, price: number, memos: AcpMemo[], phase: AcpJobPhases, context: Record<string, any>);
|
|
8538
|
-
get serviceRequirement(): string | undefined;
|
|
8549
|
+
constructor(acpClient: AcpClient, id: number, clientAddress: Address$1, providerAddress: Address$1, evaluatorAddress: Address$1, price: number, priceTokenAddress: Address$1, memos: AcpMemo[], phase: AcpJobPhases, context: Record<string, any>);
|
|
8550
|
+
get serviceRequirement(): Record<string, any> | string | undefined;
|
|
8551
|
+
get serviceName(): string | undefined;
|
|
8539
8552
|
get deliverable(): string | undefined;
|
|
8540
8553
|
get providerAgent(): Promise<AcpAgent | undefined>;
|
|
8541
8554
|
get clientAgent(): Promise<AcpAgent | undefined>;
|
package/dist/index.d.ts
CHANGED
|
@@ -95,7 +95,8 @@ declare const ACP_ABI: ({
|
|
|
95
95
|
type AcpContractConfig = {
|
|
96
96
|
chain: typeof baseSepolia | typeof base;
|
|
97
97
|
contractAddress: Address;
|
|
98
|
-
|
|
98
|
+
paymentTokenAddress: Address;
|
|
99
|
+
paymentTokenDecimals: number;
|
|
99
100
|
acpUrl: string;
|
|
100
101
|
alchemyRpcUrl: string;
|
|
101
102
|
priorityFeeMultiplier: number;
|
|
@@ -140,7 +141,7 @@ declare class AcpContractClient {
|
|
|
140
141
|
private _sessionKeyClient;
|
|
141
142
|
private chain;
|
|
142
143
|
private contractAddress;
|
|
143
|
-
private
|
|
144
|
+
private paymentTokenAddress;
|
|
144
145
|
private customRpcClient;
|
|
145
146
|
constructor(walletPrivateKey: Address, sessionEntityKeyId: number, agentWalletAddress: Address, config?: AcpContractConfig, customRpcUrl?: string | undefined);
|
|
146
147
|
static build(walletPrivateKey: Address, sessionEntityKeyId: number, agentWalletAddress: Address, customRpcUrl?: string, config?: AcpContractConfig): Promise<AcpContractClient>;
|
|
@@ -415,11 +416,11 @@ declare class AcpContractClient {
|
|
|
415
416
|
[x: `bool[${string}]`]: undefined;
|
|
416
417
|
[x: `bytes4[${string}]`]: undefined;
|
|
417
418
|
[x: `bytes[${string}]`]: undefined;
|
|
419
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
418
420
|
[x: `bytes2[${string}]`]: undefined;
|
|
419
421
|
[x: `bytes1[${string}]`]: undefined;
|
|
420
422
|
[x: `bytes3[${string}]`]: undefined;
|
|
421
423
|
[x: `bytes5[${string}]`]: undefined;
|
|
422
|
-
[x: `bytes6[${string}]`]: undefined;
|
|
423
424
|
[x: `bytes7[${string}]`]: undefined;
|
|
424
425
|
[x: `bytes8[${string}]`]: undefined;
|
|
425
426
|
[x: `bytes9[${string}]`]: undefined;
|
|
@@ -517,11 +518,11 @@ declare class AcpContractClient {
|
|
|
517
518
|
bool?: undefined;
|
|
518
519
|
bytes4?: undefined;
|
|
519
520
|
bytes?: undefined;
|
|
521
|
+
bytes6?: undefined;
|
|
520
522
|
bytes2?: undefined;
|
|
521
523
|
bytes1?: undefined;
|
|
522
524
|
bytes3?: undefined;
|
|
523
525
|
bytes5?: undefined;
|
|
524
|
-
bytes6?: undefined;
|
|
525
526
|
bytes7?: undefined;
|
|
526
527
|
bytes8?: undefined;
|
|
527
528
|
bytes9?: undefined;
|
|
@@ -7725,11 +7726,11 @@ declare class AcpContractClient {
|
|
|
7725
7726
|
[x: `bool[${string}]`]: undefined;
|
|
7726
7727
|
[x: `bytes4[${string}]`]: undefined;
|
|
7727
7728
|
[x: `bytes[${string}]`]: undefined;
|
|
7729
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
7728
7730
|
[x: `bytes2[${string}]`]: undefined;
|
|
7729
7731
|
[x: `bytes1[${string}]`]: undefined;
|
|
7730
7732
|
[x: `bytes3[${string}]`]: undefined;
|
|
7731
7733
|
[x: `bytes5[${string}]`]: undefined;
|
|
7732
|
-
[x: `bytes6[${string}]`]: undefined;
|
|
7733
7734
|
[x: `bytes7[${string}]`]: undefined;
|
|
7734
7735
|
[x: `bytes8[${string}]`]: undefined;
|
|
7735
7736
|
[x: `bytes9[${string}]`]: undefined;
|
|
@@ -7827,11 +7828,11 @@ declare class AcpContractClient {
|
|
|
7827
7828
|
bool?: undefined;
|
|
7828
7829
|
bytes4?: undefined;
|
|
7829
7830
|
bytes?: undefined;
|
|
7831
|
+
bytes6?: undefined;
|
|
7830
7832
|
bytes2?: undefined;
|
|
7831
7833
|
bytes1?: undefined;
|
|
7832
7834
|
bytes3?: undefined;
|
|
7833
7835
|
bytes5?: undefined;
|
|
7834
|
-
bytes6?: undefined;
|
|
7835
7836
|
bytes7?: undefined;
|
|
7836
7837
|
bytes8?: undefined;
|
|
7837
7838
|
bytes9?: undefined;
|
|
@@ -8176,11 +8177,11 @@ declare class AcpContractClient {
|
|
|
8176
8177
|
[x: `bool[${string}]`]: undefined;
|
|
8177
8178
|
[x: `bytes4[${string}]`]: undefined;
|
|
8178
8179
|
[x: `bytes[${string}]`]: undefined;
|
|
8180
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
8179
8181
|
[x: `bytes2[${string}]`]: undefined;
|
|
8180
8182
|
[x: `bytes1[${string}]`]: undefined;
|
|
8181
8183
|
[x: `bytes3[${string}]`]: undefined;
|
|
8182
8184
|
[x: `bytes5[${string}]`]: undefined;
|
|
8183
|
-
[x: `bytes6[${string}]`]: undefined;
|
|
8184
8185
|
[x: `bytes7[${string}]`]: undefined;
|
|
8185
8186
|
[x: `bytes8[${string}]`]: undefined;
|
|
8186
8187
|
[x: `bytes9[${string}]`]: undefined;
|
|
@@ -8278,11 +8279,11 @@ declare class AcpContractClient {
|
|
|
8278
8279
|
bool?: undefined;
|
|
8279
8280
|
bytes4?: undefined;
|
|
8280
8281
|
bytes?: undefined;
|
|
8282
|
+
bytes6?: undefined;
|
|
8281
8283
|
bytes2?: undefined;
|
|
8282
8284
|
bytes1?: undefined;
|
|
8283
8285
|
bytes3?: undefined;
|
|
8284
8286
|
bytes5?: undefined;
|
|
8285
|
-
bytes6?: undefined;
|
|
8286
8287
|
bytes7?: undefined;
|
|
8287
8288
|
bytes8?: undefined;
|
|
8288
8289
|
bytes9?: undefined;
|
|
@@ -8380,16 +8381,18 @@ declare class AcpContractClient {
|
|
|
8380
8381
|
private calculateGasFees;
|
|
8381
8382
|
private handleSendUserOperation;
|
|
8382
8383
|
private getJobId;
|
|
8384
|
+
private formatAmount;
|
|
8383
8385
|
createJob(providerAddress: string, evaluatorAddress: string, expireAt: Date): Promise<{
|
|
8384
8386
|
txHash: string;
|
|
8385
8387
|
jobId: number;
|
|
8386
8388
|
}>;
|
|
8387
|
-
approveAllowance(
|
|
8388
|
-
createPayableMemo(jobId: number, content: string, amount:
|
|
8389
|
+
approveAllowance(amount: number, paymentTokenAddress?: Address): Promise<`0x${string}`>;
|
|
8390
|
+
createPayableMemo(jobId: number, content: string, amount: number, recipient: Address, feeAmount: number, feeType: FeeType, nextPhase: AcpJobPhases, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, expiredAt: Date, token?: Address): Promise<`0x${string}`>;
|
|
8389
8391
|
createMemo(jobId: number, content: string, type: MemoType, isSecured: boolean, nextPhase: AcpJobPhases): Promise<Address>;
|
|
8390
8392
|
getMemoId(hash: Address): Promise<number>;
|
|
8391
8393
|
signMemo(memoId: number, isApproved: boolean, reason?: string): Promise<`0x${string}`>;
|
|
8392
|
-
setBudget(jobId: number, budget:
|
|
8394
|
+
setBudget(jobId: number, budget: number): Promise<`0x${string}`>;
|
|
8395
|
+
setBudgetWithPaymentToken(jobId: number, budget: number, paymentTokenAddress?: Address): Promise<`0x${string}`>;
|
|
8393
8396
|
}
|
|
8394
8397
|
|
|
8395
8398
|
declare class AcpMemo {
|
|
@@ -8401,8 +8404,9 @@ declare class AcpMemo {
|
|
|
8401
8404
|
status: AcpMemoStatus;
|
|
8402
8405
|
signedReason?: string | undefined;
|
|
8403
8406
|
expiry?: Date | undefined;
|
|
8407
|
+
payableDetails?: PayableDetails | undefined;
|
|
8404
8408
|
structuredContent: GenericPayload | undefined;
|
|
8405
|
-
constructor(acpClient: AcpClient, id: number, type: MemoType, content: string, nextPhase: AcpJobPhases, status: AcpMemoStatus, signedReason?: string | undefined, expiry?: Date | undefined);
|
|
8409
|
+
constructor(acpClient: AcpClient, id: number, type: MemoType, content: string, nextPhase: AcpJobPhases, status: AcpMemoStatus, signedReason?: string | undefined, expiry?: Date | undefined, payableDetails?: PayableDetails | undefined);
|
|
8406
8410
|
get payloadType(): PayloadType | undefined;
|
|
8407
8411
|
getStructuredContent<T>(): GenericPayload<T> | undefined;
|
|
8408
8412
|
create(jobId: number, isSecured?: boolean): Promise<`0x${string}`>;
|
|
@@ -8418,6 +8422,12 @@ declare enum AcpMemoStatus {
|
|
|
8418
8422
|
APPROVED = "APPROVED",
|
|
8419
8423
|
REJECTED = "REJECTED"
|
|
8420
8424
|
}
|
|
8425
|
+
interface PayableDetails {
|
|
8426
|
+
amount: string;
|
|
8427
|
+
token: Address$1;
|
|
8428
|
+
recipient: Address$1;
|
|
8429
|
+
feeAmount: string;
|
|
8430
|
+
}
|
|
8421
8431
|
declare enum AcpAgentSort {
|
|
8422
8432
|
SUCCESSFUL_JOB_COUNT = "successfulJobCount",
|
|
8423
8433
|
SUCCESS_RATE = "successRate",
|
|
@@ -8456,6 +8466,7 @@ type AcpAgent = {
|
|
|
8456
8466
|
offerings: {
|
|
8457
8467
|
name: string;
|
|
8458
8468
|
price: number;
|
|
8469
|
+
priceUsd: number;
|
|
8459
8470
|
requirementSchema?: Object;
|
|
8460
8471
|
deliverableSchema?: Object;
|
|
8461
8472
|
}[];
|
|
@@ -8531,11 +8542,13 @@ declare class AcpJob {
|
|
|
8531
8542
|
providerAddress: Address$1;
|
|
8532
8543
|
evaluatorAddress: Address$1;
|
|
8533
8544
|
price: number;
|
|
8545
|
+
priceTokenAddress: Address$1;
|
|
8534
8546
|
memos: AcpMemo[];
|
|
8535
8547
|
phase: AcpJobPhases;
|
|
8536
8548
|
context: Record<string, any>;
|
|
8537
|
-
constructor(acpClient: AcpClient, id: number, clientAddress: Address$1, providerAddress: Address$1, evaluatorAddress: Address$1, price: number, memos: AcpMemo[], phase: AcpJobPhases, context: Record<string, any>);
|
|
8538
|
-
get serviceRequirement(): string | undefined;
|
|
8549
|
+
constructor(acpClient: AcpClient, id: number, clientAddress: Address$1, providerAddress: Address$1, evaluatorAddress: Address$1, price: number, priceTokenAddress: Address$1, memos: AcpMemo[], phase: AcpJobPhases, context: Record<string, any>);
|
|
8550
|
+
get serviceRequirement(): Record<string, any> | string | undefined;
|
|
8551
|
+
get serviceName(): string | undefined;
|
|
8539
8552
|
get deliverable(): string | undefined;
|
|
8540
8553
|
get providerAgent(): Promise<AcpAgent | undefined>;
|
|
8541
8554
|
get clientAgent(): Promise<AcpAgent | undefined>;
|