@virtuals-protocol/acp-node 0.1.0-beta.9 → 0.2.0-beta.2
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 +54 -13
- package/dist/index.d.mts +280 -142
- package/dist/index.d.ts +280 -142
- package/dist/index.js +941 -113
- package/dist/index.mjs +947 -114
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,31 @@ declare const ACP_ABI: ({
|
|
|
40
40
|
type: string;
|
|
41
41
|
stateMutability?: undefined;
|
|
42
42
|
outputs?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
inputs: ({
|
|
45
|
+
internalType: string;
|
|
46
|
+
name: string;
|
|
47
|
+
type: string;
|
|
48
|
+
components?: undefined;
|
|
49
|
+
} | {
|
|
50
|
+
components: {
|
|
51
|
+
internalType: string;
|
|
52
|
+
name: string;
|
|
53
|
+
type: string;
|
|
54
|
+
}[];
|
|
55
|
+
internalType: string;
|
|
56
|
+
name: string;
|
|
57
|
+
type: string;
|
|
58
|
+
})[];
|
|
59
|
+
name: string;
|
|
60
|
+
outputs: {
|
|
61
|
+
internalType: string;
|
|
62
|
+
name: string;
|
|
63
|
+
type: string;
|
|
64
|
+
}[];
|
|
65
|
+
stateMutability: string;
|
|
66
|
+
type: string;
|
|
67
|
+
anonymous?: undefined;
|
|
43
68
|
} | {
|
|
44
69
|
inputs: {
|
|
45
70
|
internalType: string;
|
|
@@ -73,6 +98,9 @@ type AcpContractConfig = {
|
|
|
73
98
|
virtualsTokenAddress: Address;
|
|
74
99
|
acpUrl: string;
|
|
75
100
|
alchemyRpcUrl: string;
|
|
101
|
+
priorityFeeMultiplier: number;
|
|
102
|
+
maxFeePerGas: number;
|
|
103
|
+
maxPriorityFeePerGas: number;
|
|
76
104
|
};
|
|
77
105
|
declare const baseSepoliaAcpConfig: AcpContractConfig;
|
|
78
106
|
declare const baseAcpConfig: AcpContractConfig;
|
|
@@ -83,7 +111,11 @@ declare enum MemoType {
|
|
|
83
111
|
IMAGE_URL = 2,
|
|
84
112
|
VOICE_URL = 3,
|
|
85
113
|
OBJECT_URL = 4,
|
|
86
|
-
TXHASH = 5
|
|
114
|
+
TXHASH = 5,
|
|
115
|
+
PAYABLE_REQUEST = 6,
|
|
116
|
+
PAYABLE_TRANSFER = 7,
|
|
117
|
+
PAYABLE_FEE = 8,
|
|
118
|
+
PAYABLE_FEE_REQUEST = 9
|
|
87
119
|
}
|
|
88
120
|
declare enum AcpJobPhases {
|
|
89
121
|
REQUEST = 0,
|
|
@@ -91,19 +123,28 @@ declare enum AcpJobPhases {
|
|
|
91
123
|
TRANSACTION = 2,
|
|
92
124
|
EVALUATION = 3,
|
|
93
125
|
COMPLETED = 4,
|
|
94
|
-
REJECTED = 5
|
|
126
|
+
REJECTED = 5,
|
|
127
|
+
EXPIRED = 6
|
|
128
|
+
}
|
|
129
|
+
declare enum FeeType {
|
|
130
|
+
NO_FEE = 0,
|
|
131
|
+
IMMEDIATE_FEE = 1,
|
|
132
|
+
DEFERRED_FEE = 2
|
|
95
133
|
}
|
|
96
134
|
declare class AcpContractClient {
|
|
97
135
|
private walletPrivateKey;
|
|
98
136
|
private sessionEntityKeyId;
|
|
99
137
|
private agentWalletAddress;
|
|
100
138
|
config: AcpContractConfig;
|
|
139
|
+
customRpcUrl?: string | undefined;
|
|
140
|
+
private MAX_RETRIES;
|
|
101
141
|
private _sessionKeyClient;
|
|
102
142
|
private chain;
|
|
103
143
|
private contractAddress;
|
|
104
144
|
private virtualsTokenAddress;
|
|
105
|
-
|
|
106
|
-
|
|
145
|
+
private customRpcClient;
|
|
146
|
+
constructor(walletPrivateKey: Address, sessionEntityKeyId: number, agentWalletAddress: Address, config?: AcpContractConfig, customRpcUrl?: string | undefined);
|
|
147
|
+
static build(walletPrivateKey: Address, sessionEntityKeyId: number, agentWalletAddress: Address, customRpcUrl?: string, config?: AcpContractConfig): Promise<AcpContractClient>;
|
|
107
148
|
init(): Promise<void>;
|
|
108
149
|
get sessionKeyClient(): {
|
|
109
150
|
[x: string]: unknown;
|
|
@@ -375,8 +416,8 @@ declare class AcpContractClient {
|
|
|
375
416
|
[x: `bool[${string}]`]: undefined;
|
|
376
417
|
[x: `bytes4[${string}]`]: undefined;
|
|
377
418
|
[x: `bytes[${string}]`]: undefined;
|
|
378
|
-
[x: `bytes1[${string}]`]: undefined;
|
|
379
419
|
[x: `bytes2[${string}]`]: undefined;
|
|
420
|
+
[x: `bytes1[${string}]`]: undefined;
|
|
380
421
|
[x: `bytes3[${string}]`]: undefined;
|
|
381
422
|
[x: `bytes5[${string}]`]: undefined;
|
|
382
423
|
[x: `bytes6[${string}]`]: undefined;
|
|
@@ -477,8 +518,8 @@ declare class AcpContractClient {
|
|
|
477
518
|
bool?: undefined;
|
|
478
519
|
bytes4?: undefined;
|
|
479
520
|
bytes?: undefined;
|
|
480
|
-
bytes1?: undefined;
|
|
481
521
|
bytes2?: undefined;
|
|
522
|
+
bytes1?: undefined;
|
|
482
523
|
bytes3?: undefined;
|
|
483
524
|
bytes5?: undefined;
|
|
484
525
|
bytes6?: undefined;
|
|
@@ -618,129 +659,129 @@ declare class AcpContractClient {
|
|
|
618
659
|
withdrawals?: viem.Withdrawal[] | undefined | undefined;
|
|
619
660
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
620
661
|
transactions: includeTransactions extends true ? ({
|
|
621
|
-
type: "legacy";
|
|
622
|
-
r: viem.Hex;
|
|
623
|
-
s: viem.Hex;
|
|
624
|
-
v: bigint;
|
|
625
|
-
yParity?: undefined | undefined;
|
|
626
|
-
value: bigint;
|
|
627
|
-
to: Address | null;
|
|
628
662
|
from: Address;
|
|
663
|
+
to: Address | null;
|
|
664
|
+
type: "legacy";
|
|
629
665
|
gas: bigint;
|
|
630
666
|
nonce: number;
|
|
667
|
+
value: bigint;
|
|
631
668
|
maxFeePerBlobGas?: undefined | undefined;
|
|
632
669
|
gasPrice: bigint;
|
|
633
670
|
maxFeePerGas?: undefined | undefined;
|
|
634
671
|
maxPriorityFeePerGas?: undefined | undefined;
|
|
635
|
-
authorizationList?: undefined | undefined;
|
|
636
672
|
accessList?: undefined | undefined;
|
|
637
673
|
blobVersionedHashes?: undefined | undefined;
|
|
674
|
+
authorizationList?: undefined | undefined;
|
|
638
675
|
hash: viem.Hash;
|
|
676
|
+
r: viem.Hex;
|
|
677
|
+
s: viem.Hex;
|
|
678
|
+
v: bigint;
|
|
679
|
+
yParity?: undefined | undefined;
|
|
639
680
|
input: viem.Hex;
|
|
640
681
|
typeHex: viem.Hex | null;
|
|
641
682
|
chainId?: number | undefined;
|
|
642
|
-
|
|
643
|
-
|
|
683
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : bigint : never : never;
|
|
684
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
644
685
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
645
686
|
} | {
|
|
646
|
-
type: "eip2930";
|
|
647
|
-
r: viem.Hex;
|
|
648
|
-
s: viem.Hex;
|
|
649
|
-
v: bigint;
|
|
650
|
-
yParity: number;
|
|
651
|
-
value: bigint;
|
|
652
|
-
to: Address | null;
|
|
653
687
|
from: Address;
|
|
688
|
+
to: Address | null;
|
|
689
|
+
type: "eip2930";
|
|
654
690
|
gas: bigint;
|
|
655
691
|
nonce: number;
|
|
692
|
+
value: bigint;
|
|
656
693
|
maxFeePerBlobGas?: undefined | undefined;
|
|
657
694
|
gasPrice: bigint;
|
|
658
695
|
maxFeePerGas?: undefined | undefined;
|
|
659
696
|
maxPriorityFeePerGas?: undefined | undefined;
|
|
660
|
-
authorizationList?: undefined | undefined;
|
|
661
697
|
accessList: viem.AccessList;
|
|
662
698
|
blobVersionedHashes?: undefined | undefined;
|
|
699
|
+
authorizationList?: undefined | undefined;
|
|
663
700
|
hash: viem.Hash;
|
|
701
|
+
r: viem.Hex;
|
|
702
|
+
s: viem.Hex;
|
|
703
|
+
v: bigint;
|
|
704
|
+
yParity: number;
|
|
664
705
|
input: viem.Hex;
|
|
665
706
|
typeHex: viem.Hex | null;
|
|
666
707
|
chainId: number;
|
|
667
|
-
|
|
668
|
-
|
|
708
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_3 ? T_3 extends (blockTag extends "pending" ? true : false) ? T_3 extends true ? null : bigint : never : never;
|
|
709
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
669
710
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
670
711
|
} | {
|
|
671
|
-
type: "eip1559";
|
|
672
|
-
r: viem.Hex;
|
|
673
|
-
s: viem.Hex;
|
|
674
|
-
v: bigint;
|
|
675
|
-
yParity: number;
|
|
676
|
-
value: bigint;
|
|
677
|
-
to: Address | null;
|
|
678
712
|
from: Address;
|
|
713
|
+
to: Address | null;
|
|
714
|
+
type: "eip1559";
|
|
679
715
|
gas: bigint;
|
|
680
716
|
nonce: number;
|
|
717
|
+
value: bigint;
|
|
681
718
|
maxFeePerBlobGas?: undefined | undefined;
|
|
682
719
|
gasPrice?: undefined | undefined;
|
|
683
720
|
maxFeePerGas: bigint;
|
|
684
721
|
maxPriorityFeePerGas: bigint;
|
|
685
|
-
authorizationList?: undefined | undefined;
|
|
686
722
|
accessList: viem.AccessList;
|
|
687
723
|
blobVersionedHashes?: undefined | undefined;
|
|
724
|
+
authorizationList?: undefined | undefined;
|
|
688
725
|
hash: viem.Hash;
|
|
726
|
+
r: viem.Hex;
|
|
727
|
+
s: viem.Hex;
|
|
728
|
+
v: bigint;
|
|
729
|
+
yParity: number;
|
|
689
730
|
input: viem.Hex;
|
|
690
731
|
typeHex: viem.Hex | null;
|
|
691
732
|
chainId: number;
|
|
692
|
-
|
|
693
|
-
|
|
733
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_6 ? T_6 extends (blockTag extends "pending" ? true : false) ? T_6 extends true ? null : bigint : never : never;
|
|
734
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
694
735
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
695
736
|
} | {
|
|
696
|
-
type: "eip4844";
|
|
697
|
-
r: viem.Hex;
|
|
698
|
-
s: viem.Hex;
|
|
699
|
-
v: bigint;
|
|
700
|
-
yParity: number;
|
|
701
|
-
value: bigint;
|
|
702
|
-
to: Address | null;
|
|
703
737
|
from: Address;
|
|
738
|
+
to: Address | null;
|
|
739
|
+
type: "eip4844";
|
|
704
740
|
gas: bigint;
|
|
705
741
|
nonce: number;
|
|
742
|
+
value: bigint;
|
|
706
743
|
maxFeePerBlobGas: bigint;
|
|
707
744
|
gasPrice?: undefined | undefined;
|
|
708
745
|
maxFeePerGas: bigint;
|
|
709
746
|
maxPriorityFeePerGas: bigint;
|
|
710
|
-
authorizationList?: undefined | undefined;
|
|
711
747
|
accessList: viem.AccessList;
|
|
712
748
|
blobVersionedHashes: readonly viem.Hex[];
|
|
749
|
+
authorizationList?: undefined | undefined;
|
|
713
750
|
hash: viem.Hash;
|
|
751
|
+
r: viem.Hex;
|
|
752
|
+
s: viem.Hex;
|
|
753
|
+
v: bigint;
|
|
754
|
+
yParity: number;
|
|
714
755
|
input: viem.Hex;
|
|
715
756
|
typeHex: viem.Hex | null;
|
|
716
757
|
chainId: number;
|
|
717
|
-
|
|
718
|
-
|
|
758
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_9 ? T_9 extends (blockTag extends "pending" ? true : false) ? T_9 extends true ? null : bigint : never : never;
|
|
759
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
719
760
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
720
761
|
} | {
|
|
721
|
-
type: "eip7702";
|
|
722
|
-
r: viem.Hex;
|
|
723
|
-
s: viem.Hex;
|
|
724
|
-
v: bigint;
|
|
725
|
-
yParity: number;
|
|
726
|
-
value: bigint;
|
|
727
|
-
to: Address | null;
|
|
728
762
|
from: Address;
|
|
763
|
+
to: Address | null;
|
|
764
|
+
type: "eip7702";
|
|
729
765
|
gas: bigint;
|
|
730
766
|
nonce: number;
|
|
767
|
+
value: bigint;
|
|
731
768
|
maxFeePerBlobGas?: undefined | undefined;
|
|
732
769
|
gasPrice?: undefined | undefined;
|
|
733
770
|
maxFeePerGas: bigint;
|
|
734
771
|
maxPriorityFeePerGas: bigint;
|
|
735
|
-
authorizationList: viem.SignedAuthorizationList;
|
|
736
772
|
accessList: viem.AccessList;
|
|
737
773
|
blobVersionedHashes?: undefined | undefined;
|
|
774
|
+
authorizationList: viem.SignedAuthorizationList;
|
|
738
775
|
hash: viem.Hash;
|
|
776
|
+
r: viem.Hex;
|
|
777
|
+
s: viem.Hex;
|
|
778
|
+
v: bigint;
|
|
779
|
+
yParity: number;
|
|
739
780
|
input: viem.Hex;
|
|
740
781
|
typeHex: viem.Hex | null;
|
|
741
782
|
chainId: number;
|
|
742
|
-
|
|
743
|
-
|
|
783
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_12 ? T_12 extends (blockTag extends "pending" ? true : false) ? T_12 extends true ? null : bigint : never : never;
|
|
784
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_13 ? T_13 extends (blockTag extends "pending" ? true : false) ? T_13 extends true ? null : `0x${string}` : never : never;
|
|
744
785
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_14 ? T_14 extends (blockTag extends "pending" ? true : false) ? T_14 extends true ? null : number : never : never;
|
|
745
786
|
})[] : `0x${string}`[];
|
|
746
787
|
}>;
|
|
@@ -768,129 +809,129 @@ declare class AcpContractClient {
|
|
|
768
809
|
} | undefined) => Promise<viem.EstimateMaxPriorityFeePerGasReturnType>;
|
|
769
810
|
getStorageAt: (args: viem.GetStorageAtParameters) => Promise<viem.GetStorageAtReturnType>;
|
|
770
811
|
getTransaction: <blockTag extends viem.BlockTag = "latest">(args: viem.GetTransactionParameters<blockTag>) => Promise<{
|
|
771
|
-
type: "legacy";
|
|
772
|
-
r: viem.Hex;
|
|
773
|
-
s: viem.Hex;
|
|
774
|
-
v: bigint;
|
|
775
|
-
yParity?: undefined | undefined;
|
|
776
|
-
value: bigint;
|
|
777
|
-
to: Address | null;
|
|
778
812
|
from: Address;
|
|
813
|
+
to: Address | null;
|
|
814
|
+
type: "legacy";
|
|
779
815
|
gas: bigint;
|
|
780
816
|
nonce: number;
|
|
817
|
+
value: bigint;
|
|
781
818
|
maxFeePerBlobGas?: undefined | undefined;
|
|
782
819
|
gasPrice: bigint;
|
|
783
820
|
maxFeePerGas?: undefined | undefined;
|
|
784
821
|
maxPriorityFeePerGas?: undefined | undefined;
|
|
785
|
-
authorizationList?: undefined | undefined;
|
|
786
822
|
accessList?: undefined | undefined;
|
|
787
823
|
blobVersionedHashes?: undefined | undefined;
|
|
824
|
+
authorizationList?: undefined | undefined;
|
|
788
825
|
hash: viem.Hash;
|
|
826
|
+
r: viem.Hex;
|
|
827
|
+
s: viem.Hex;
|
|
828
|
+
v: bigint;
|
|
829
|
+
yParity?: undefined | undefined;
|
|
789
830
|
input: viem.Hex;
|
|
790
831
|
typeHex: viem.Hex | null;
|
|
791
832
|
chainId?: number | undefined;
|
|
792
|
-
|
|
793
|
-
|
|
833
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : bigint : never : never;
|
|
834
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
794
835
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
795
836
|
} | {
|
|
796
|
-
type: "eip2930";
|
|
797
|
-
r: viem.Hex;
|
|
798
|
-
s: viem.Hex;
|
|
799
|
-
v: bigint;
|
|
800
|
-
yParity: number;
|
|
801
|
-
value: bigint;
|
|
802
|
-
to: Address | null;
|
|
803
837
|
from: Address;
|
|
838
|
+
to: Address | null;
|
|
839
|
+
type: "eip2930";
|
|
804
840
|
gas: bigint;
|
|
805
841
|
nonce: number;
|
|
842
|
+
value: bigint;
|
|
806
843
|
maxFeePerBlobGas?: undefined | undefined;
|
|
807
844
|
gasPrice: bigint;
|
|
808
845
|
maxFeePerGas?: undefined | undefined;
|
|
809
846
|
maxPriorityFeePerGas?: undefined | undefined;
|
|
810
|
-
authorizationList?: undefined | undefined;
|
|
811
847
|
accessList: viem.AccessList;
|
|
812
848
|
blobVersionedHashes?: undefined | undefined;
|
|
849
|
+
authorizationList?: undefined | undefined;
|
|
813
850
|
hash: viem.Hash;
|
|
851
|
+
r: viem.Hex;
|
|
852
|
+
s: viem.Hex;
|
|
853
|
+
v: bigint;
|
|
854
|
+
yParity: number;
|
|
814
855
|
input: viem.Hex;
|
|
815
856
|
typeHex: viem.Hex | null;
|
|
816
857
|
chainId: number;
|
|
817
|
-
|
|
818
|
-
|
|
858
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_3 ? T_3 extends (blockTag extends "pending" ? true : false) ? T_3 extends true ? null : bigint : never : never;
|
|
859
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
819
860
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
820
861
|
} | {
|
|
821
|
-
type: "eip1559";
|
|
822
|
-
r: viem.Hex;
|
|
823
|
-
s: viem.Hex;
|
|
824
|
-
v: bigint;
|
|
825
|
-
yParity: number;
|
|
826
|
-
value: bigint;
|
|
827
|
-
to: Address | null;
|
|
828
862
|
from: Address;
|
|
863
|
+
to: Address | null;
|
|
864
|
+
type: "eip1559";
|
|
829
865
|
gas: bigint;
|
|
830
866
|
nonce: number;
|
|
867
|
+
value: bigint;
|
|
831
868
|
maxFeePerBlobGas?: undefined | undefined;
|
|
832
869
|
gasPrice?: undefined | undefined;
|
|
833
870
|
maxFeePerGas: bigint;
|
|
834
871
|
maxPriorityFeePerGas: bigint;
|
|
835
|
-
authorizationList?: undefined | undefined;
|
|
836
872
|
accessList: viem.AccessList;
|
|
837
873
|
blobVersionedHashes?: undefined | undefined;
|
|
874
|
+
authorizationList?: undefined | undefined;
|
|
838
875
|
hash: viem.Hash;
|
|
876
|
+
r: viem.Hex;
|
|
877
|
+
s: viem.Hex;
|
|
878
|
+
v: bigint;
|
|
879
|
+
yParity: number;
|
|
839
880
|
input: viem.Hex;
|
|
840
881
|
typeHex: viem.Hex | null;
|
|
841
882
|
chainId: number;
|
|
842
|
-
|
|
843
|
-
|
|
883
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_6 ? T_6 extends (blockTag extends "pending" ? true : false) ? T_6 extends true ? null : bigint : never : never;
|
|
884
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
844
885
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
845
886
|
} | {
|
|
846
|
-
type: "eip4844";
|
|
847
|
-
r: viem.Hex;
|
|
848
|
-
s: viem.Hex;
|
|
849
|
-
v: bigint;
|
|
850
|
-
yParity: number;
|
|
851
|
-
value: bigint;
|
|
852
|
-
to: Address | null;
|
|
853
887
|
from: Address;
|
|
888
|
+
to: Address | null;
|
|
889
|
+
type: "eip4844";
|
|
854
890
|
gas: bigint;
|
|
855
891
|
nonce: number;
|
|
892
|
+
value: bigint;
|
|
856
893
|
maxFeePerBlobGas: bigint;
|
|
857
894
|
gasPrice?: undefined | undefined;
|
|
858
895
|
maxFeePerGas: bigint;
|
|
859
896
|
maxPriorityFeePerGas: bigint;
|
|
860
|
-
authorizationList?: undefined | undefined;
|
|
861
897
|
accessList: viem.AccessList;
|
|
862
898
|
blobVersionedHashes: readonly viem.Hex[];
|
|
899
|
+
authorizationList?: undefined | undefined;
|
|
863
900
|
hash: viem.Hash;
|
|
901
|
+
r: viem.Hex;
|
|
902
|
+
s: viem.Hex;
|
|
903
|
+
v: bigint;
|
|
904
|
+
yParity: number;
|
|
864
905
|
input: viem.Hex;
|
|
865
906
|
typeHex: viem.Hex | null;
|
|
866
907
|
chainId: number;
|
|
867
|
-
|
|
868
|
-
|
|
908
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_9 ? T_9 extends (blockTag extends "pending" ? true : false) ? T_9 extends true ? null : bigint : never : never;
|
|
909
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
869
910
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
870
911
|
} | {
|
|
871
|
-
type: "eip7702";
|
|
872
|
-
r: viem.Hex;
|
|
873
|
-
s: viem.Hex;
|
|
874
|
-
v: bigint;
|
|
875
|
-
yParity: number;
|
|
876
|
-
value: bigint;
|
|
877
|
-
to: Address | null;
|
|
878
912
|
from: Address;
|
|
913
|
+
to: Address | null;
|
|
914
|
+
type: "eip7702";
|
|
879
915
|
gas: bigint;
|
|
880
916
|
nonce: number;
|
|
917
|
+
value: bigint;
|
|
881
918
|
maxFeePerBlobGas?: undefined | undefined;
|
|
882
919
|
gasPrice?: undefined | undefined;
|
|
883
920
|
maxFeePerGas: bigint;
|
|
884
921
|
maxPriorityFeePerGas: bigint;
|
|
885
|
-
authorizationList: viem.SignedAuthorizationList;
|
|
886
922
|
accessList: viem.AccessList;
|
|
887
923
|
blobVersionedHashes?: undefined | undefined;
|
|
924
|
+
authorizationList: viem.SignedAuthorizationList;
|
|
888
925
|
hash: viem.Hash;
|
|
926
|
+
r: viem.Hex;
|
|
927
|
+
s: viem.Hex;
|
|
928
|
+
v: bigint;
|
|
929
|
+
yParity: number;
|
|
889
930
|
input: viem.Hex;
|
|
890
931
|
typeHex: viem.Hex | null;
|
|
891
932
|
chainId: number;
|
|
892
|
-
|
|
893
|
-
|
|
933
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_12 ? T_12 extends (blockTag extends "pending" ? true : false) ? T_12 extends true ? null : bigint : never : never;
|
|
934
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_13 ? T_13 extends (blockTag extends "pending" ? true : false) ? T_13 extends true ? null : `0x${string}` : never : never;
|
|
894
935
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_14 ? T_14 extends (blockTag extends "pending" ? true : false) ? T_14 extends true ? null : number : never : never;
|
|
895
936
|
}>;
|
|
896
937
|
getTransactionConfirmations: (args: viem.GetTransactionConfirmationsParameters<viem.Chain | undefined>) => Promise<viem.GetTransactionConfirmationsReturnType>;
|
|
@@ -4149,7 +4190,7 @@ declare class AcpContractClient {
|
|
|
4149
4190
|
authorizationList: viem.TransactionSerializableEIP7702["authorizationList"];
|
|
4150
4191
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_25 extends "eip7702" ? viem.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
4151
4192
|
chainId?: number | undefined;
|
|
4152
|
-
}, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "gas" | "nonce" | "blobVersionedHashes" | "
|
|
4193
|
+
}, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "gas" | "nonce" | "blobVersionedHashes" | "fees" | "chainId") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "gas" | "nonce" | "blobVersionedHashes" | "fees" | "chainId") ? T_26 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (viem.UnionRequiredBy<Extract<viem.UnionOmit<viem.ExtractChainFormatterParameters<viem.DeriveChain<viem.Chain | undefined, chainOverride>, "transactionRequest", viem.TransactionRequest>, "from"> & (viem.DeriveChain<viem.Chain | undefined, chainOverride> extends infer T_1 ? T_1 extends viem.DeriveChain<viem.Chain | undefined, chainOverride> ? T_1 extends viem.Chain ? {
|
|
4153
4194
|
chain: T_1;
|
|
4154
4195
|
} : {
|
|
4155
4196
|
chain?: undefined;
|
|
@@ -7401,7 +7442,7 @@ declare class AcpContractClient {
|
|
|
7401
7442
|
authorizationList: viem.TransactionSerializableEIP7702["authorizationList"];
|
|
7402
7443
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? viem.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
7403
7444
|
chainId?: number | undefined;
|
|
7404
|
-
}, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "gas" | "nonce" | "blobVersionedHashes" | "
|
|
7445
|
+
}, (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "gas" | "nonce" | "blobVersionedHashes" | "fees" | "chainId") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "gas" | "nonce" | "blobVersionedHashes" | "fees" | "chainId") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
|
|
7405
7446
|
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>>;
|
|
7406
7447
|
sendRawTransaction: (args: viem.SendRawTransactionParameters) => Promise<viem.SendRawTransactionReturnType>;
|
|
7407
7448
|
simulate: <const calls extends readonly unknown[]>(args: viem.SimulateBlocksParameters<calls>) => Promise<viem.SimulateBlocksReturnType<calls>>;
|
|
@@ -7685,8 +7726,8 @@ declare class AcpContractClient {
|
|
|
7685
7726
|
[x: `bool[${string}]`]: undefined;
|
|
7686
7727
|
[x: `bytes4[${string}]`]: undefined;
|
|
7687
7728
|
[x: `bytes[${string}]`]: undefined;
|
|
7688
|
-
[x: `bytes1[${string}]`]: undefined;
|
|
7689
7729
|
[x: `bytes2[${string}]`]: undefined;
|
|
7730
|
+
[x: `bytes1[${string}]`]: undefined;
|
|
7690
7731
|
[x: `bytes3[${string}]`]: undefined;
|
|
7691
7732
|
[x: `bytes5[${string}]`]: undefined;
|
|
7692
7733
|
[x: `bytes6[${string}]`]: undefined;
|
|
@@ -7787,8 +7828,8 @@ declare class AcpContractClient {
|
|
|
7787
7828
|
bool?: undefined;
|
|
7788
7829
|
bytes4?: undefined;
|
|
7789
7830
|
bytes?: undefined;
|
|
7790
|
-
bytes1?: undefined;
|
|
7791
7831
|
bytes2?: undefined;
|
|
7832
|
+
bytes1?: undefined;
|
|
7792
7833
|
bytes3?: undefined;
|
|
7793
7834
|
bytes5?: undefined;
|
|
7794
7835
|
bytes6?: undefined;
|
|
@@ -8136,8 +8177,8 @@ declare class AcpContractClient {
|
|
|
8136
8177
|
[x: `bool[${string}]`]: undefined;
|
|
8137
8178
|
[x: `bytes4[${string}]`]: undefined;
|
|
8138
8179
|
[x: `bytes[${string}]`]: undefined;
|
|
8139
|
-
[x: `bytes1[${string}]`]: undefined;
|
|
8140
8180
|
[x: `bytes2[${string}]`]: undefined;
|
|
8181
|
+
[x: `bytes1[${string}]`]: undefined;
|
|
8141
8182
|
[x: `bytes3[${string}]`]: undefined;
|
|
8142
8183
|
[x: `bytes5[${string}]`]: undefined;
|
|
8143
8184
|
[x: `bytes6[${string}]`]: undefined;
|
|
@@ -8238,8 +8279,8 @@ declare class AcpContractClient {
|
|
|
8238
8279
|
bool?: undefined;
|
|
8239
8280
|
bytes4?: undefined;
|
|
8240
8281
|
bytes?: undefined;
|
|
8241
|
-
bytes1?: undefined;
|
|
8242
8282
|
bytes2?: undefined;
|
|
8283
|
+
bytes1?: undefined;
|
|
8243
8284
|
bytes3?: undefined;
|
|
8244
8285
|
bytes5?: undefined;
|
|
8245
8286
|
bytes6?: undefined;
|
|
@@ -8337,13 +8378,18 @@ declare class AcpContractClient {
|
|
|
8337
8378
|
} & _aa_sdk_core.BundlerActions & viem.PublicActions>;
|
|
8338
8379
|
};
|
|
8339
8380
|
get walletAddress(): Address;
|
|
8381
|
+
private calculateGasFees;
|
|
8382
|
+
private handleSendUserOperation;
|
|
8340
8383
|
private getJobId;
|
|
8341
8384
|
createJob(providerAddress: string, evaluatorAddress: string, expireAt: Date): Promise<{
|
|
8342
8385
|
txHash: string;
|
|
8343
8386
|
jobId: number;
|
|
8344
8387
|
}>;
|
|
8345
8388
|
approveAllowance(priceInWei: bigint): Promise<`0x${string}`>;
|
|
8389
|
+
createPayableFeeMemo(jobId: number, content: string, amount: bigint, memoType: MemoType.PAYABLE_FEE | MemoType.PAYABLE_FEE_REQUEST, nextPhase: AcpJobPhases): Promise<`0x${string}`>;
|
|
8390
|
+
createPayableMemo(jobId: number, content: string, amount: bigint, recipient: Address, feeAmount: bigint, feeType: FeeType, nextPhase: AcpJobPhases, type: MemoType.PAYABLE_REQUEST | MemoType.PAYABLE_TRANSFER, expiredAt?: Date, token?: Address): Promise<`0x${string}`>;
|
|
8346
8391
|
createMemo(jobId: number, content: string, type: MemoType, isSecured: boolean, nextPhase: AcpJobPhases): Promise<Address>;
|
|
8392
|
+
getMemoId(hash: Address): Promise<number>;
|
|
8347
8393
|
signMemo(memoId: number, isApproved: boolean, reason?: string): Promise<`0x${string}`>;
|
|
8348
8394
|
setBudget(jobId: number, budget: bigint): Promise<`0x${string}`>;
|
|
8349
8395
|
}
|
|
@@ -8354,44 +8400,40 @@ declare class AcpMemo {
|
|
|
8354
8400
|
type: MemoType;
|
|
8355
8401
|
content: string;
|
|
8356
8402
|
nextPhase: AcpJobPhases;
|
|
8357
|
-
|
|
8403
|
+
expiry: Date | null;
|
|
8404
|
+
structuredContent: GenericPayload | undefined;
|
|
8405
|
+
constructor(acpClient: AcpClient, id: number, type: MemoType, content: string, nextPhase: AcpJobPhases, expiry: Date | null);
|
|
8406
|
+
get payloadType(): PayloadType | undefined;
|
|
8407
|
+
getStructuredContent<T>(): GenericPayload<T> | undefined;
|
|
8358
8408
|
create(jobId: number, isSecured?: boolean): Promise<`0x${string}`>;
|
|
8359
8409
|
sign(approved: boolean, reason?: string): Promise<`0x${string}`>;
|
|
8360
8410
|
}
|
|
8361
8411
|
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
clientAddress: Address$1;
|
|
8366
|
-
providerAddress: Address$1;
|
|
8367
|
-
evaluatorAddress: Address$1;
|
|
8368
|
-
price: number;
|
|
8369
|
-
memos: AcpMemo[];
|
|
8370
|
-
phase: AcpJobPhases;
|
|
8371
|
-
context: Record<string, any>;
|
|
8372
|
-
constructor(acpClient: AcpClient, id: number, clientAddress: Address$1, providerAddress: Address$1, evaluatorAddress: Address$1, price: number, memos: AcpMemo[], phase: AcpJobPhases, context: Record<string, any>);
|
|
8373
|
-
get serviceRequirement(): string | undefined;
|
|
8374
|
-
get deliverable(): string | undefined;
|
|
8375
|
-
get providerAgent(): Promise<AcpAgent | undefined>;
|
|
8376
|
-
get clientAgent(): Promise<AcpAgent | undefined>;
|
|
8377
|
-
get evaluatorAgent(): Promise<AcpAgent | undefined>;
|
|
8378
|
-
pay(amount: number, reason?: string): Promise<`0x${string}`>;
|
|
8379
|
-
respond(accept: boolean, reason?: string): Promise<`0x${string}` | undefined>;
|
|
8380
|
-
deliver(deliverable: string): Promise<`0x${string}`>;
|
|
8381
|
-
evaluate(accept: boolean, reason?: string): Promise<`0x${string}`>;
|
|
8412
|
+
interface IDeliverable {
|
|
8413
|
+
type: string;
|
|
8414
|
+
value: string | object;
|
|
8382
8415
|
}
|
|
8383
|
-
|
|
8384
8416
|
declare enum AcpAgentSort {
|
|
8385
8417
|
SUCCESSFUL_JOB_COUNT = "successfulJobCount",
|
|
8386
8418
|
SUCCESS_RATE = "successRate",
|
|
8387
8419
|
UNIQUE_BUYER_COUNT = "uniqueBuyerCount",
|
|
8388
|
-
MINS_FROM_LAST_ONLINE = "minsFromLastOnlineTime"
|
|
8389
|
-
|
|
8420
|
+
MINS_FROM_LAST_ONLINE = "minsFromLastOnlineTime"
|
|
8421
|
+
}
|
|
8422
|
+
declare enum AcpGraduationStatus {
|
|
8423
|
+
ALL = "all",
|
|
8424
|
+
GRADUATED = "graduated",
|
|
8425
|
+
NOT_GRADUATED = "not_graduated"
|
|
8426
|
+
}
|
|
8427
|
+
declare enum AcpOnlineStatus {
|
|
8428
|
+
ALL = "all",
|
|
8429
|
+
ONLINE = "online",
|
|
8430
|
+
OFFLINE = "offline"
|
|
8390
8431
|
}
|
|
8391
8432
|
interface IAcpClientOptions {
|
|
8392
8433
|
acpContractClient: AcpContractClient;
|
|
8393
|
-
onNewTask?: (job: AcpJob) => void;
|
|
8434
|
+
onNewTask?: (job: AcpJob, memoToSign?: AcpMemo) => void;
|
|
8394
8435
|
onEvaluate?: (job: AcpJob) => void;
|
|
8436
|
+
customRpcUrl?: string;
|
|
8395
8437
|
}
|
|
8396
8438
|
type AcpAgent = {
|
|
8397
8439
|
id: number;
|
|
@@ -8422,6 +8464,97 @@ type AcpAgent = {
|
|
|
8422
8464
|
isOnline: boolean;
|
|
8423
8465
|
};
|
|
8424
8466
|
};
|
|
8467
|
+
declare enum PayloadType {
|
|
8468
|
+
FUND_RESPONSE = "fund_response",
|
|
8469
|
+
OPEN_POSITION = "open_position",
|
|
8470
|
+
CLOSE_PARTIAL_POSITION = "close_partial_position",
|
|
8471
|
+
CLOSE_POSITION = "close_position",
|
|
8472
|
+
POSITION_FULFILLED = "position_fulfilled",
|
|
8473
|
+
CLOSE_JOB_AND_WITHDRAW = "close_job_and_withdraw",
|
|
8474
|
+
UNFULFILLED_POSITION = "unfulfilled_position"
|
|
8475
|
+
}
|
|
8476
|
+
type GenericPayload<T = any> = {
|
|
8477
|
+
type: PayloadType;
|
|
8478
|
+
data: T;
|
|
8479
|
+
};
|
|
8480
|
+
type FundResponsePayload = {
|
|
8481
|
+
reportingApiEndpoint: string;
|
|
8482
|
+
walletAddress?: Address$1;
|
|
8483
|
+
};
|
|
8484
|
+
type OpenPositionPayload = {
|
|
8485
|
+
symbol: string;
|
|
8486
|
+
amount: number;
|
|
8487
|
+
chain?: string;
|
|
8488
|
+
contractAddress?: string;
|
|
8489
|
+
tp: {
|
|
8490
|
+
price?: number;
|
|
8491
|
+
percentage?: number;
|
|
8492
|
+
};
|
|
8493
|
+
sl: {
|
|
8494
|
+
price?: number;
|
|
8495
|
+
percentage?: number;
|
|
8496
|
+
};
|
|
8497
|
+
};
|
|
8498
|
+
type ClosePositionPayload = {
|
|
8499
|
+
positionId: number;
|
|
8500
|
+
amount: number;
|
|
8501
|
+
};
|
|
8502
|
+
type PositionFulfilledPayload = {
|
|
8503
|
+
symbol: string;
|
|
8504
|
+
amount: number;
|
|
8505
|
+
contractAddress: string;
|
|
8506
|
+
type: "TP" | "SL" | "CLOSE";
|
|
8507
|
+
pnl: number;
|
|
8508
|
+
entryPrice: number;
|
|
8509
|
+
exitPrice: number;
|
|
8510
|
+
};
|
|
8511
|
+
type UnfulfilledPositionPayload = {
|
|
8512
|
+
symbol: string;
|
|
8513
|
+
amount: number;
|
|
8514
|
+
contractAddress: string;
|
|
8515
|
+
type: "ERROR" | "PARTIAL";
|
|
8516
|
+
reason?: string;
|
|
8517
|
+
};
|
|
8518
|
+
type RequestClosePositionPayload = {
|
|
8519
|
+
positionId: number;
|
|
8520
|
+
};
|
|
8521
|
+
|
|
8522
|
+
declare class AcpJob {
|
|
8523
|
+
private acpClient;
|
|
8524
|
+
id: number;
|
|
8525
|
+
clientAddress: Address$1;
|
|
8526
|
+
providerAddress: Address$1;
|
|
8527
|
+
evaluatorAddress: Address$1;
|
|
8528
|
+
price: number;
|
|
8529
|
+
memos: AcpMemo[];
|
|
8530
|
+
phase: AcpJobPhases;
|
|
8531
|
+
context: Record<string, any>;
|
|
8532
|
+
constructor(acpClient: AcpClient, id: number, clientAddress: Address$1, providerAddress: Address$1, evaluatorAddress: Address$1, price: number, memos: AcpMemo[], phase: AcpJobPhases, context: Record<string, any>);
|
|
8533
|
+
get serviceRequirement(): string | undefined;
|
|
8534
|
+
get deliverable(): string | undefined;
|
|
8535
|
+
get providerAgent(): Promise<AcpAgent | undefined>;
|
|
8536
|
+
get clientAgent(): Promise<AcpAgent | undefined>;
|
|
8537
|
+
get evaluatorAgent(): Promise<AcpAgent | undefined>;
|
|
8538
|
+
get latestMemo(): AcpMemo | undefined;
|
|
8539
|
+
pay(amount: number, reason?: string): Promise<`0x${string}`>;
|
|
8540
|
+
respond<T>(accept: boolean, payload?: GenericPayload<T>, reason?: string): Promise<`0x${string}` | undefined>;
|
|
8541
|
+
deliver(deliverable: IDeliverable): Promise<`0x${string}`>;
|
|
8542
|
+
evaluate(accept: boolean, reason?: string): Promise<`0x${string}`>;
|
|
8543
|
+
openPosition(payload: OpenPositionPayload[], feeAmount: number, expiredAt?: Date, walletAddress?: Address$1): Promise<`0x${string}`>;
|
|
8544
|
+
responseOpenPosition(memoId: number, accept: boolean, reason: string): Promise<`0x${string}`>;
|
|
8545
|
+
closePartialPosition(payload: ClosePositionPayload): Promise<`0x${string}`>;
|
|
8546
|
+
responseClosePartialPosition(memoId: number, accept: boolean, reason: string): Promise<`0x${string}`>;
|
|
8547
|
+
requestClosePosition(payload: RequestClosePositionPayload): Promise<`0x${string}`>;
|
|
8548
|
+
responseRequestClosePosition(memoId: number, accept: boolean, payload: ClosePositionPayload, reason?: string): Promise<`0x${string}` | undefined>;
|
|
8549
|
+
confirmClosePosition(memoId: number, accept: boolean, reason?: string): Promise<void>;
|
|
8550
|
+
positionFulfilled(payload: PositionFulfilledPayload): Promise<`0x${string}`>;
|
|
8551
|
+
unfulfilledPosition(payload: UnfulfilledPositionPayload): Promise<`0x${string}`>;
|
|
8552
|
+
responseUnfulfilledPosition(memoId: number, accept: boolean, reason: string): Promise<`0x${string}`>;
|
|
8553
|
+
responsePositionFulfilled(memoId: number, accept: boolean, reason: string): Promise<`0x${string}`>;
|
|
8554
|
+
closeJob(message?: string): Promise<`0x${string}`>;
|
|
8555
|
+
responseCloseJob(memoId: number, accept: boolean, fulfilledPositions: PositionFulfilledPayload[], reason?: string): Promise<`0x${string}` | undefined>;
|
|
8556
|
+
confirmJobClosure(memoId: number, accept: boolean, reason?: string): Promise<void>;
|
|
8557
|
+
}
|
|
8425
8558
|
|
|
8426
8559
|
declare class AcpJobOffering {
|
|
8427
8560
|
private readonly acpClient;
|
|
@@ -8437,9 +8570,9 @@ declare class AcpJobOffering {
|
|
|
8437
8570
|
interface IAcpBrowseAgentsOptions {
|
|
8438
8571
|
cluster?: string;
|
|
8439
8572
|
sort_by?: AcpAgentSort[];
|
|
8440
|
-
rerank?: boolean;
|
|
8441
8573
|
top_k?: number;
|
|
8442
|
-
|
|
8574
|
+
graduationStatus?: AcpGraduationStatus;
|
|
8575
|
+
onlineStatus?: AcpOnlineStatus;
|
|
8443
8576
|
}
|
|
8444
8577
|
declare class AcpClient {
|
|
8445
8578
|
private acpUrl;
|
|
@@ -8465,9 +8598,14 @@ declare class AcpClient {
|
|
|
8465
8598
|
} | undefined;
|
|
8466
8599
|
}[]>;
|
|
8467
8600
|
initiateJob(providerAddress: Address$1, serviceRequirement: Object | string, amount: number, evaluatorAddress?: Address$1, expiredAt?: Date): Promise<number>;
|
|
8468
|
-
respondJob(jobId: number, memoId: number, accept: boolean, reason?: string): Promise<`0x${string}` | undefined>;
|
|
8601
|
+
respondJob(jobId: number, memoId: number, accept: boolean, content?: string, reason?: string): Promise<`0x${string}` | undefined>;
|
|
8469
8602
|
payJob(jobId: number, amount: number, memoId: number, reason?: string): Promise<`0x${string}`>;
|
|
8470
|
-
|
|
8603
|
+
requestFunds<T>(jobId: number, amount: number, recipient: Address$1, feeAmount: number, feeType: FeeType, reason: GenericPayload<T>, nextPhase: AcpJobPhases): Promise<`0x${string}`>;
|
|
8604
|
+
responseFundsRequest(memoId: number, accept: boolean, amount: number, reason?: string): Promise<`0x${string}`>;
|
|
8605
|
+
transferFunds<T>(jobId: number, amount: number, recipient: Address$1, feeAmount: number, feeType: FeeType, reason: GenericPayload<T>, nextPhase: AcpJobPhases, expiredAt?: Date): Promise<`0x${string}`>;
|
|
8606
|
+
sendMessage<T>(jobId: number, message: GenericPayload<T>, nextPhase: AcpJobPhases): Promise<`0x${string}`>;
|
|
8607
|
+
responseFundsTransfer(memoId: number, accept: boolean, reason?: string): Promise<`0x${string}`>;
|
|
8608
|
+
deliverJob(jobId: number, deliverable: IDeliverable): Promise<`0x${string}`>;
|
|
8471
8609
|
getActiveJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
|
|
8472
8610
|
getCompletedJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
|
|
8473
8611
|
getCancelledJobs(page?: number, pageSize?: number): Promise<AcpJob[]>;
|
|
@@ -8476,4 +8614,4 @@ declare class AcpClient {
|
|
|
8476
8614
|
getAgent(walletAddress: Address$1): Promise<AcpAgent | undefined>;
|
|
8477
8615
|
}
|
|
8478
8616
|
|
|
8479
|
-
export { ACP_ABI, AcpAgentSort, AcpContractClient, type AcpContractConfig, AcpJob, AcpJobPhases, AcpMemo, MemoType, baseAcpConfig, baseSepoliaAcpConfig, AcpClient as default };
|
|
8617
|
+
export { ACP_ABI, AcpAgentSort, AcpContractClient, type AcpContractConfig, AcpGraduationStatus, AcpJob, AcpJobPhases, AcpMemo, AcpOnlineStatus, type ClosePositionPayload, type FundResponsePayload, type IDeliverable, MemoType, type OpenPositionPayload, PayloadType, type RequestClosePositionPayload, baseAcpConfig, baseSepoliaAcpConfig, AcpClient as default };
|