@q00bs/agent-sdk 1.0.0

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.
Files changed (85) hide show
  1. package/dist/Q00bsAgent.d.ts +331 -0
  2. package/dist/Q00bsAgent.d.ts.map +1 -0
  3. package/dist/Q00bsAgent.js +695 -0
  4. package/dist/Q00bsAgent.js.map +1 -0
  5. package/dist/abis/AgentEscrow.d.ts +336 -0
  6. package/dist/abis/AgentEscrow.d.ts.map +1 -0
  7. package/dist/abis/AgentEscrow.js +206 -0
  8. package/dist/abis/AgentEscrow.js.map +1 -0
  9. package/dist/abis/AgentRegistry.d.ts +496 -0
  10. package/dist/abis/AgentRegistry.d.ts.map +1 -0
  11. package/dist/abis/AgentRegistry.js +280 -0
  12. package/dist/abis/AgentRegistry.js.map +1 -0
  13. package/dist/abis/ConsensusModule.d.ts +270 -0
  14. package/dist/abis/ConsensusModule.d.ts.map +1 -0
  15. package/dist/abis/ConsensusModule.js +157 -0
  16. package/dist/abis/ConsensusModule.js.map +1 -0
  17. package/dist/abis/ERC8004Identity.d.ts +293 -0
  18. package/dist/abis/ERC8004Identity.d.ts.map +1 -0
  19. package/dist/abis/ERC8004Identity.js +223 -0
  20. package/dist/abis/ERC8004Identity.js.map +1 -0
  21. package/dist/abis/ERC8004Reputation.d.ts +362 -0
  22. package/dist/abis/ERC8004Reputation.d.ts.map +1 -0
  23. package/dist/abis/ERC8004Reputation.js +229 -0
  24. package/dist/abis/ERC8004Reputation.js.map +1 -0
  25. package/dist/abis/ERC8004Validation.d.ts +234 -0
  26. package/dist/abis/ERC8004Validation.d.ts.map +1 -0
  27. package/dist/abis/ERC8004Validation.js +162 -0
  28. package/dist/abis/ERC8004Validation.js.map +1 -0
  29. package/dist/abis/Q00bFactory.d.ts +123 -0
  30. package/dist/abis/Q00bFactory.d.ts.map +1 -0
  31. package/dist/abis/Q00bFactory.js +65 -0
  32. package/dist/abis/Q00bFactory.js.map +1 -0
  33. package/dist/abis/TheQ00bs.d.ts +119 -0
  34. package/dist/abis/TheQ00bs.d.ts.map +1 -0
  35. package/dist/abis/TheQ00bs.js +73 -0
  36. package/dist/abis/TheQ00bs.js.map +1 -0
  37. package/dist/abis/index.d.ts +9 -0
  38. package/dist/abis/index.d.ts.map +1 -0
  39. package/dist/abis/index.js +17 -0
  40. package/dist/abis/index.js.map +1 -0
  41. package/dist/client.d.ts +111 -0
  42. package/dist/client.d.ts.map +1 -0
  43. package/dist/client.js +134 -0
  44. package/dist/client.js.map +1 -0
  45. package/dist/consensus.d.ts +85 -0
  46. package/dist/consensus.d.ts.map +1 -0
  47. package/dist/consensus.js +227 -0
  48. package/dist/consensus.js.map +1 -0
  49. package/dist/constants.d.ts +85 -0
  50. package/dist/constants.d.ts.map +1 -0
  51. package/dist/constants.js +113 -0
  52. package/dist/constants.js.map +1 -0
  53. package/dist/discovery.d.ts +70 -0
  54. package/dist/discovery.d.ts.map +1 -0
  55. package/dist/discovery.js +214 -0
  56. package/dist/discovery.js.map +1 -0
  57. package/dist/erc8004.d.ts +311 -0
  58. package/dist/erc8004.d.ts.map +1 -0
  59. package/dist/erc8004.js +824 -0
  60. package/dist/erc8004.js.map +1 -0
  61. package/dist/errors.d.ts +107 -0
  62. package/dist/errors.d.ts.map +1 -0
  63. package/dist/errors.js +210 -0
  64. package/dist/errors.js.map +1 -0
  65. package/dist/escrow.d.ts +86 -0
  66. package/dist/escrow.d.ts.map +1 -0
  67. package/dist/escrow.js +267 -0
  68. package/dist/escrow.js.map +1 -0
  69. package/dist/index.d.ts +51 -0
  70. package/dist/index.d.ts.map +1 -0
  71. package/dist/index.js +118 -0
  72. package/dist/index.js.map +1 -0
  73. package/dist/privy.d.ts +197 -0
  74. package/dist/privy.d.ts.map +1 -0
  75. package/dist/privy.js +524 -0
  76. package/dist/privy.js.map +1 -0
  77. package/dist/trust.d.ts +49 -0
  78. package/dist/trust.d.ts.map +1 -0
  79. package/dist/trust.js +117 -0
  80. package/dist/trust.js.map +1 -0
  81. package/dist/types.d.ts +472 -0
  82. package/dist/types.d.ts.map +1 -0
  83. package/dist/types.js +36 -0
  84. package/dist/types.js.map +1 -0
  85. package/package.json +30 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"erc8004.js","sourceRoot":"","sources":["../src/erc8004.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;;;AAGH,4DAA8D;AAC9D,gEAAkE;AAClE,gEAAkE;AAClE,qCAMkB;AAClB,2CAMqB;AAarB,gEAAgE;AAChE,mBAAmB;AACnB,gEAAgE;AAEhE,MAAa,cAAc;IACjB,YAAY,CAAiC;IAC7C,YAAY,CAA2C;IACvD,MAAM,CAAS;IAEvB,qBAAqB;IACb,gBAAgB,CAAgB;IAChC,kBAAkB,CAAgB;IAClC,kBAAkB,CAAgB;IAE1C,0CAA0C;IAClC,eAAe,CAAU;IAEjC,oDAAoD;IACpD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,+CAA+C;IAC/C,IAAI,uBAAuB;QACzB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,iDAAiD;IACjD,IAAI,yBAAyB;QAC3B,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED,YACE,YAA4C,EAC5C,MAAc,EACd,YAAsD,EACtD,MAAsB;QAEtB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,8DAA8D;QAC9D,IAAI,CAAC,gBAAgB,GAAG,CACtB,MAAM,EAAE,uBAAuB,IAAI,6CAAiC,CACpD,CAAC;QAEnB,IAAI,CAAC,kBAAkB,GAAG,CACxB,MAAM,EAAE,yBAAyB,IAAI,+CAAmC,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AC,CAAC,CAAC,EAAE,EAAE,CAAC;YAC/B,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;YAC1B,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SAChC,CAAC;IACJ,CAAC;IAED,gEAAgE;IAChE,iBAAiB;IACjB,gEAAgE;IAExD,kBAAkB;QACxB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,MAAM,IAAI,qBAAY,CACpB,iEAAiE;gBACjE,+EAA+E,CAChF,CAAC;QACJ,CAAC;IACH,CAAC;IAEO,wBAAwB;QAC9B,IACE,IAAI,CAAC,kBAAkB,KAAK,4CAA4C,EACxE,CAAC;YACD,MAAM,IAAI,qBAAY,CACpB,wEAAwE;gBACxE,yEAAyE;gBACzE,6CAA6C,CAC9C,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA76BD,wCA66BC"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * @q00bs/agent-sdk — Custom Error Classes
3
+ *
4
+ * Every error the SDK can throw is defined here with a unique name.
5
+ * Consumers can catch specific error types to handle them gracefully:
6
+ *
7
+ * try { await agent.requestTask(...) }
8
+ * catch (e) {
9
+ * if (e instanceof TrustPathNotFoundError) { ... }
10
+ * if (e instanceof InsufficientTrustError) { ... }
11
+ * }
12
+ */
13
+ /** Base class for all Q00bs SDK errors. */
14
+ export declare class Q00bsError extends Error {
15
+ constructor(message: string);
16
+ }
17
+ /** Agent is not registered on-chain. Call agent.register() first. */
18
+ export declare class AgentNotRegisteredError extends Q00bsError {
19
+ constructor();
20
+ }
21
+ /** No trust path exists between two agents in the q00b graph. */
22
+ export declare class TrustPathNotFoundError extends Q00bsError {
23
+ readonly fromAgent: number | string;
24
+ readonly toAgent: number | string;
25
+ constructor(from: number | string, to: number | string);
26
+ }
27
+ /** Trust score is below the required threshold for the requested action. */
28
+ export declare class InsufficientTrustError extends Q00bsError {
29
+ readonly actual: number;
30
+ readonly required: number;
31
+ constructor(actual: number, required: number);
32
+ }
33
+ /** Transaction value exceeds the agent's configured spend limit. */
34
+ export declare class SpendLimitExceededError extends Q00bsError {
35
+ readonly attempted: string;
36
+ readonly limit: string;
37
+ constructor(attempted: string, limit: string);
38
+ }
39
+ /** Escrow is in an invalid state for the requested operation. */
40
+ export declare class EscrowStateError extends Q00bsError {
41
+ readonly escrowId: number;
42
+ readonly currentState: number;
43
+ constructor(escrowId: number, currentState: number, expectedAction: string);
44
+ }
45
+ /** Consensus was not reached within the timeout period. */
46
+ export declare class ConsensusTimeoutError extends Q00bsError {
47
+ readonly requestId: number;
48
+ constructor(requestId: number);
49
+ }
50
+ /** Consensus was reached but the action was rejected. */
51
+ export declare class ConsensusRejectedError extends Q00bsError {
52
+ readonly requestId: number;
53
+ readonly approvals: number;
54
+ readonly rejections: number;
55
+ constructor(requestId: number, approvals: number, rejections: number);
56
+ }
57
+ /** The target agent is inactive or frozen. */
58
+ export declare class AgentInactiveError extends Q00bsError {
59
+ readonly agentId: number;
60
+ constructor(agentId: number);
61
+ }
62
+ /** A contract call reverted with an on-chain error. */
63
+ export declare class ContractCallError extends Q00bsError {
64
+ readonly contractAddress: string;
65
+ readonly functionName: string;
66
+ constructor(contractAddress: string, functionName: string, reason: string);
67
+ }
68
+ /** Privy wallet initialization or operation failed. */
69
+ export declare class PrivyWalletError extends Q00bsError {
70
+ readonly walletId?: string;
71
+ constructor(message: string, walletId?: string);
72
+ }
73
+ /** Privy policy rejected a transaction before it was broadcast. */
74
+ export declare class PrivyPolicyViolationError extends Q00bsError {
75
+ readonly ruleType: string;
76
+ readonly reason: string;
77
+ constructor(ruleType: string, reason: string);
78
+ }
79
+ /** Privy API returned an unexpected error. */
80
+ export declare class PrivyApiError extends Q00bsError {
81
+ readonly statusCode: number;
82
+ constructor(statusCode: number, message: string);
83
+ }
84
+ /** Base class for ERC-8004 related errors. */
85
+ export declare class ERC8004Error extends Q00bsError {
86
+ constructor(message: string);
87
+ }
88
+ /** The requested ERC-8004 identity was not found. */
89
+ export declare class ERC8004IdentityNotFoundError extends ERC8004Error {
90
+ readonly agentId: number;
91
+ constructor(agentId: number);
92
+ }
93
+ /** Self-feedback is not allowed in the ERC-8004 ReputationRegistry. */
94
+ export declare class ERC8004SelfFeedbackError extends ERC8004Error {
95
+ constructor();
96
+ }
97
+ /** An ERC-8004 registry call failed. */
98
+ export declare class ERC8004RegistryError extends ERC8004Error {
99
+ readonly registry: string;
100
+ readonly functionName: string;
101
+ constructor(registry: string, functionName: string, reason: string);
102
+ }
103
+ /** ERC-8004 is not configured for this agent. */
104
+ export declare class ERC8004NotConfiguredError extends ERC8004Error {
105
+ constructor();
106
+ }
107
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,2CAA2C;AAC3C,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,EAAE,MAAM;CAI5B;AAED,qEAAqE;AACrE,qBAAa,uBAAwB,SAAQ,UAAU;;CAKtD;AAED,iEAAiE;AACjE,qBAAa,sBAAuB,SAAQ,UAAU;IACpD,SAAgB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3C,SAAgB,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;gBAE7B,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM;CAMvD;AAED,4EAA4E;AAC5E,qBAAa,sBAAuB,SAAQ,UAAU;IACpD,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,QAAQ,EAAE,MAAM,CAAC;gBAErB,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAM7C;AAED,oEAAoE;AACpE,qBAAa,uBAAwB,SAAQ,UAAU;IACrD,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,KAAK,EAAE,MAAM,CAAC;gBAEl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gBAEnB,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAM7C;AAED,8CAA8C;AAC9C,qBAAa,aAAc,SAAQ,UAAU;IAC3C,SAAgB,UAAU,EAAE,MAAM,CAAC;gBAEvB,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAKhD;AAMD,8CAA8C;AAC9C,qBAAa,YAAa,SAAQ,UAAU;gBAC9B,OAAO,EAAE,MAAM;CAI5B;AAED,qDAAqD;AACrD,qBAAa,4BAA6B,SAAQ,YAAY;IAC5D,SAAgB,OAAO,EAAE,MAAM,CAAC;gBAEpB,OAAO,EAAE,MAAM;CAK5B;AAED,uEAAuE;AACvE,qBAAa,wBAAyB,SAAQ,YAAY;;CAKzD;AAED,wCAAwC;AACxC,qBAAa,oBAAqB,SAAQ,YAAY;IACpD,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,YAAY,EAAE,MAAM,CAAC;gBAEzB,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAMnE;AAED,iDAAiD;AACjD,qBAAa,yBAA0B,SAAQ,YAAY;;CAO1D"}
package/dist/errors.js ADDED
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+ /**
3
+ * @q00bs/agent-sdk — Custom Error Classes
4
+ *
5
+ * Every error the SDK can throw is defined here with a unique name.
6
+ * Consumers can catch specific error types to handle them gracefully:
7
+ *
8
+ * try { await agent.requestTask(...) }
9
+ * catch (e) {
10
+ * if (e instanceof TrustPathNotFoundError) { ... }
11
+ * if (e instanceof InsufficientTrustError) { ... }
12
+ * }
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ERC8004NotConfiguredError = exports.ERC8004RegistryError = exports.ERC8004SelfFeedbackError = exports.ERC8004IdentityNotFoundError = exports.ERC8004Error = exports.PrivyApiError = exports.PrivyPolicyViolationError = exports.PrivyWalletError = exports.ContractCallError = exports.AgentInactiveError = exports.ConsensusRejectedError = exports.ConsensusTimeoutError = exports.EscrowStateError = exports.SpendLimitExceededError = exports.InsufficientTrustError = exports.TrustPathNotFoundError = exports.AgentNotRegisteredError = exports.Q00bsError = void 0;
16
+ /** Base class for all Q00bs SDK errors. */
17
+ class Q00bsError extends Error {
18
+ constructor(message) {
19
+ super(message);
20
+ this.name = 'Q00bsError';
21
+ }
22
+ }
23
+ exports.Q00bsError = Q00bsError;
24
+ /** Agent is not registered on-chain. Call agent.register() first. */
25
+ class AgentNotRegisteredError extends Q00bsError {
26
+ constructor() {
27
+ super('Agent is not registered on-chain. Call agent.register() first.');
28
+ this.name = 'AgentNotRegisteredError';
29
+ }
30
+ }
31
+ exports.AgentNotRegisteredError = AgentNotRegisteredError;
32
+ /** No trust path exists between two agents in the q00b graph. */
33
+ class TrustPathNotFoundError extends Q00bsError {
34
+ fromAgent;
35
+ toAgent;
36
+ constructor(from, to) {
37
+ super(`No trust path found between agent ${from} and agent ${to}.`);
38
+ this.name = 'TrustPathNotFoundError';
39
+ this.fromAgent = from;
40
+ this.toAgent = to;
41
+ }
42
+ }
43
+ exports.TrustPathNotFoundError = TrustPathNotFoundError;
44
+ /** Trust score is below the required threshold for the requested action. */
45
+ class InsufficientTrustError extends Q00bsError {
46
+ actual;
47
+ required;
48
+ constructor(actual, required) {
49
+ super(`Trust score ${actual} is below required threshold ${required}.`);
50
+ this.name = 'InsufficientTrustError';
51
+ this.actual = actual;
52
+ this.required = required;
53
+ }
54
+ }
55
+ exports.InsufficientTrustError = InsufficientTrustError;
56
+ /** Transaction value exceeds the agent's configured spend limit. */
57
+ class SpendLimitExceededError extends Q00bsError {
58
+ attempted;
59
+ limit;
60
+ constructor(attempted, limit) {
61
+ super(`Transaction of ${attempted} ETH exceeds limit of ${limit} ETH.`);
62
+ this.name = 'SpendLimitExceededError';
63
+ this.attempted = attempted;
64
+ this.limit = limit;
65
+ }
66
+ }
67
+ exports.SpendLimitExceededError = SpendLimitExceededError;
68
+ /** Escrow is in an invalid state for the requested operation. */
69
+ class EscrowStateError extends Q00bsError {
70
+ escrowId;
71
+ currentState;
72
+ constructor(escrowId, currentState, expectedAction) {
73
+ super(`Escrow ${escrowId} is in state ${currentState} — cannot ${expectedAction}.`);
74
+ this.name = 'EscrowStateError';
75
+ this.escrowId = escrowId;
76
+ this.currentState = currentState;
77
+ }
78
+ }
79
+ exports.EscrowStateError = EscrowStateError;
80
+ /** Consensus was not reached within the timeout period. */
81
+ class ConsensusTimeoutError extends Q00bsError {
82
+ requestId;
83
+ constructor(requestId) {
84
+ super(`Consensus request ${requestId} timed out without reaching quorum.`);
85
+ this.name = 'ConsensusTimeoutError';
86
+ this.requestId = requestId;
87
+ }
88
+ }
89
+ exports.ConsensusTimeoutError = ConsensusTimeoutError;
90
+ /** Consensus was reached but the action was rejected. */
91
+ class ConsensusRejectedError extends Q00bsError {
92
+ requestId;
93
+ approvals;
94
+ rejections;
95
+ constructor(requestId, approvals, rejections) {
96
+ super(`Consensus request ${requestId} was rejected (${approvals} for, ${rejections} against).`);
97
+ this.name = 'ConsensusRejectedError';
98
+ this.requestId = requestId;
99
+ this.approvals = approvals;
100
+ this.rejections = rejections;
101
+ }
102
+ }
103
+ exports.ConsensusRejectedError = ConsensusRejectedError;
104
+ /** The target agent is inactive or frozen. */
105
+ class AgentInactiveError extends Q00bsError {
106
+ agentId;
107
+ constructor(agentId) {
108
+ super(`Agent ${agentId} is inactive or frozen.`);
109
+ this.name = 'AgentInactiveError';
110
+ this.agentId = agentId;
111
+ }
112
+ }
113
+ exports.AgentInactiveError = AgentInactiveError;
114
+ /** A contract call reverted with an on-chain error. */
115
+ class ContractCallError extends Q00bsError {
116
+ contractAddress;
117
+ functionName;
118
+ constructor(contractAddress, functionName, reason) {
119
+ super(`Contract call ${functionName} on ${contractAddress} reverted: ${reason}`);
120
+ this.name = 'ContractCallError';
121
+ this.contractAddress = contractAddress;
122
+ this.functionName = functionName;
123
+ }
124
+ }
125
+ exports.ContractCallError = ContractCallError;
126
+ // ─────────────────────────────────────────────────────────────
127
+ // PRIVY WALLET ERRORS
128
+ // ─────────────────────────────────────────────────────────────
129
+ /** Privy wallet initialization or operation failed. */
130
+ class PrivyWalletError extends Q00bsError {
131
+ walletId;
132
+ constructor(message, walletId) {
133
+ super(`Privy wallet error${walletId ? ` (${walletId})` : ''}: ${message}`);
134
+ this.name = 'PrivyWalletError';
135
+ this.walletId = walletId;
136
+ }
137
+ }
138
+ exports.PrivyWalletError = PrivyWalletError;
139
+ /** Privy policy rejected a transaction before it was broadcast. */
140
+ class PrivyPolicyViolationError extends Q00bsError {
141
+ ruleType;
142
+ reason;
143
+ constructor(ruleType, reason) {
144
+ super(`Transaction blocked by Privy policy [${ruleType}]: ${reason}`);
145
+ this.name = 'PrivyPolicyViolationError';
146
+ this.ruleType = ruleType;
147
+ this.reason = reason;
148
+ }
149
+ }
150
+ exports.PrivyPolicyViolationError = PrivyPolicyViolationError;
151
+ /** Privy API returned an unexpected error. */
152
+ class PrivyApiError extends Q00bsError {
153
+ statusCode;
154
+ constructor(statusCode, message) {
155
+ super(`Privy API error (${statusCode}): ${message}`);
156
+ this.name = 'PrivyApiError';
157
+ this.statusCode = statusCode;
158
+ }
159
+ }
160
+ exports.PrivyApiError = PrivyApiError;
161
+ // ─────────────────────────────────────────────────────────────
162
+ // ERC-8004 ERRORS
163
+ // ─────────────────────────────────────────────────────────────
164
+ /** Base class for ERC-8004 related errors. */
165
+ class ERC8004Error extends Q00bsError {
166
+ constructor(message) {
167
+ super(`ERC-8004: ${message}`);
168
+ this.name = 'ERC8004Error';
169
+ }
170
+ }
171
+ exports.ERC8004Error = ERC8004Error;
172
+ /** The requested ERC-8004 identity was not found. */
173
+ class ERC8004IdentityNotFoundError extends ERC8004Error {
174
+ agentId;
175
+ constructor(agentId) {
176
+ super(`Identity not found for agentId ${agentId} in the ERC-8004 IdentityRegistry.`);
177
+ this.name = 'ERC8004IdentityNotFoundError';
178
+ this.agentId = agentId;
179
+ }
180
+ }
181
+ exports.ERC8004IdentityNotFoundError = ERC8004IdentityNotFoundError;
182
+ /** Self-feedback is not allowed in the ERC-8004 ReputationRegistry. */
183
+ class ERC8004SelfFeedbackError extends ERC8004Error {
184
+ constructor() {
185
+ super('Self-feedback is not allowed. An agent cannot give feedback to itself.');
186
+ this.name = 'ERC8004SelfFeedbackError';
187
+ }
188
+ }
189
+ exports.ERC8004SelfFeedbackError = ERC8004SelfFeedbackError;
190
+ /** An ERC-8004 registry call failed. */
191
+ class ERC8004RegistryError extends ERC8004Error {
192
+ registry;
193
+ functionName;
194
+ constructor(registry, functionName, reason) {
195
+ super(`Registry call ${functionName} on ${registry} failed: ${reason}`);
196
+ this.name = 'ERC8004RegistryError';
197
+ this.registry = registry;
198
+ this.functionName = functionName;
199
+ }
200
+ }
201
+ exports.ERC8004RegistryError = ERC8004RegistryError;
202
+ /** ERC-8004 is not configured for this agent. */
203
+ class ERC8004NotConfiguredError extends ERC8004Error {
204
+ constructor() {
205
+ super('ERC-8004 is not configured. Pass `erc8004` in AgentConfig or call erc8004Manager methods directly.');
206
+ this.name = 'ERC8004NotConfiguredError';
207
+ }
208
+ }
209
+ exports.ERC8004NotConfiguredError = ERC8004NotConfiguredError;
210
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,2CAA2C;AAC3C,MAAa,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF;AALD,gCAKC;AAED,qEAAqE;AACrE,MAAa,uBAAwB,SAAQ,UAAU;IACrD;QACE,KAAK,CAAC,gEAAgE,CAAC,CAAC;QACxE,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF;AALD,0DAKC;AAED,iEAAiE;AACjE,MAAa,sBA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+ * Manages the full escrow lifecycle for agent-to-agent payments:
5
+ *
6
+ * 1. Client agent CREATES escrow → ETH is locked on-chain.
7
+ * 2. Service agent ACCEPTS the task.
8
+ * 3. Service agent marks COMPLETE with deliverable hash.
9
+ * 4. Client agent RELEASES funds (or DISPUTES / auto-REFUNDS on deadline).
10
+ *
11
+ * The AgentEscrow contract charges a 1% protocol fee on every creation.
12
+ * That fee goes to the Q00bs treasury (your monetization).
13
+ *
14
+ * SECURITY NOTES:
15
+ * - Spend limits are enforced on-chain by AgentRegistry.recordSpend().
16
+ * - Only the client's wallet can create/release; only the service's wallet can accept/complete.
17
+ * - Disputes are resolved by pre-authorized resolver addresses (set by contract owner).
18
+ */
19
+ import type { PublicClient, WalletClient, Chain, Transport, Account } from 'viem';
20
+ import type { CreateEscrowParams, EscrowRecord, Logger } from './types';
21
+ export declare class EscrowManager {
22
+ private publicClient;
23
+ private walletClient;
24
+ private escrowAddress;
25
+ private logger;
26
+ constructor(publicClient: PublicClient<Transport, Chain>, walletClient: WalletClient<Transport, Chain, Account>, escrowAddress: string, logger: Logger);
27
+ /**
28
+ * Create a new escrow for an agent-to-agent task.
29
+ *
30
+ * @param clientAgentId - Your agent's on-chain ID (the payer).
31
+ * @param params - Task details, payment amount, and deadline.
32
+ * @returns The new escrow ID.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const escrowId = await escrow.create(1, {
37
+ * serviceAgentId: 5,
38
+ * taskDescription: 'Summarize this dataset',
39
+ * paymentEth: '0.01',
40
+ * deadlineMs: Date.now() + 24 * 60 * 60 * 1000,
41
+ * });
42
+ * ```
43
+ */
44
+ create(clientAgentId: number, params: CreateEscrowParams): Promise<number>;
45
+ /**
46
+ * Accept an escrow (called by the service agent).
47
+ *
48
+ * @param escrowId - The escrow to accept.
49
+ */
50
+ accept(escrowId: number): Promise<string>;
51
+ /**
52
+ * Mark an escrow as complete (called by the service agent after finishing work).
53
+ *
54
+ * @param escrowId - The escrow to mark complete.
55
+ * @param deliverableDescription - Description of what was delivered.
56
+ */
57
+ markComplete(escrowId: number, deliverableDescription: string): Promise<string>;
58
+ /**
59
+ * Release escrowed funds to the service agent (called by the client agent).
60
+ *
61
+ * @param escrowId - The escrow to release.
62
+ */
63
+ release(escrowId: number): Promise<string>;
64
+ /**
65
+ * Refund the escrow if the deadline has passed without completion.
66
+ *
67
+ * @param escrowId - The escrow to refund.
68
+ */
69
+ refund(escrowId: number): Promise<string>;
70
+ /**
71
+ * Dispute a completed escrow.
72
+ *
73
+ * @param escrowId - The escrow to dispute.
74
+ * @param evidence - Evidence description for the dispute.
75
+ */
76
+ dispute(escrowId: number, evidence: string): Promise<string>;
77
+ /**
78
+ * Read an escrow record from the chain.
79
+ *
80
+ * @param escrowId - The escrow to query.
81
+ * @returns The full escrow record.
82
+ */
83
+ get(escrowId: number): Promise<EscrowRecord>;
84
+ private parseEscrowIdFromReceipt;
85
+ }
86
+ //# sourceMappingURL=escrow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../src/escrow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIlF,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAe,MAAM,EAAE,MAAM,SAAS,CAAC;AAOrF,qBAAa,aAAa;IACxB,OAAO,CAAC,YAAY,CAAiC;IACrD,OAAO,CAAC,YAAY,CAA0C;IAC9D,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,MAAM,CAAS;gBAGrB,YAAY,EAAE,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,EAC5C,YAAY,EAAE,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACrD,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM;IAQhB;;;;;;;;;;;;;;;;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