@vapi-network/core 0.2.3 → 0.5.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 +18 -5
- package/dist/accounts.d.ts.map +1 -1
- package/dist/agent-guard.d.ts +40 -0
- package/dist/agent-guard.d.ts.map +1 -0
- package/dist/agent-link.d.ts +98 -0
- package/dist/agent-link.d.ts.map +1 -0
- package/dist/agent-link.js +1715 -0
- package/dist/agent-link.js.map +6 -0
- package/dist/agent-profile.d.ts +27 -0
- package/dist/agent-profile.d.ts.map +1 -0
- package/dist/api-key.d.ts +99 -0
- package/dist/api-key.d.ts.map +1 -0
- package/dist/api-key.js +20084 -0
- package/dist/api-key.js.map +6 -0
- package/dist/audit.d.ts +44 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/authorization-state.d.ts +58 -0
- package/dist/authorization-state.d.ts.map +1 -0
- package/dist/call-contracts-wire.d.ts +151 -11
- package/dist/call-contracts-wire.d.ts.map +1 -1
- package/dist/config.d.ts +10 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/discovery.d.ts +20 -2
- package/dist/discovery.d.ts.map +1 -1
- package/dist/hd.d.ts +33 -0
- package/dist/hd.d.ts.map +1 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25354 -954
- package/dist/index.js.map +3 -3
- package/dist/keystore.d.ts +94 -4
- package/dist/keystore.d.ts.map +1 -1
- package/dist/marketplace-contracts.d.ts +448 -15
- package/dist/marketplace-contracts.d.ts.map +1 -1
- package/dist/networks.d.ts +16 -2
- package/dist/networks.d.ts.map +1 -1
- package/dist/onramp.d.ts +12 -28
- package/dist/onramp.d.ts.map +1 -1
- package/dist/passphrase.d.ts +47 -0
- package/dist/passphrase.d.ts.map +1 -0
- package/dist/policy.d.ts +6 -0
- package/dist/policy.d.ts.map +1 -1
- package/dist/receipts.d.ts +40 -4
- package/dist/receipts.d.ts.map +1 -1
- package/dist/router-client.d.ts +117 -0
- package/dist/router-client.d.ts.map +1 -0
- package/dist/router-client.js +27421 -0
- package/dist/router-client.js.map +6 -0
- package/dist/secret-store.d.ts +60 -0
- package/dist/secret-store.d.ts.map +1 -0
- package/dist/secrets.d.ts +14 -0
- package/dist/secrets.d.ts.map +1 -0
- package/dist/secrets.js +47238 -0
- package/dist/secrets.js.map +6 -0
- package/dist/spend-policy.d.ts +13 -1
- package/dist/spend-policy.d.ts.map +1 -1
- package/dist/stats.d.ts +3 -2
- package/dist/stats.d.ts.map +1 -1
- package/dist/support-report.d.ts +1 -1
- package/dist/sweep.d.ts +4 -0
- package/dist/sweep.d.ts.map +1 -1
- package/dist/wallet-name.d.ts +18 -0
- package/dist/wallet-name.d.ts.map +1 -0
- package/dist/wallet-store.d.ts +220 -0
- package/dist/wallet-store.d.ts.map +1 -0
- package/dist/wallet.d.ts +0 -5
- package/dist/wallet.d.ts.map +1 -1
- package/dist/x402-networks.d.ts +6 -9
- package/dist/x402-networks.d.ts.map +1 -1
- package/dist/x402-pay.d.ts +131 -0
- package/dist/x402-pay.d.ts.map +1 -0
- package/dist/x402.d.ts +20 -1
- package/dist/x402.d.ts.map +1 -1
- package/package.json +17 -1
package/dist/audit.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The local trail of everything that touched a key or a wallet: one JSON line
|
|
3
|
+
* per event in `<home>/audit.log`, mode 0600. It exists so a person can answer
|
|
4
|
+
* "did anything export my phrase while the agent was running" without trusting
|
|
5
|
+
* the agent's own account of it.
|
|
6
|
+
*
|
|
7
|
+
* A line never contains a secret. It records what happened, to which wallet,
|
|
8
|
+
* its linked owner, whether a terminal was attached, and which agent marker
|
|
9
|
+
* was set — nothing that could help someone spend the wallet.
|
|
10
|
+
*/
|
|
11
|
+
export declare const AUDIT_EVENTS: readonly ["secret.export.phrase", "secret.export.key", "wallet.create", "wallet.import", "wallet.remove", "wallet.restore", "wallet.rename", "wallet.default", "wallet.caps", "wallet.unlock", "wallet.lock", "wallet.use.session", "passphrase.change", "auth.key.set", "auth.key.clear", "agent.linked", "agent.unlinked", "agent.run.start", "agent.run.step", "agent.run.pay", "agent.run.declined", "agent.run.end", "router.buy", "router.refill.declined", "listing.publish", "listing.status", "listing.claim"];
|
|
12
|
+
export type AuditEvent = (typeof AUDIT_EVENTS)[number];
|
|
13
|
+
export type AuditRecord = {
|
|
14
|
+
event: AuditEvent;
|
|
15
|
+
/** The wallet the event acted on, when one was selected. */
|
|
16
|
+
wallet?: string;
|
|
17
|
+
/** The owner wallet of a linked agent. Never an access token or Router key. */
|
|
18
|
+
owner?: string;
|
|
19
|
+
/** Whether a real terminal was attached when the event happened. */
|
|
20
|
+
tty: boolean;
|
|
21
|
+
/** The agent or CI variable that was set, if any. */
|
|
22
|
+
agentMarker?: string;
|
|
23
|
+
/** A short human note, such as a refusal or a new name. Never a secret. */
|
|
24
|
+
detail?: string;
|
|
25
|
+
};
|
|
26
|
+
export type AuditEntry = AuditRecord & {
|
|
27
|
+
time: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const AUDIT_FILE = "audit.log";
|
|
30
|
+
export type AuditOptions = {
|
|
31
|
+
/** Injected clock, so tests get a fixed timestamp. */
|
|
32
|
+
now?: () => Date;
|
|
33
|
+
};
|
|
34
|
+
export declare function auditLogPath(home: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Appends one line. Append-only from the client's point of view: nothing in
|
|
37
|
+
* vAPI ever rewrites or truncates this file, and a failure to write it must
|
|
38
|
+
* never be swallowed by the caller, since a missing line is the interesting
|
|
39
|
+
* case.
|
|
40
|
+
*/
|
|
41
|
+
export declare function appendAudit(home: string, record: AuditRecord, options?: AuditOptions): Promise<AuditEntry>;
|
|
42
|
+
/** The lines written so far, oldest first. An absent log reads as empty. */
|
|
43
|
+
export declare function readAuditLog(home: string): Promise<AuditEntry[]>;
|
|
44
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,yfAwCf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,GAAG,EAAE,OAAO,CAAC;IACb,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,eAAO,MAAM,UAAU,cAAc,CAAC;AAEtC,MAAM,MAAM,YAAY,GAAG;IACzB,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,UAAU,CAAC,CAgBrB;AAED,4EAA4E;AAC5E,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAYtE"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { VapiConfig } from "./config.js";
|
|
2
|
+
import type { LookupFn } from "./net-guard.js";
|
|
3
|
+
import type { Receipt } from "./receipts.js";
|
|
4
|
+
/**
|
|
5
|
+
* EIP-3009's own record of whether an authorization nonce was ever used. USDC
|
|
6
|
+
* implements it: `true` means a transfer with that nonce executed on-chain.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EIP3009_AUTHORIZATION_STATE_ABI: readonly [{
|
|
9
|
+
readonly type: "function";
|
|
10
|
+
readonly name: "authorizationState";
|
|
11
|
+
readonly stateMutability: "view";
|
|
12
|
+
readonly inputs: readonly [{
|
|
13
|
+
readonly name: "authorizer";
|
|
14
|
+
readonly type: "address";
|
|
15
|
+
}, {
|
|
16
|
+
readonly name: "nonce";
|
|
17
|
+
readonly type: "bytes32";
|
|
18
|
+
}];
|
|
19
|
+
readonly outputs: readonly [{
|
|
20
|
+
readonly name: "";
|
|
21
|
+
readonly type: "bool";
|
|
22
|
+
}];
|
|
23
|
+
}];
|
|
24
|
+
/**
|
|
25
|
+
* What the chain says about a signed payment whose response was lost:
|
|
26
|
+
*
|
|
27
|
+
* - `settled`: the nonce was used. EIP-3009 also marks a cancelled
|
|
28
|
+
* authorization as used, but this client never cancels, so in practice the
|
|
29
|
+
* payment went through; paying again pays twice.
|
|
30
|
+
* - `expired`: never used, and the chain is past `validBefore`, so it never can
|
|
31
|
+
* be. Paying again is safe.
|
|
32
|
+
* - `pending`: never used yet, but still valid. It may still settle; wait for
|
|
33
|
+
* `validBefore` and check again.
|
|
34
|
+
*/
|
|
35
|
+
export type AuthorizationState = "settled" | "expired" | "pending";
|
|
36
|
+
export type ReceiptSettlementCheck = {
|
|
37
|
+
network: string;
|
|
38
|
+
token: string;
|
|
39
|
+
authorizer: string;
|
|
40
|
+
nonce: string;
|
|
41
|
+
validBefore: string;
|
|
42
|
+
/** The latest block's timestamp the verdict was taken at, in Unix seconds. */
|
|
43
|
+
chainTime: string;
|
|
44
|
+
state: AuthorizationState;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Reads, from the chain itself, whether the payment a receipt signed has
|
|
48
|
+
* settled. Nothing is signed and nothing is paid.
|
|
49
|
+
*
|
|
50
|
+
* Expiry is judged against the latest block's timestamp rather than this
|
|
51
|
+
* machine's clock: a block at or past `validBefore` means no later block can
|
|
52
|
+
* include the authorization, so `expired` is final even on a skewed clock.
|
|
53
|
+
*/
|
|
54
|
+
export declare function checkReceiptSettlement(receipt: Receipt, config: Pick<VapiConfig, "networks" | "allowPrivateNetwork">, options?: {
|
|
55
|
+
fetchImpl?: typeof fetch;
|
|
56
|
+
lookup?: LookupFn;
|
|
57
|
+
}): Promise<ReceiptSettlementCheck>;
|
|
58
|
+
//# sourceMappingURL=authorization-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization-state.d.ts","sourceRoot":"","sources":["../src/authorization-state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;EAWlC,CAAC;AAEX;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnE,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,kBAAkB,CAAC;CAC3B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,qBAAqB,CAAC,EAC5D,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,QAAQ,CAAA;CAAO,GAC5D,OAAO,CAAC,sBAAsB,CAAC,CA6CjC"}
|
|
@@ -44,8 +44,8 @@ export declare const CALLABLE_CATEGORY_LABELS: {
|
|
|
44
44
|
export declare function isCallableListing(kind: string, category: string): boolean;
|
|
45
45
|
export declare const serviceTierSchema: z.ZodEnum<{
|
|
46
46
|
partner: "partner";
|
|
47
|
-
listed: "listed";
|
|
48
47
|
verified: "verified";
|
|
48
|
+
listed: "listed";
|
|
49
49
|
}>;
|
|
50
50
|
export type ServiceTier = z.infer<typeof serviceTierSchema>;
|
|
51
51
|
export declare const discoveryEndpointSchema: z.ZodObject<{
|
|
@@ -95,8 +95,8 @@ export declare const serviceSummarySchema: z.ZodObject<{
|
|
|
95
95
|
}, z.core.$loose>>;
|
|
96
96
|
}, z.core.$loose>>;
|
|
97
97
|
group: z.ZodOptional<z.ZodEnum<{
|
|
98
|
-
partner: "partner";
|
|
99
98
|
vapi: "vapi";
|
|
99
|
+
partner: "partner";
|
|
100
100
|
added: "added";
|
|
101
101
|
external: "external";
|
|
102
102
|
}>>;
|
|
@@ -104,6 +104,34 @@ export declare const serviceSummarySchema: z.ZodObject<{
|
|
|
104
104
|
bps: z.ZodNumber;
|
|
105
105
|
label: z.ZodString;
|
|
106
106
|
}, z.core.$loose>>;
|
|
107
|
+
verification: z.ZodCatch<z.ZodDefault<z.ZodEnum<{
|
|
108
|
+
none: "none";
|
|
109
|
+
requested: "requested";
|
|
110
|
+
verified: "verified";
|
|
111
|
+
}>>>;
|
|
112
|
+
liveness: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
113
|
+
uptime7d: z.ZodNumber;
|
|
114
|
+
latencyP50Ms: z.ZodNullable<z.ZodNumber>;
|
|
115
|
+
latencyP95Ms: z.ZodNullable<z.ZodNumber>;
|
|
116
|
+
checks7d: z.ZodNumber;
|
|
117
|
+
}, z.core.$loose>>>;
|
|
118
|
+
conformance: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
119
|
+
declaredVersion: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
120
|
+
versionConformant: z.ZodBoolean;
|
|
121
|
+
offerTransport: z.ZodEnum<{
|
|
122
|
+
body: "body";
|
|
123
|
+
header: "header";
|
|
124
|
+
both: "both";
|
|
125
|
+
}>;
|
|
126
|
+
issues: z.ZodArray<z.ZodString>;
|
|
127
|
+
}, z.core.$loose>>>;
|
|
128
|
+
identity: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
129
|
+
erc8004Id: z.ZodString;
|
|
130
|
+
reputation: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
131
|
+
score: z.ZodNumber;
|
|
132
|
+
count: z.ZodNumber;
|
|
133
|
+
}, z.core.$loose>>>;
|
|
134
|
+
}, z.core.$loose>>>;
|
|
107
135
|
id: z.ZodString;
|
|
108
136
|
name: z.ZodString;
|
|
109
137
|
description: z.ZodString;
|
|
@@ -117,8 +145,8 @@ export declare const serviceSummarySchema: z.ZodObject<{
|
|
|
117
145
|
}>;
|
|
118
146
|
tier: z.ZodEnum<{
|
|
119
147
|
partner: "partner";
|
|
120
|
-
listed: "listed";
|
|
121
148
|
verified: "verified";
|
|
149
|
+
listed: "listed";
|
|
122
150
|
}>;
|
|
123
151
|
}, z.core.$loose>;
|
|
124
152
|
export type ServiceSummary = z.infer<typeof serviceSummarySchema>;
|
|
@@ -149,8 +177,8 @@ export declare const searchServicesResponseSchema: z.ZodObject<{
|
|
|
149
177
|
}, z.core.$loose>>;
|
|
150
178
|
}, z.core.$loose>>;
|
|
151
179
|
group: z.ZodOptional<z.ZodEnum<{
|
|
152
|
-
partner: "partner";
|
|
153
180
|
vapi: "vapi";
|
|
181
|
+
partner: "partner";
|
|
154
182
|
added: "added";
|
|
155
183
|
external: "external";
|
|
156
184
|
}>>;
|
|
@@ -158,6 +186,34 @@ export declare const searchServicesResponseSchema: z.ZodObject<{
|
|
|
158
186
|
bps: z.ZodNumber;
|
|
159
187
|
label: z.ZodString;
|
|
160
188
|
}, z.core.$loose>>;
|
|
189
|
+
verification: z.ZodCatch<z.ZodDefault<z.ZodEnum<{
|
|
190
|
+
none: "none";
|
|
191
|
+
requested: "requested";
|
|
192
|
+
verified: "verified";
|
|
193
|
+
}>>>;
|
|
194
|
+
liveness: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
195
|
+
uptime7d: z.ZodNumber;
|
|
196
|
+
latencyP50Ms: z.ZodNullable<z.ZodNumber>;
|
|
197
|
+
latencyP95Ms: z.ZodNullable<z.ZodNumber>;
|
|
198
|
+
checks7d: z.ZodNumber;
|
|
199
|
+
}, z.core.$loose>>>;
|
|
200
|
+
conformance: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
201
|
+
declaredVersion: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
202
|
+
versionConformant: z.ZodBoolean;
|
|
203
|
+
offerTransport: z.ZodEnum<{
|
|
204
|
+
body: "body";
|
|
205
|
+
header: "header";
|
|
206
|
+
both: "both";
|
|
207
|
+
}>;
|
|
208
|
+
issues: z.ZodArray<z.ZodString>;
|
|
209
|
+
}, z.core.$loose>>>;
|
|
210
|
+
identity: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
211
|
+
erc8004Id: z.ZodString;
|
|
212
|
+
reputation: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
213
|
+
score: z.ZodNumber;
|
|
214
|
+
count: z.ZodNumber;
|
|
215
|
+
}, z.core.$loose>>>;
|
|
216
|
+
}, z.core.$loose>>>;
|
|
161
217
|
id: z.ZodString;
|
|
162
218
|
name: z.ZodString;
|
|
163
219
|
description: z.ZodString;
|
|
@@ -171,8 +227,8 @@ export declare const searchServicesResponseSchema: z.ZodObject<{
|
|
|
171
227
|
}>;
|
|
172
228
|
tier: z.ZodEnum<{
|
|
173
229
|
partner: "partner";
|
|
174
|
-
listed: "listed";
|
|
175
230
|
verified: "verified";
|
|
231
|
+
listed: "listed";
|
|
176
232
|
}>;
|
|
177
233
|
}, z.core.$loose>>;
|
|
178
234
|
}, z.core.$loose>;
|
|
@@ -204,8 +260,8 @@ export declare const listServicesResponseSchema: z.ZodObject<{
|
|
|
204
260
|
}, z.core.$loose>>;
|
|
205
261
|
}, z.core.$loose>>;
|
|
206
262
|
group: z.ZodOptional<z.ZodEnum<{
|
|
207
|
-
partner: "partner";
|
|
208
263
|
vapi: "vapi";
|
|
264
|
+
partner: "partner";
|
|
209
265
|
added: "added";
|
|
210
266
|
external: "external";
|
|
211
267
|
}>>;
|
|
@@ -213,6 +269,34 @@ export declare const listServicesResponseSchema: z.ZodObject<{
|
|
|
213
269
|
bps: z.ZodNumber;
|
|
214
270
|
label: z.ZodString;
|
|
215
271
|
}, z.core.$loose>>;
|
|
272
|
+
verification: z.ZodCatch<z.ZodDefault<z.ZodEnum<{
|
|
273
|
+
none: "none";
|
|
274
|
+
requested: "requested";
|
|
275
|
+
verified: "verified";
|
|
276
|
+
}>>>;
|
|
277
|
+
liveness: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
278
|
+
uptime7d: z.ZodNumber;
|
|
279
|
+
latencyP50Ms: z.ZodNullable<z.ZodNumber>;
|
|
280
|
+
latencyP95Ms: z.ZodNullable<z.ZodNumber>;
|
|
281
|
+
checks7d: z.ZodNumber;
|
|
282
|
+
}, z.core.$loose>>>;
|
|
283
|
+
conformance: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
284
|
+
declaredVersion: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
285
|
+
versionConformant: z.ZodBoolean;
|
|
286
|
+
offerTransport: z.ZodEnum<{
|
|
287
|
+
body: "body";
|
|
288
|
+
header: "header";
|
|
289
|
+
both: "both";
|
|
290
|
+
}>;
|
|
291
|
+
issues: z.ZodArray<z.ZodString>;
|
|
292
|
+
}, z.core.$loose>>>;
|
|
293
|
+
identity: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
294
|
+
erc8004Id: z.ZodString;
|
|
295
|
+
reputation: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
296
|
+
score: z.ZodNumber;
|
|
297
|
+
count: z.ZodNumber;
|
|
298
|
+
}, z.core.$loose>>>;
|
|
299
|
+
}, z.core.$loose>>>;
|
|
216
300
|
id: z.ZodString;
|
|
217
301
|
name: z.ZodString;
|
|
218
302
|
description: z.ZodString;
|
|
@@ -226,8 +310,8 @@ export declare const listServicesResponseSchema: z.ZodObject<{
|
|
|
226
310
|
}>;
|
|
227
311
|
tier: z.ZodEnum<{
|
|
228
312
|
partner: "partner";
|
|
229
|
-
listed: "listed";
|
|
230
313
|
verified: "verified";
|
|
314
|
+
listed: "listed";
|
|
231
315
|
}>;
|
|
232
316
|
}, z.core.$loose>>;
|
|
233
317
|
}, z.core.$loose>;
|
|
@@ -258,8 +342,8 @@ export declare const discoveryServiceSchema: z.ZodObject<{
|
|
|
258
342
|
}, z.core.$loose>>;
|
|
259
343
|
}, z.core.$loose>>;
|
|
260
344
|
group: z.ZodOptional<z.ZodEnum<{
|
|
261
|
-
partner: "partner";
|
|
262
345
|
vapi: "vapi";
|
|
346
|
+
partner: "partner";
|
|
263
347
|
added: "added";
|
|
264
348
|
external: "external";
|
|
265
349
|
}>>;
|
|
@@ -267,6 +351,34 @@ export declare const discoveryServiceSchema: z.ZodObject<{
|
|
|
267
351
|
bps: z.ZodNumber;
|
|
268
352
|
label: z.ZodString;
|
|
269
353
|
}, z.core.$loose>>;
|
|
354
|
+
verification: z.ZodCatch<z.ZodDefault<z.ZodEnum<{
|
|
355
|
+
none: "none";
|
|
356
|
+
requested: "requested";
|
|
357
|
+
verified: "verified";
|
|
358
|
+
}>>>;
|
|
359
|
+
liveness: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
360
|
+
uptime7d: z.ZodNumber;
|
|
361
|
+
latencyP50Ms: z.ZodNullable<z.ZodNumber>;
|
|
362
|
+
latencyP95Ms: z.ZodNullable<z.ZodNumber>;
|
|
363
|
+
checks7d: z.ZodNumber;
|
|
364
|
+
}, z.core.$loose>>>;
|
|
365
|
+
conformance: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
366
|
+
declaredVersion: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
367
|
+
versionConformant: z.ZodBoolean;
|
|
368
|
+
offerTransport: z.ZodEnum<{
|
|
369
|
+
body: "body";
|
|
370
|
+
header: "header";
|
|
371
|
+
both: "both";
|
|
372
|
+
}>;
|
|
373
|
+
issues: z.ZodArray<z.ZodString>;
|
|
374
|
+
}, z.core.$loose>>>;
|
|
375
|
+
identity: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
376
|
+
erc8004Id: z.ZodString;
|
|
377
|
+
reputation: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
378
|
+
score: z.ZodNumber;
|
|
379
|
+
count: z.ZodNumber;
|
|
380
|
+
}, z.core.$loose>>>;
|
|
381
|
+
}, z.core.$loose>>>;
|
|
270
382
|
id: z.ZodString;
|
|
271
383
|
name: z.ZodString;
|
|
272
384
|
description: z.ZodString;
|
|
@@ -280,8 +392,8 @@ export declare const discoveryServiceSchema: z.ZodObject<{
|
|
|
280
392
|
}>;
|
|
281
393
|
tier: z.ZodEnum<{
|
|
282
394
|
partner: "partner";
|
|
283
|
-
listed: "listed";
|
|
284
395
|
verified: "verified";
|
|
396
|
+
listed: "listed";
|
|
285
397
|
}>;
|
|
286
398
|
}, z.core.$loose>;
|
|
287
399
|
export type DiscoveryService = ServiceSummary;
|
|
@@ -312,8 +424,8 @@ export declare const discoveryResponseSchema: z.ZodObject<{
|
|
|
312
424
|
}, z.core.$loose>>;
|
|
313
425
|
}, z.core.$loose>>;
|
|
314
426
|
group: z.ZodOptional<z.ZodEnum<{
|
|
315
|
-
partner: "partner";
|
|
316
427
|
vapi: "vapi";
|
|
428
|
+
partner: "partner";
|
|
317
429
|
added: "added";
|
|
318
430
|
external: "external";
|
|
319
431
|
}>>;
|
|
@@ -321,6 +433,34 @@ export declare const discoveryResponseSchema: z.ZodObject<{
|
|
|
321
433
|
bps: z.ZodNumber;
|
|
322
434
|
label: z.ZodString;
|
|
323
435
|
}, z.core.$loose>>;
|
|
436
|
+
verification: z.ZodCatch<z.ZodDefault<z.ZodEnum<{
|
|
437
|
+
none: "none";
|
|
438
|
+
requested: "requested";
|
|
439
|
+
verified: "verified";
|
|
440
|
+
}>>>;
|
|
441
|
+
liveness: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
442
|
+
uptime7d: z.ZodNumber;
|
|
443
|
+
latencyP50Ms: z.ZodNullable<z.ZodNumber>;
|
|
444
|
+
latencyP95Ms: z.ZodNullable<z.ZodNumber>;
|
|
445
|
+
checks7d: z.ZodNumber;
|
|
446
|
+
}, z.core.$loose>>>;
|
|
447
|
+
conformance: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
448
|
+
declaredVersion: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
449
|
+
versionConformant: z.ZodBoolean;
|
|
450
|
+
offerTransport: z.ZodEnum<{
|
|
451
|
+
body: "body";
|
|
452
|
+
header: "header";
|
|
453
|
+
both: "both";
|
|
454
|
+
}>;
|
|
455
|
+
issues: z.ZodArray<z.ZodString>;
|
|
456
|
+
}, z.core.$loose>>>;
|
|
457
|
+
identity: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
458
|
+
erc8004Id: z.ZodString;
|
|
459
|
+
reputation: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
460
|
+
score: z.ZodNumber;
|
|
461
|
+
count: z.ZodNumber;
|
|
462
|
+
}, z.core.$loose>>>;
|
|
463
|
+
}, z.core.$loose>>>;
|
|
324
464
|
id: z.ZodString;
|
|
325
465
|
name: z.ZodString;
|
|
326
466
|
description: z.ZodString;
|
|
@@ -334,8 +474,8 @@ export declare const discoveryResponseSchema: z.ZodObject<{
|
|
|
334
474
|
}>;
|
|
335
475
|
tier: z.ZodEnum<{
|
|
336
476
|
partner: "partner";
|
|
337
|
-
listed: "listed";
|
|
338
477
|
verified: "verified";
|
|
478
|
+
listed: "listed";
|
|
339
479
|
}>;
|
|
340
480
|
}, z.core.$loose>>;
|
|
341
481
|
}, z.core.$loose>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-contracts-wire.d.ts","sourceRoot":"","sources":["../src/call-contracts-wire.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa,EAAG,OAAgB,CAAC;AAC9C,eAAO,MAAM,mBAAmB,wDAAyD,CAAC;AAE1F,eAAO,MAAM,sBAAsB;;;;;;EAA8B,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAKtE,eAAO,MAAM,oBAAoB,iEAA6C,CAAC;AAC/E,eAAO,MAAM,uBAAuB;;;;;;;EAA+B,CAAC;AACpE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;CAM8C,CAAC;AAIpF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzE;AAED,eAAO,MAAM,iBAAiB;;;;EAA4C,CAAC;AAC3E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;iBAqBlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA+B,CAAC;AACvE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAG9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAuB,CAAC;AAC3D,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAC9C,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA+B,CAAC;AACpE,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -6,12 +6,21 @@ export declare const DEFAULT_REGISTRY_FALLBACKS: readonly [{
|
|
|
6
6
|
readonly discoveryUrl: "https://api.vapinetwork.ai/api/call/services";
|
|
7
7
|
readonly marketplaceDiscoveryUrl: "https://api.vapinetwork.ai/api/call/discovery";
|
|
8
8
|
}];
|
|
9
|
+
/**
|
|
10
|
+
* The caps a wallet starts with. Since 0.3.0 the caps that are enforced belong
|
|
11
|
+
* to the wallet entry in `wallets.json`, not to `config.json`: an agent wallet
|
|
12
|
+
* can have a small daily cap while the owner's has a large one. `spendCaps`
|
|
13
|
+
* stays in `config.json` so 0.2.x files keep parsing, and it is still the
|
|
14
|
+
* fallback for a home that has no wallet registry yet — see
|
|
15
|
+
* `spendCapsForWallet` in `wallet-store.ts`.
|
|
16
|
+
*/
|
|
9
17
|
export declare const DEFAULT_SPEND_CAPS: {
|
|
10
18
|
readonly perCallAtomic: "100000";
|
|
11
19
|
readonly perDayAtomic: "1000000";
|
|
12
20
|
};
|
|
13
21
|
export type VapiPaths = {
|
|
14
22
|
directory: string;
|
|
23
|
+
agentsDir: string;
|
|
15
24
|
config: string;
|
|
16
25
|
keystore: string;
|
|
17
26
|
receipts: string;
|
|
@@ -100,6 +109,6 @@ export type LoadConfigOptions = {
|
|
|
100
109
|
};
|
|
101
110
|
export declare function loadConfig(path?: string, source?: NodeJS.ProcessEnv, options?: LoadConfigOptions): Promise<VapiConfig>;
|
|
102
111
|
export declare function writeDefaultConfig(path?: string, source?: NodeJS.ProcessEnv, options?: DefaultConfigOptions): Promise<VapiConfig>;
|
|
103
|
-
export declare function enableDefaultNetwork(network: "solana", path?: string, source?: NodeJS.ProcessEnv): Promise<VapiConfig>;
|
|
112
|
+
export declare function enableDefaultNetwork(network: "solana" | "arc", path?: string, source?: NodeJS.ProcessEnv): Promise<VapiConfig>;
|
|
104
113
|
export declare function isMissingFile(error: unknown): error is NodeJS.ErrnoException;
|
|
105
114
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,oBAAoB,+BAA+B,CAAC;AACjE,eAAO,MAAM,qBAAqB,iDAA8C,CAAC;AACjF,eAAO,MAAM,iCAAiC,kDAA+C,CAAC;AAI9F,eAAO,MAAM,0BAA0B;;;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,MAAM,GAAE,MAAM,CAAC,UAAwB,GACtC,OAAO,CAAC,UAAU,CAAC,CAgBrB;AAmDD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,cAAc,CAE5E"}
|
package/dist/discovery.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { X402Resource } from "./x402.js";
|
|
2
|
+
import type { ListingVerification } from "./marketplace-contracts.js";
|
|
2
3
|
export type ListingProvenance = Readonly<{
|
|
3
4
|
/** Stable adapter identifier such as `vapi`, `bazaar`, or `local`. */
|
|
4
5
|
source: string;
|
|
@@ -17,12 +18,29 @@ export interface Listing {
|
|
|
17
18
|
/** Raw x402 accepts entries; source adapters intentionally tolerate new schemes. */
|
|
18
19
|
readonly accepts?: readonly unknown[];
|
|
19
20
|
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
21
|
+
/**
|
|
22
|
+
* How far the listing got through vAPI review, when its catalog says. A
|
|
23
|
+
* catalog that has no notion of vAPI verification leaves it undefined rather
|
|
24
|
+
* than claiming `none`.
|
|
25
|
+
*/
|
|
26
|
+
readonly verification?: ListingVerification;
|
|
20
27
|
readonly provenance: readonly ListingProvenance[];
|
|
21
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* What a caller may ask of every source at search time. A source that has no
|
|
31
|
+
* notion of an option ignores it rather than failing.
|
|
32
|
+
*/
|
|
33
|
+
export type SourceSearchOptions = Readonly<{
|
|
34
|
+
/**
|
|
35
|
+
* Include self-listed APIs vAPI has not verified. Default results are
|
|
36
|
+
* vAPI-verified listings plus mirrored external catalogs.
|
|
37
|
+
*/
|
|
38
|
+
includeUnverified?: boolean;
|
|
39
|
+
}>;
|
|
22
40
|
/** Discovery adapter seam. A null inspect result means the reference is unknown. */
|
|
23
41
|
export interface Source {
|
|
24
42
|
readonly id: string;
|
|
25
|
-
search(query?: string): Promise<Listing[]>;
|
|
43
|
+
search(query?: string, options?: SourceSearchOptions): Promise<Listing[]>;
|
|
26
44
|
inspect(ref: string): Promise<Listing | null>;
|
|
27
45
|
}
|
|
28
46
|
/**
|
|
@@ -37,7 +55,7 @@ export declare function discover(sources: readonly Source[], query?: string, opt
|
|
|
37
55
|
searchesPath?: string;
|
|
38
56
|
now?: Date;
|
|
39
57
|
nowMs?: () => number;
|
|
40
|
-
}): Promise<{
|
|
58
|
+
} & SourceSearchOptions): Promise<{
|
|
41
59
|
listings: Listing[];
|
|
42
60
|
errors: ReadonlyArray<{
|
|
43
61
|
source: string;
|
package/dist/discovery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACvC,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAEH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,oF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M,EAAE,aAAa,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAoD7F"}
|
package/dist/hd.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Hex } from "viem";
|
|
2
|
+
/** BIP-44 first account on Base and every other EVM chain. */
|
|
3
|
+
export declare const EVM_DERIVATION_PATH = "m/44'/60'/0'/0/0";
|
|
4
|
+
/** SLIP-0010 ed25519 path Phantom and Solflare use for the first account. */
|
|
5
|
+
export declare const SOLANA_DERIVATION_PATH = "m/44'/501'/0'/0'";
|
|
6
|
+
/** A fresh 12-word English BIP-39 phrase. The only place new wallets start. */
|
|
7
|
+
export declare function generateRecoveryPhrase(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Normalises spacing and case, then checks the BIP-39 checksum. Returns the
|
|
10
|
+
* canonical phrase so callers store and derive from one spelling. The phrase
|
|
11
|
+
* itself never appears in the error.
|
|
12
|
+
*/
|
|
13
|
+
export declare function validateRecoveryPhrase(phrase: string): string;
|
|
14
|
+
/** The 64-byte BIP-39 seed, with an empty BIP-39 passphrase. */
|
|
15
|
+
export declare function phraseToSeed(phrase: string): Uint8Array;
|
|
16
|
+
/** The BIP-39 entropy behind a phrase: 16 bytes for 12 words, 32 for 24. */
|
|
17
|
+
export declare function phraseToEntropy(phrase: string): Uint8Array;
|
|
18
|
+
/** The phrase that produced this entropy, so a wallet can be shown again. */
|
|
19
|
+
export declare function entropyToPhrase(entropy: Uint8Array): string;
|
|
20
|
+
/** secp256k1 key for the EVM account, BIP-32 over the BIP-39 seed. */
|
|
21
|
+
export declare function deriveEvmPrivateKey(seed: Uint8Array, path?: string): Hex;
|
|
22
|
+
/** 32-byte ed25519 seed for the Solana account, SLIP-0010 over the BIP-39 seed. */
|
|
23
|
+
export declare function deriveSolanaPrivateKey(seed: Uint8Array, path?: string): Uint8Array;
|
|
24
|
+
/**
|
|
25
|
+
* SLIP-0010 for the ed25519 curve: HMAC-SHA512 from the master key
|
|
26
|
+
* "ed25519 seed", hardened children only. Returns the chain code as well so the
|
|
27
|
+
* specification's test vectors can check every step.
|
|
28
|
+
*/
|
|
29
|
+
export declare function deriveEd25519Path(seed: Uint8Array, path: string): {
|
|
30
|
+
privateKey: Uint8Array;
|
|
31
|
+
chainCode: Uint8Array;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=hd.d.ts.map
|
package/dist/hd.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hd.d.ts","sourceRoot":"","sources":["../src/hd.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAIhC,8DAA8D;AAC9D,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AACtD,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AAMzD,+EAA+E;AAC/E,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAc7D;AAED,gEAAgE;AAChE,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAEvD;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAE1D;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAE3D;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,SAAsB,GAAG,GAAG,CAOrF;AAED,mFAAmF;AACnF,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,UAAU,EAChB,IAAI,SAAyB,GAC5B,UAAU,CAEZ;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,GACX;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,UAAU,CAAA;CAAE,CAoBnD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
export * from "./call-contracts.js";
|
|
2
2
|
export * from "./call-contracts-wire.js";
|
|
3
3
|
export * from "./accounts.js";
|
|
4
|
+
export * from "./agent-guard.js";
|
|
5
|
+
export * from "./agent-profile.js";
|
|
6
|
+
export type { AgentTokens, DeviceLinkStart, LinkResult } from "./agent-link.js";
|
|
7
|
+
export type { AgentRouterUsage, ChatMessage, ChatRequest, ChatResult, RouterModel, } from "./router-client.js";
|
|
8
|
+
export { buyRouterBalance } from "./router-client.js";
|
|
9
|
+
export * from "./audit.js";
|
|
10
|
+
export * from "./authorization-state.js";
|
|
4
11
|
export * from "./config.js";
|
|
5
12
|
export * from "./discovery.js";
|
|
6
|
-
export
|
|
13
|
+
export { deriveEvmPrivateKey, deriveSolanaPrivateKey, entropyToPhrase, EVM_DERIVATION_PATH, generateRecoveryPhrase, phraseToEntropy, phraseToSeed, SOLANA_DERIVATION_PATH, validateRecoveryPhrase, } from "./hd.js";
|
|
14
|
+
export { changeKeystorePassphrase, createKeystore, createKeystoreFromPrivateKey, enableSolanaKey, encryptPrivateKey, getKeystorePassphrase, KeystoreError, promptForSecret, readKeystoreAddress, readKeystoreVersion, unlockKeystore, validatePrivateKey, type AgentCashKeystore, type CreateKeystoreOptions, type LegacyVapiKeystore, type VapiKeystore, type VapiKeystoreV3, type VapiPaymentAccount, } from "./keystore.js";
|
|
7
15
|
export * from "./marketplace-contracts.js";
|
|
8
16
|
export * from "./net-guard.js";
|
|
9
17
|
export * from "./networks.js";
|
|
10
18
|
export * from "./onramp.js";
|
|
19
|
+
export * from "./passphrase.js";
|
|
11
20
|
export * from "./policy.js";
|
|
12
21
|
export * from "./receipts.js";
|
|
13
22
|
export * from "./searches.js";
|
|
23
|
+
export * from "./secret-store.js";
|
|
14
24
|
export * from "./stats.js";
|
|
15
25
|
export * from "./spend-policy.js";
|
|
16
26
|
export * from "./support-report.js";
|
|
@@ -18,6 +28,8 @@ export * from "./sweep.js";
|
|
|
18
28
|
export * from "./siwx.js";
|
|
19
29
|
export * from "./svm.js";
|
|
20
30
|
export * from "./wallet.js";
|
|
31
|
+
export * from "./wallet-store.js";
|
|
21
32
|
export * from "./x402.js";
|
|
22
|
-
export
|
|
33
|
+
export * from "./x402-pay.js";
|
|
34
|
+
export { ARC_MAINNET_CAIP2, BROWSER_ENABLED_X402_NETWORK_CONFIG, CANONICAL_X402_USDC_NETWORKS, getCanonicalX402Usdc, type CanonicalX402UsdcIdentity, type CanonicalX402UsdcNetwork, type X402NetworkConfig, type X402TokenDomain, } from "./x402-networks.js";
|
|
23
35
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAChF,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,YAAY,CAAC;AAC3B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