@virtuals-protocol/acp-node 0.3.0-beta.2 → 0.3.0-beta.3
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -11
- package/dist/index.mjs +7 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -450,7 +450,7 @@ declare class AcpJob {
|
|
|
450
450
|
createPayableRequirement(content: string, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, amount: FareAmountBase, recipient: Address, expiredAt?: Date): Promise<`0x${string}`>;
|
|
451
451
|
payAndAcceptRequirement(reason?: string): Promise<`0x${string}`>;
|
|
452
452
|
respond(accept: boolean, reason?: string): Promise<`0x${string}`>;
|
|
453
|
-
accept(reason?: string): Promise
|
|
453
|
+
accept(reason?: string): Promise<void>;
|
|
454
454
|
reject(reason?: string): Promise<`0x${string}`>;
|
|
455
455
|
deliver(deliverable: DeliverablePayload): Promise<`0x${string}`>;
|
|
456
456
|
deliverPayable(deliverable: DeliverablePayload, amount: FareAmountBase, expiredAt?: Date): Promise<`0x${string}`>;
|
package/dist/index.d.ts
CHANGED
|
@@ -450,7 +450,7 @@ declare class AcpJob {
|
|
|
450
450
|
createPayableRequirement(content: string, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, amount: FareAmountBase, recipient: Address, expiredAt?: Date): Promise<`0x${string}`>;
|
|
451
451
|
payAndAcceptRequirement(reason?: string): Promise<`0x${string}`>;
|
|
452
452
|
respond(accept: boolean, reason?: string): Promise<`0x${string}`>;
|
|
453
|
-
accept(reason?: string): Promise
|
|
453
|
+
accept(reason?: string): Promise<void>;
|
|
454
454
|
reject(reason?: string): Promise<`0x${string}`>;
|
|
455
455
|
deliver(deliverable: DeliverablePayload): Promise<`0x${string}`>;
|
|
456
456
|
deliverPayable(deliverable: DeliverablePayload, amount: FareAmountBase, expiredAt?: Date): Promise<`0x${string}`>;
|
package/dist/index.js
CHANGED
|
@@ -55,7 +55,7 @@ var require_package = __commonJS({
|
|
|
55
55
|
"package.json"(exports2, module2) {
|
|
56
56
|
module2.exports = {
|
|
57
57
|
name: "@virtuals-protocol/acp-node",
|
|
58
|
-
version: "0.3.0-beta.
|
|
58
|
+
version: "0.3.0-beta.3",
|
|
59
59
|
main: "./dist/index.js",
|
|
60
60
|
module: "./dist/index.mjs",
|
|
61
61
|
types: "./dist/index.d.ts",
|
|
@@ -3430,27 +3430,23 @@ var AcpJob = class {
|
|
|
3430
3430
|
}
|
|
3431
3431
|
respond(accept, reason) {
|
|
3432
3432
|
return __async(this, null, function* () {
|
|
3433
|
+
const memoContent = `${reason || `Job ${this.id} ${accept ? "accepted" : "rejected"}.`}`;
|
|
3433
3434
|
if (accept) {
|
|
3434
|
-
|
|
3435
|
+
yield this.accept(memoContent);
|
|
3436
|
+
return this.createRequirement(memoContent);
|
|
3435
3437
|
}
|
|
3436
|
-
return yield this.reject(
|
|
3438
|
+
return yield this.reject(memoContent);
|
|
3437
3439
|
});
|
|
3438
3440
|
}
|
|
3439
3441
|
accept(reason) {
|
|
3440
3442
|
return __async(this, null, function* () {
|
|
3441
3443
|
var _a;
|
|
3444
|
+
const memoContent = `Job ${this.id} accepted. ${reason || ""}`;
|
|
3442
3445
|
if (((_a = this.latestMemo) == null ? void 0 : _a.nextPhase) !== 1 /* NEGOTIATION */) {
|
|
3443
3446
|
throw new acpError_default("No negotiation memo found");
|
|
3444
3447
|
}
|
|
3445
3448
|
const memo = this.latestMemo;
|
|
3446
|
-
yield memo.sign(true,
|
|
3447
|
-
return yield this.acpContractClient.createMemo(
|
|
3448
|
-
this.id,
|
|
3449
|
-
`Job ${this.id} accepted. ${reason != null ? reason : ""}`,
|
|
3450
|
-
0 /* MESSAGE */,
|
|
3451
|
-
true,
|
|
3452
|
-
2 /* TRANSACTION */
|
|
3453
|
-
);
|
|
3449
|
+
yield memo.sign(true, memoContent);
|
|
3454
3450
|
});
|
|
3455
3451
|
}
|
|
3456
3452
|
reject(reason) {
|
package/dist/index.mjs
CHANGED
|
@@ -28,7 +28,7 @@ var require_package = __commonJS({
|
|
|
28
28
|
"package.json"(exports, module) {
|
|
29
29
|
module.exports = {
|
|
30
30
|
name: "@virtuals-protocol/acp-node",
|
|
31
|
-
version: "0.3.0-beta.
|
|
31
|
+
version: "0.3.0-beta.3",
|
|
32
32
|
main: "./dist/index.js",
|
|
33
33
|
module: "./dist/index.mjs",
|
|
34
34
|
types: "./dist/index.d.ts",
|
|
@@ -3382,27 +3382,23 @@ var AcpJob = class {
|
|
|
3382
3382
|
}
|
|
3383
3383
|
respond(accept, reason) {
|
|
3384
3384
|
return __async(this, null, function* () {
|
|
3385
|
+
const memoContent = `${reason || `Job ${this.id} ${accept ? "accepted" : "rejected"}.`}`;
|
|
3385
3386
|
if (accept) {
|
|
3386
|
-
|
|
3387
|
+
yield this.accept(memoContent);
|
|
3388
|
+
return this.createRequirement(memoContent);
|
|
3387
3389
|
}
|
|
3388
|
-
return yield this.reject(
|
|
3390
|
+
return yield this.reject(memoContent);
|
|
3389
3391
|
});
|
|
3390
3392
|
}
|
|
3391
3393
|
accept(reason) {
|
|
3392
3394
|
return __async(this, null, function* () {
|
|
3393
3395
|
var _a;
|
|
3396
|
+
const memoContent = `Job ${this.id} accepted. ${reason || ""}`;
|
|
3394
3397
|
if (((_a = this.latestMemo) == null ? void 0 : _a.nextPhase) !== 1 /* NEGOTIATION */) {
|
|
3395
3398
|
throw new acpError_default("No negotiation memo found");
|
|
3396
3399
|
}
|
|
3397
3400
|
const memo = this.latestMemo;
|
|
3398
|
-
yield memo.sign(true,
|
|
3399
|
-
return yield this.acpContractClient.createMemo(
|
|
3400
|
-
this.id,
|
|
3401
|
-
`Job ${this.id} accepted. ${reason != null ? reason : ""}`,
|
|
3402
|
-
0 /* MESSAGE */,
|
|
3403
|
-
true,
|
|
3404
|
-
2 /* TRANSACTION */
|
|
3405
|
-
);
|
|
3401
|
+
yield memo.sign(true, memoContent);
|
|
3406
3402
|
});
|
|
3407
3403
|
}
|
|
3408
3404
|
reject(reason) {
|