@virtuals-protocol/acp-node 0.3.0-beta.18 → 0.3.0-beta.19
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 +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.js +1347 -210
- package/dist/index.mjs +1347 -219
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -277,7 +277,7 @@ declare class AcpJob {
|
|
|
277
277
|
userOpHash: Address;
|
|
278
278
|
txnHash: Address;
|
|
279
279
|
}>;
|
|
280
|
-
createPayableRequirement(content: string, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, amount: FareAmountBase, recipient: Address, expiredAt?: Date): Promise<{
|
|
280
|
+
createPayableRequirement(content: string, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW | MemoType.PAYABLE_TRANSFER, amount: FareAmountBase, recipient: Address, expiredAt?: Date): Promise<{
|
|
281
281
|
userOpHash: Address;
|
|
282
282
|
txnHash: Address;
|
|
283
283
|
}>;
|
|
@@ -319,7 +319,7 @@ declare class AcpJob {
|
|
|
319
319
|
txnHash: Address;
|
|
320
320
|
}>;
|
|
321
321
|
private performX402Payment;
|
|
322
|
-
|
|
322
|
+
deliverCrossChainPayable(recipient: Address, amount: FareAmountBase, isRequest?: boolean): Promise<void>;
|
|
323
323
|
[util.inspect.custom](): {
|
|
324
324
|
id: number;
|
|
325
325
|
clientAddress: `0x${string}`;
|
|
@@ -346,12 +346,12 @@ declare enum AcpMemoStatus {
|
|
|
346
346
|
REJECTED = "REJECTED"
|
|
347
347
|
}
|
|
348
348
|
declare enum AcpMemoState {
|
|
349
|
-
NONE =
|
|
350
|
-
PENDING =
|
|
351
|
-
IN_PROGRESS =
|
|
352
|
-
READY =
|
|
353
|
-
COMPLETED =
|
|
354
|
-
REJECTED =
|
|
349
|
+
NONE = 0,
|
|
350
|
+
PENDING = 1,
|
|
351
|
+
IN_PROGRESS = 2,
|
|
352
|
+
READY = 3,
|
|
353
|
+
COMPLETED = 4,
|
|
354
|
+
REJECTED = 5
|
|
355
355
|
}
|
|
356
356
|
interface PayableDetails {
|
|
357
357
|
amount: bigint;
|
|
@@ -584,6 +584,7 @@ declare class AcpContractConfig {
|
|
|
584
584
|
}
|
|
585
585
|
declare const baseSepoliaAcpConfig: AcpContractConfig;
|
|
586
586
|
declare const baseSepoliaAcpConfigV2: AcpContractConfig;
|
|
587
|
+
declare const baseSepoliaAcpX402ConfigV2: AcpContractConfig;
|
|
587
588
|
declare const baseAcpConfig: AcpContractConfig;
|
|
588
589
|
declare const baseAcpX402Config: AcpContractConfig;
|
|
589
590
|
declare const baseAcpConfigV2: AcpContractConfig;
|
|
@@ -600,8 +601,7 @@ declare enum MemoType {
|
|
|
600
601
|
PAYABLE_TRANSFER = 7,// 7 - Direct payment transfer
|
|
601
602
|
PAYABLE_TRANSFER_ESCROW = 8,// 8 - Escrowed payment transfer
|
|
602
603
|
NOTIFICATION = 9,// 9 - Notification
|
|
603
|
-
PAYABLE_NOTIFICATION = 10
|
|
604
|
-
TRANSFER_EVENT = 11
|
|
604
|
+
PAYABLE_NOTIFICATION = 10
|
|
605
605
|
}
|
|
606
606
|
declare enum AcpJobPhases {
|
|
607
607
|
REQUEST = 0,
|
|
@@ -659,6 +659,7 @@ declare abstract class BaseAcpContractClient {
|
|
|
659
659
|
getERC20Balance(chainId: number, tokenAddress: Address, walletAddress: Address): Promise<bigint>;
|
|
660
660
|
getERC20Allowance(chainId: number, tokenAddress: Address, walletAddress: Address, spenderAddress: Address): Promise<bigint>;
|
|
661
661
|
getERC20Symbol(chainId: number, tokenAddress: Address): Promise<string>;
|
|
662
|
+
abstract getAssetManager(): Promise<Address>;
|
|
662
663
|
abstract getAcpVersion(): string;
|
|
663
664
|
}
|
|
664
665
|
|
|
@@ -9004,6 +9005,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
9004
9005
|
updateJobX402Nonce(jobId: number, nonce: string): Promise<OffChainJob>;
|
|
9005
9006
|
generateX402Payment(payableRequest: X402PayableRequest, requirements: X402PayableRequirements): Promise<X402Payment>;
|
|
9006
9007
|
performX402Request(url: string, version: string, budget?: string, signature?: string): Promise<X402PaymentResponse>;
|
|
9008
|
+
getAssetManager(): Promise<Address$1>;
|
|
9007
9009
|
getAcpVersion(): string;
|
|
9008
9010
|
}
|
|
9009
9011
|
|
|
@@ -17286,7 +17288,8 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
17286
17288
|
generateX402Payment(payableRequest: X402PayableRequest, requirements: X402PayableRequirements): Promise<X402Payment>;
|
|
17287
17289
|
performX402Request(url: string, version: string, budget?: string, signature?: string): Promise<X402PaymentResponse>;
|
|
17288
17290
|
getX402PaymentDetails(jobId: number): Promise<IAcpJobX402PaymentDetails>;
|
|
17291
|
+
getAssetManager(): Promise<Address$1>;
|
|
17289
17292
|
getAcpVersion(): string;
|
|
17290
17293
|
}
|
|
17291
17294
|
|
|
17292
|
-
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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -277,7 +277,7 @@ declare class AcpJob {
|
|
|
277
277
|
userOpHash: Address;
|
|
278
278
|
txnHash: Address;
|
|
279
279
|
}>;
|
|
280
|
-
createPayableRequirement(content: string, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW, amount: FareAmountBase, recipient: Address, expiredAt?: Date): Promise<{
|
|
280
|
+
createPayableRequirement(content: string, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER_ESCROW | MemoType.PAYABLE_TRANSFER, amount: FareAmountBase, recipient: Address, expiredAt?: Date): Promise<{
|
|
281
281
|
userOpHash: Address;
|
|
282
282
|
txnHash: Address;
|
|
283
283
|
}>;
|
|
@@ -319,7 +319,7 @@ declare class AcpJob {
|
|
|
319
319
|
txnHash: Address;
|
|
320
320
|
}>;
|
|
321
321
|
private performX402Payment;
|
|
322
|
-
|
|
322
|
+
deliverCrossChainPayable(recipient: Address, amount: FareAmountBase, isRequest?: boolean): Promise<void>;
|
|
323
323
|
[util.inspect.custom](): {
|
|
324
324
|
id: number;
|
|
325
325
|
clientAddress: `0x${string}`;
|
|
@@ -346,12 +346,12 @@ declare enum AcpMemoStatus {
|
|
|
346
346
|
REJECTED = "REJECTED"
|
|
347
347
|
}
|
|
348
348
|
declare enum AcpMemoState {
|
|
349
|
-
NONE =
|
|
350
|
-
PENDING =
|
|
351
|
-
IN_PROGRESS =
|
|
352
|
-
READY =
|
|
353
|
-
COMPLETED =
|
|
354
|
-
REJECTED =
|
|
349
|
+
NONE = 0,
|
|
350
|
+
PENDING = 1,
|
|
351
|
+
IN_PROGRESS = 2,
|
|
352
|
+
READY = 3,
|
|
353
|
+
COMPLETED = 4,
|
|
354
|
+
REJECTED = 5
|
|
355
355
|
}
|
|
356
356
|
interface PayableDetails {
|
|
357
357
|
amount: bigint;
|
|
@@ -584,6 +584,7 @@ declare class AcpContractConfig {
|
|
|
584
584
|
}
|
|
585
585
|
declare const baseSepoliaAcpConfig: AcpContractConfig;
|
|
586
586
|
declare const baseSepoliaAcpConfigV2: AcpContractConfig;
|
|
587
|
+
declare const baseSepoliaAcpX402ConfigV2: AcpContractConfig;
|
|
587
588
|
declare const baseAcpConfig: AcpContractConfig;
|
|
588
589
|
declare const baseAcpX402Config: AcpContractConfig;
|
|
589
590
|
declare const baseAcpConfigV2: AcpContractConfig;
|
|
@@ -600,8 +601,7 @@ declare enum MemoType {
|
|
|
600
601
|
PAYABLE_TRANSFER = 7,// 7 - Direct payment transfer
|
|
601
602
|
PAYABLE_TRANSFER_ESCROW = 8,// 8 - Escrowed payment transfer
|
|
602
603
|
NOTIFICATION = 9,// 9 - Notification
|
|
603
|
-
PAYABLE_NOTIFICATION = 10
|
|
604
|
-
TRANSFER_EVENT = 11
|
|
604
|
+
PAYABLE_NOTIFICATION = 10
|
|
605
605
|
}
|
|
606
606
|
declare enum AcpJobPhases {
|
|
607
607
|
REQUEST = 0,
|
|
@@ -659,6 +659,7 @@ declare abstract class BaseAcpContractClient {
|
|
|
659
659
|
getERC20Balance(chainId: number, tokenAddress: Address, walletAddress: Address): Promise<bigint>;
|
|
660
660
|
getERC20Allowance(chainId: number, tokenAddress: Address, walletAddress: Address, spenderAddress: Address): Promise<bigint>;
|
|
661
661
|
getERC20Symbol(chainId: number, tokenAddress: Address): Promise<string>;
|
|
662
|
+
abstract getAssetManager(): Promise<Address>;
|
|
662
663
|
abstract getAcpVersion(): string;
|
|
663
664
|
}
|
|
664
665
|
|
|
@@ -9004,6 +9005,7 @@ declare class AcpContractClient extends BaseAcpContractClient {
|
|
|
9004
9005
|
updateJobX402Nonce(jobId: number, nonce: string): Promise<OffChainJob>;
|
|
9005
9006
|
generateX402Payment(payableRequest: X402PayableRequest, requirements: X402PayableRequirements): Promise<X402Payment>;
|
|
9006
9007
|
performX402Request(url: string, version: string, budget?: string, signature?: string): Promise<X402PaymentResponse>;
|
|
9008
|
+
getAssetManager(): Promise<Address$1>;
|
|
9007
9009
|
getAcpVersion(): string;
|
|
9008
9010
|
}
|
|
9009
9011
|
|
|
@@ -17286,7 +17288,8 @@ declare class AcpContractClientV2 extends BaseAcpContractClient {
|
|
|
17286
17288
|
generateX402Payment(payableRequest: X402PayableRequest, requirements: X402PayableRequirements): Promise<X402Payment>;
|
|
17287
17289
|
performX402Request(url: string, version: string, budget?: string, signature?: string): Promise<X402PaymentResponse>;
|
|
17288
17290
|
getX402PaymentDetails(jobId: number): Promise<IAcpJobX402PaymentDetails>;
|
|
17291
|
+
getAssetManager(): Promise<Address$1>;
|
|
17289
17292
|
getAcpVersion(): string;
|
|
17290
17293
|
}
|
|
17291
17294
|
|
|
17292
|
-
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, 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 };
|