@absol-labs/agent 0.7.3 → 0.9.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.
- package/README.md +19 -4
- package/dist/discovery/registry.d.ts +110 -305
- package/dist/discovery/registry.d.ts.map +1 -1
- package/dist/discovery/registry.js +141 -318
- package/dist/discovery/registry.js.map +1 -1
- package/dist/frameworks/agentkit.d.ts.map +1 -1
- package/dist/frameworks/agentkit.js +23 -6
- package/dist/frameworks/agentkit.js.map +1 -1
- package/dist/gateway/caller-auth-gateway.d.ts +103 -2
- package/dist/gateway/caller-auth-gateway.d.ts.map +1 -1
- package/dist/gateway/caller-auth-gateway.js +176 -19
- package/dist/gateway/caller-auth-gateway.js.map +1 -1
- package/dist/gateway/http-server.d.ts +12 -0
- package/dist/gateway/http-server.d.ts.map +1 -1
- package/dist/gateway/http-server.js +45 -1
- package/dist/gateway/http-server.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/wallet/autonomous-wallet-store.d.ts +123 -0
- package/dist/wallet/autonomous-wallet-store.d.ts.map +1 -0
- package/dist/wallet/autonomous-wallet-store.js +318 -0
- package/dist/wallet/autonomous-wallet-store.js.map +1 -0
- package/dist/wallet/autonomous-wallet.d.ts +14 -39
- package/dist/wallet/autonomous-wallet.d.ts.map +1 -1
- package/dist/wallet/autonomous-wallet.js +12 -145
- package/dist/wallet/autonomous-wallet.js.map +1 -1
- package/dist/wallet/cdp-sdk.d.ts +23 -0
- package/dist/wallet/cdp-sdk.d.ts.map +1 -0
- package/dist/wallet/cdp-sdk.js +27 -0
- package/dist/wallet/cdp-sdk.js.map +1 -0
- package/dist/wallet/encrypted-file-credential-store.d.ts +41 -0
- package/dist/wallet/encrypted-file-credential-store.d.ts.map +1 -0
- package/dist/wallet/encrypted-file-credential-store.js +221 -0
- package/dist/wallet/encrypted-file-credential-store.js.map +1 -0
- package/dist/wallet/provider.d.ts +1 -1
- package/dist/wallet/provider.d.ts.map +1 -1
- package/dist/wallet/provider.js +8 -3
- package/dist/wallet/provider.js.map +1 -1
- package/dist/wallet/secret-service-probe.d.ts +56 -0
- package/dist/wallet/secret-service-probe.d.ts.map +1 -0
- package/dist/wallet/secret-service-probe.js +407 -0
- package/dist/wallet/secret-service-probe.js.map +1 -0
- package/dist/zktls/reclaim-js-sdk.d.ts +24 -0
- package/dist/zktls/reclaim-js-sdk.d.ts.map +1 -0
- package/dist/zktls/reclaim-js-sdk.js +29 -0
- package/dist/zktls/reclaim-js-sdk.js.map +1 -0
- package/dist/zktls/reclaim.d.ts +14 -2
- package/dist/zktls/reclaim.d.ts.map +1 -1
- package/dist/zktls/reclaim.js +29 -6
- package/dist/zktls/reclaim.js.map +1 -1
- package/dist/zktls/t2-delivery-proof.d.ts +8 -1
- package/dist/zktls/t2-delivery-proof.d.ts.map +1 -1
- package/dist/zktls/t2-delivery-proof.js +22 -6
- package/dist/zktls/t2-delivery-proof.js.map +1 -1
- package/docs/agent-layer.md +150 -0
- package/docs/autonomous-privy-wallet.md +133 -0
- package/docs/crewai.md +70 -0
- package/docs/eliza.md +109 -0
- package/docs/langchain.md +63 -0
- package/docs/mcp-hosted.md +137 -0
- package/docs/privy-embedded-wallet.md +102 -0
- package/docs/quickstart.md +370 -0
- package/docs/threat-model.md +160 -0
- package/package.json +19 -6
- package/src/discovery/registry.ts +242 -414
- package/src/frameworks/agentkit.ts +24 -5
- package/src/gateway/caller-auth-gateway.ts +281 -15
- package/src/gateway/http-server.ts +64 -0
- package/src/index.ts +24 -0
- package/src/wallet/autonomous-wallet-store.ts +487 -0
- package/src/wallet/autonomous-wallet.ts +57 -224
- package/src/wallet/cdp-sdk.ts +33 -0
- package/src/wallet/encrypted-file-credential-store.ts +341 -0
- package/src/wallet/provider.ts +16 -9
- package/src/wallet/secret-service-probe.ts +487 -0
- package/src/zktls/reclaim-js-sdk.ts +50 -0
- package/src/zktls/reclaim.ts +57 -23
- package/src/zktls/t2-delivery-proof.ts +28 -10
|
@@ -5,11 +5,12 @@ import {
|
|
|
5
5
|
type DeliveryReceipt,
|
|
6
6
|
type DeliveryReceiptDomainInput,
|
|
7
7
|
} from "@absol-labs/shared";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "@reclaimprotocol/js-sdk";
|
|
8
|
+
// `@reclaimprotocol/js-sdk` is an OPTIONAL peer dependency and this module IS
|
|
9
|
+
// reachable from the package barrel, so it may import TYPES only (erased at
|
|
10
|
+
// compile time); runtime values come from `loadReclaimJsSdk()` at first use.
|
|
11
|
+
// Enforced by the barrel-reachability guard in test/flat-install.test.ts.
|
|
12
|
+
import type { verifyProof } from "@reclaimprotocol/js-sdk";
|
|
13
|
+
import { loadReclaimJsSdk } from "./reclaim-js-sdk.js";
|
|
13
14
|
import {
|
|
14
15
|
keccak256,
|
|
15
16
|
stringToBytes,
|
|
@@ -167,7 +168,12 @@ const reclaimT2UrlSchema = z.string().url();
|
|
|
167
168
|
export class ReclaimDeliveryProofAttestor implements DeliveryProofAttestor {
|
|
168
169
|
private readonly client: ReclaimClientLike;
|
|
169
170
|
private readonly config: ReclaimProofServiceConfig;
|
|
170
|
-
|
|
171
|
+
/**
|
|
172
|
+
* Caller-supplied verifier, if any. NOT defaulted in the constructor: the real
|
|
173
|
+
* `verifyProof` lives in the optional peer, loaded lazily at first use so that
|
|
174
|
+
* constructing this service never requires the peer to be installed.
|
|
175
|
+
*/
|
|
176
|
+
private readonly verifyProofOverride: VerifyProofFn | undefined;
|
|
171
177
|
|
|
172
178
|
constructor(
|
|
173
179
|
config: ReclaimProofServiceConfig,
|
|
@@ -189,7 +195,13 @@ export class ReclaimDeliveryProofAttestor implements DeliveryProofAttestor {
|
|
|
189
195
|
this.config.applicationSecret,
|
|
190
196
|
this.config.logs ?? false,
|
|
191
197
|
);
|
|
192
|
-
this.
|
|
198
|
+
this.verifyProofOverride = options.verifyProof;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** Override if given, else the optional peer's `verifyProof`, loaded on demand. */
|
|
202
|
+
private async resolveVerifyProof(): Promise<VerifyProofFn> {
|
|
203
|
+
if (this.verifyProofOverride !== undefined) return this.verifyProofOverride;
|
|
204
|
+
return (await loadReclaimJsSdk()).verifyProof;
|
|
193
205
|
}
|
|
194
206
|
|
|
195
207
|
async proveDeliveryResponse(
|
|
@@ -245,8 +257,14 @@ export class ReclaimDeliveryProofAttestor implements DeliveryProofAttestor {
|
|
|
245
257
|
);
|
|
246
258
|
}
|
|
247
259
|
|
|
248
|
-
|
|
249
|
-
|
|
260
|
+
// Verifier and provider-hash helper both live in the optional peer; load once.
|
|
261
|
+
const [verifyProofFn, reclaimSdk] = await Promise.all([
|
|
262
|
+
this.resolveVerifyProof(),
|
|
263
|
+
loadReclaimJsSdk(),
|
|
264
|
+
]);
|
|
265
|
+
|
|
266
|
+
const verification = await verifyProofFn(proof, {
|
|
267
|
+
...reclaimSdk.getProviderHashRequirementsFromSpec({
|
|
250
268
|
requests: [toRequestSpec(parsed, method)],
|
|
251
269
|
}),
|
|
252
270
|
...(parsed.useTee === true
|
|
@@ -266,7 +284,7 @@ export class ReclaimDeliveryProofAttestor implements DeliveryProofAttestor {
|
|
|
266
284
|
);
|
|
267
285
|
}
|
|
268
286
|
|
|
269
|
-
const request = getHttpProviderClaimParamsFromProof(proof);
|
|
287
|
+
const request = reclaimSdk.getHttpProviderClaimParamsFromProof(proof);
|
|
270
288
|
return {
|
|
271
289
|
proof,
|
|
272
290
|
request: {
|