@vapi-network/core 0.2.0-dev.2 → 0.2.1

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.
@@ -0,0 +1,40 @@
1
+ import type { VapiConfig } from "./config.js";
2
+ import type { LookupFn } from "./net-guard.js";
3
+ export type AccountBalance = {
4
+ atomic: string;
5
+ formatted: string;
6
+ };
7
+ export type GasTokenBalance = AccountBalance & {
8
+ symbol: string;
9
+ };
10
+ export type AccountInfo = {
11
+ caip2: string;
12
+ name: string;
13
+ address: string;
14
+ usdcBalance: AccountBalance | null;
15
+ gasTokenBalance?: GasTokenBalance | null;
16
+ depositUrl?: string;
17
+ depositInstructions?: string;
18
+ error?: string;
19
+ };
20
+ export type AccountNetworkAdapterContext = {
21
+ caip2: string;
22
+ configured: VapiConfig["networks"][string];
23
+ defaultAddress: string;
24
+ allowPrivateNetwork?: boolean;
25
+ fetchImpl?: typeof fetch;
26
+ lookup?: LookupFn;
27
+ };
28
+ export type AccountNetworkAdapter = (context: AccountNetworkAdapterContext) => Promise<Omit<AccountInfo, "caip2">>;
29
+ export type ListAccountsArgs = {
30
+ address: string;
31
+ solanaAddress?: string;
32
+ config: VapiConfig;
33
+ fetchImpl?: typeof fetch;
34
+ lookup?: LookupFn;
35
+ /** Namespace adapters, keyed by the CAIP-2 namespace (for example `solana`). */
36
+ adapters?: Readonly<Record<string, AccountNetworkAdapter>>;
37
+ };
38
+ /** List deposit destinations and balances without needing access to a private key. */
39
+ export declare function listAccounts(args: ListAccountsArgs): Promise<AccountInfo[]>;
40
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAY/C,MAAM,MAAM,cAAc,GAA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C;AAKF,sFAAsF;AACtF,wBAAsB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAyCjF"}
@@ -2,20 +2,20 @@ import { z } from "zod";
2
2
  export declare const CALLABLE_KIND: "agent";
3
3
  export declare const CALLABLE_CATEGORIES: readonly ["ai", "data", "crypto", "compute", "search"];
4
4
  export declare const callableCategorySchema: z.ZodEnum<{
5
- ai: "ai";
6
5
  data: "data";
6
+ search: "search";
7
7
  crypto: "crypto";
8
+ ai: "ai";
8
9
  compute: "compute";
9
- search: "search";
10
10
  }>;
11
11
  export type CallableCategory = z.infer<typeof callableCategorySchema>;
12
12
  export declare const DISCOVERY_CATEGORIES: readonly ["ai", "data", "crypto", "compute", "search", "other"];
13
13
  export declare const discoveryCategorySchema: z.ZodEnum<{
14
- ai: "ai";
15
14
  data: "data";
15
+ search: "search";
16
16
  crypto: "crypto";
17
+ ai: "ai";
17
18
  compute: "compute";
18
- search: "search";
19
19
  other: "other";
20
20
  }>;
21
21
  export type DiscoveryCategory = z.infer<typeof discoveryCategorySchema>;
@@ -43,9 +43,9 @@ export declare const CALLABLE_CATEGORY_LABELS: {
43
43
  };
44
44
  export declare function isCallableListing(kind: string, category: string): boolean;
45
45
  export declare const serviceTierSchema: z.ZodEnum<{
46
+ partner: "partner";
46
47
  listed: "listed";
47
48
  verified: "verified";
48
- partner: "partner";
49
49
  }>;
50
50
  export type ServiceTier = z.infer<typeof serviceTierSchema>;
51
51
  export declare const discoveryEndpointSchema: z.ZodObject<{
@@ -66,26 +66,10 @@ export declare const discoveryEndpointSchema: z.ZodObject<{
66
66
  asset: z.ZodString;
67
67
  payTo: z.ZodString;
68
68
  checkedAt: z.ZodISODateTime;
69
- }, z.core.$strict>>;
70
- }, z.core.$strict>;
69
+ }, z.core.$loose>>;
70
+ }, z.core.$loose>;
71
71
  export type DiscoveryEndpoint = z.infer<typeof discoveryEndpointSchema>;
72
72
  export declare const serviceSummarySchema: z.ZodObject<{
73
- id: z.ZodString;
74
- name: z.ZodString;
75
- description: z.ZodString;
76
- category: z.ZodEnum<{
77
- ai: "ai";
78
- data: "data";
79
- crypto: "crypto";
80
- compute: "compute";
81
- search: "search";
82
- other: "other";
83
- }>;
84
- tier: z.ZodEnum<{
85
- listed: "listed";
86
- verified: "verified";
87
- partner: "partner";
88
- }>;
89
73
  verified: z.ZodBoolean;
90
74
  wrapped: z.ZodBoolean;
91
75
  price: z.ZodString;
@@ -108,28 +92,38 @@ export declare const serviceSummarySchema: z.ZodObject<{
108
92
  asset: z.ZodString;
109
93
  payTo: z.ZodString;
110
94
  checkedAt: z.ZodISODateTime;
111
- }, z.core.$strict>>;
112
- }, z.core.$strict>>;
113
- }, z.core.$strict>;
95
+ }, z.core.$loose>>;
96
+ }, z.core.$loose>>;
97
+ group: z.ZodOptional<z.ZodEnum<{
98
+ partner: "partner";
99
+ vapi: "vapi";
100
+ added: "added";
101
+ external: "external";
102
+ }>>;
103
+ fee: z.ZodOptional<z.ZodObject<{
104
+ bps: z.ZodNumber;
105
+ label: z.ZodString;
106
+ }, z.core.$loose>>;
107
+ id: z.ZodString;
108
+ name: z.ZodString;
109
+ description: z.ZodString;
110
+ category: z.ZodEnum<{
111
+ data: "data";
112
+ search: "search";
113
+ crypto: "crypto";
114
+ ai: "ai";
115
+ compute: "compute";
116
+ other: "other";
117
+ }>;
118
+ tier: z.ZodEnum<{
119
+ partner: "partner";
120
+ listed: "listed";
121
+ verified: "verified";
122
+ }>;
123
+ }, z.core.$loose>;
114
124
  export type ServiceSummary = z.infer<typeof serviceSummarySchema>;
115
125
  export declare const searchServicesResponseSchema: z.ZodObject<{
116
126
  services: z.ZodArray<z.ZodObject<{
117
- id: z.ZodString;
118
- name: z.ZodString;
119
- description: z.ZodString;
120
- category: z.ZodEnum<{
121
- ai: "ai";
122
- data: "data";
123
- crypto: "crypto";
124
- compute: "compute";
125
- search: "search";
126
- other: "other";
127
- }>;
128
- tier: z.ZodEnum<{
129
- listed: "listed";
130
- verified: "verified";
131
- partner: "partner";
132
- }>;
133
127
  verified: z.ZodBoolean;
134
128
  wrapped: z.ZodBoolean;
135
129
  price: z.ZodString;
@@ -152,29 +146,39 @@ export declare const searchServicesResponseSchema: z.ZodObject<{
152
146
  asset: z.ZodString;
153
147
  payTo: z.ZodString;
154
148
  checkedAt: z.ZodISODateTime;
155
- }, z.core.$strict>>;
156
- }, z.core.$strict>>;
157
- }, z.core.$strict>>;
158
- }, z.core.$strict>;
159
- export type SearchServicesResponse = z.infer<typeof searchServicesResponseSchema>;
160
- export declare const listServicesResponseSchema: z.ZodObject<{
161
- services: z.ZodArray<z.ZodObject<{
149
+ }, z.core.$loose>>;
150
+ }, z.core.$loose>>;
151
+ group: z.ZodOptional<z.ZodEnum<{
152
+ partner: "partner";
153
+ vapi: "vapi";
154
+ added: "added";
155
+ external: "external";
156
+ }>>;
157
+ fee: z.ZodOptional<z.ZodObject<{
158
+ bps: z.ZodNumber;
159
+ label: z.ZodString;
160
+ }, z.core.$loose>>;
162
161
  id: z.ZodString;
163
162
  name: z.ZodString;
164
163
  description: z.ZodString;
165
164
  category: z.ZodEnum<{
166
- ai: "ai";
167
165
  data: "data";
166
+ search: "search";
168
167
  crypto: "crypto";
168
+ ai: "ai";
169
169
  compute: "compute";
170
- search: "search";
171
170
  other: "other";
172
171
  }>;
173
172
  tier: z.ZodEnum<{
173
+ partner: "partner";
174
174
  listed: "listed";
175
175
  verified: "verified";
176
- partner: "partner";
177
176
  }>;
177
+ }, z.core.$loose>>;
178
+ }, z.core.$loose>;
179
+ export type SearchServicesResponse = z.infer<typeof searchServicesResponseSchema>;
180
+ export declare const listServicesResponseSchema: z.ZodObject<{
181
+ services: z.ZodArray<z.ZodObject<{
178
182
  verified: z.ZodBoolean;
179
183
  wrapped: z.ZodBoolean;
180
184
  price: z.ZodString;
@@ -197,28 +201,38 @@ export declare const listServicesResponseSchema: z.ZodObject<{
197
201
  asset: z.ZodString;
198
202
  payTo: z.ZodString;
199
203
  checkedAt: z.ZodISODateTime;
200
- }, z.core.$strict>>;
201
- }, z.core.$strict>>;
202
- }, z.core.$strict>>;
203
- }, z.core.$strict>;
204
+ }, z.core.$loose>>;
205
+ }, z.core.$loose>>;
206
+ group: z.ZodOptional<z.ZodEnum<{
207
+ partner: "partner";
208
+ vapi: "vapi";
209
+ added: "added";
210
+ external: "external";
211
+ }>>;
212
+ fee: z.ZodOptional<z.ZodObject<{
213
+ bps: z.ZodNumber;
214
+ label: z.ZodString;
215
+ }, z.core.$loose>>;
216
+ id: z.ZodString;
217
+ name: z.ZodString;
218
+ description: z.ZodString;
219
+ category: z.ZodEnum<{
220
+ data: "data";
221
+ search: "search";
222
+ crypto: "crypto";
223
+ ai: "ai";
224
+ compute: "compute";
225
+ other: "other";
226
+ }>;
227
+ tier: z.ZodEnum<{
228
+ partner: "partner";
229
+ listed: "listed";
230
+ verified: "verified";
231
+ }>;
232
+ }, z.core.$loose>>;
233
+ }, z.core.$loose>;
204
234
  export type ListServicesResponse = z.infer<typeof listServicesResponseSchema>;
205
235
  export declare const discoveryServiceSchema: z.ZodObject<{
206
- id: z.ZodString;
207
- name: z.ZodString;
208
- description: z.ZodString;
209
- category: z.ZodEnum<{
210
- ai: "ai";
211
- data: "data";
212
- crypto: "crypto";
213
- compute: "compute";
214
- search: "search";
215
- other: "other";
216
- }>;
217
- tier: z.ZodEnum<{
218
- listed: "listed";
219
- verified: "verified";
220
- partner: "partner";
221
- }>;
222
236
  verified: z.ZodBoolean;
223
237
  wrapped: z.ZodBoolean;
224
238
  price: z.ZodString;
@@ -241,28 +255,38 @@ export declare const discoveryServiceSchema: z.ZodObject<{
241
255
  asset: z.ZodString;
242
256
  payTo: z.ZodString;
243
257
  checkedAt: z.ZodISODateTime;
244
- }, z.core.$strict>>;
245
- }, z.core.$strict>>;
246
- }, z.core.$strict>;
258
+ }, z.core.$loose>>;
259
+ }, z.core.$loose>>;
260
+ group: z.ZodOptional<z.ZodEnum<{
261
+ partner: "partner";
262
+ vapi: "vapi";
263
+ added: "added";
264
+ external: "external";
265
+ }>>;
266
+ fee: z.ZodOptional<z.ZodObject<{
267
+ bps: z.ZodNumber;
268
+ label: z.ZodString;
269
+ }, z.core.$loose>>;
270
+ id: z.ZodString;
271
+ name: z.ZodString;
272
+ description: z.ZodString;
273
+ category: z.ZodEnum<{
274
+ data: "data";
275
+ search: "search";
276
+ crypto: "crypto";
277
+ ai: "ai";
278
+ compute: "compute";
279
+ other: "other";
280
+ }>;
281
+ tier: z.ZodEnum<{
282
+ partner: "partner";
283
+ listed: "listed";
284
+ verified: "verified";
285
+ }>;
286
+ }, z.core.$loose>;
247
287
  export type DiscoveryService = ServiceSummary;
248
288
  export declare const discoveryResponseSchema: z.ZodObject<{
249
289
  services: z.ZodArray<z.ZodObject<{
250
- id: z.ZodString;
251
- name: z.ZodString;
252
- description: z.ZodString;
253
- category: z.ZodEnum<{
254
- ai: "ai";
255
- data: "data";
256
- crypto: "crypto";
257
- compute: "compute";
258
- search: "search";
259
- other: "other";
260
- }>;
261
- tier: z.ZodEnum<{
262
- listed: "listed";
263
- verified: "verified";
264
- partner: "partner";
265
- }>;
266
290
  verified: z.ZodBoolean;
267
291
  wrapped: z.ZodBoolean;
268
292
  price: z.ZodString;
@@ -285,9 +309,35 @@ export declare const discoveryResponseSchema: z.ZodObject<{
285
309
  asset: z.ZodString;
286
310
  payTo: z.ZodString;
287
311
  checkedAt: z.ZodISODateTime;
288
- }, z.core.$strict>>;
289
- }, z.core.$strict>>;
290
- }, z.core.$strict>>;
291
- }, z.core.$strict>;
312
+ }, z.core.$loose>>;
313
+ }, z.core.$loose>>;
314
+ group: z.ZodOptional<z.ZodEnum<{
315
+ partner: "partner";
316
+ vapi: "vapi";
317
+ added: "added";
318
+ external: "external";
319
+ }>>;
320
+ fee: z.ZodOptional<z.ZodObject<{
321
+ bps: z.ZodNumber;
322
+ label: z.ZodString;
323
+ }, z.core.$loose>>;
324
+ id: z.ZodString;
325
+ name: z.ZodString;
326
+ description: z.ZodString;
327
+ category: z.ZodEnum<{
328
+ data: "data";
329
+ search: "search";
330
+ crypto: "crypto";
331
+ ai: "ai";
332
+ compute: "compute";
333
+ other: "other";
334
+ }>;
335
+ tier: z.ZodEnum<{
336
+ partner: "partner";
337
+ listed: "listed";
338
+ verified: "verified";
339
+ }>;
340
+ }, z.core.$loose>>;
341
+ }, z.core.$loose>;
292
342
  export type DiscoverServicesResult = SearchServicesResponse;
293
343
  //# sourceMappingURL=call-contracts-wire.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"call-contracts-wire.d.ts","sourceRoot":"","sources":["../src/call-contracts-wire.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,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;;;;;;;;;;;;;;;;;;;kBAqBlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAA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G,cAAc,CAAC;AAC9C,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA+B,CAAC;AACpE,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,CAAC"}
@@ -7,9 +7,19 @@ export declare class DiscoveryCatalogError extends Error {
7
7
  readonly serviceId: string | undefined;
8
8
  constructor(code: DiscoveryCatalogErrorCode, message: string, serviceId?: string);
9
9
  }
10
+ /**
11
+ * A resolved endpoint plus the service record that carried it. Listing-level
12
+ * disclosures such as `group` and `fee` live on the service, not the endpoint,
13
+ * so anything that has to show them needs both halves.
14
+ */
15
+ export type ResolvedListing = {
16
+ service: DiscoveryService;
17
+ endpoint: CallTarget;
18
+ };
10
19
  export type DiscoveryCatalog = {
11
20
  services: DiscoveryService[];
12
21
  resolve(serviceId: string, endpointName?: string): CallTarget;
22
+ resolveListing(serviceId: string, endpointName?: string): ResolvedListing;
13
23
  };
14
24
  export declare function parseDiscovery(raw: unknown): DiscoveryCatalog;
15
25
  //# sourceMappingURL=call-contracts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"call-contracts.d.ts","sourceRoot":"","sources":["../src/call-contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAE3C,MAAM,MAAM,yBAAyB,GACjC,aAAa,GACb,mBAAmB,GACnB,eAAe,GACf,cAAc,GACd,uBAAuB,GACvB,yBAAyB,GACzB,mBAAmB,GACnB,oBAAoB,GACpB,mBAAmB,CAAC;AAExB,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,2BAA2B;IACxC,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE3B,IAAI,EAA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AE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;CAC3E,CAAC;AAEF,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,CAsC7D"}
package/dist/config.d.ts CHANGED
@@ -3,8 +3,8 @@ export declare const DEFAULT_REGISTRY_URL = "https://api.vapinetwork.ai";
3
3
  export declare const DEFAULT_DISCOVERY_URL = "https://api.vapinetwork.ai/api/call/services";
4
4
  export declare const DEFAULT_MARKETPLACE_DISCOVERY_URL = "https://api.vapinetwork.ai/api/call/discovery";
5
5
  export declare const DEFAULT_REGISTRY_FALLBACKS: readonly [{
6
- readonly discoveryUrl: "https://console.vapinetwork.ai/api/network/services";
7
- readonly marketplaceDiscoveryUrl: "https://console.vapinetwork.ai/api/marketplace/discovery";
6
+ readonly discoveryUrl: "https://console.vapinetwork.ai/api/call/services";
7
+ readonly marketplaceDiscoveryUrl: "https://console.vapinetwork.ai/api/call/discovery";
8
8
  }];
9
9
  export declare const DEFAULT_SPEND_CAPS: {
10
10
  readonly perCallAtomic: "100000";
@@ -34,7 +34,9 @@ export declare const configSchema: z.ZodObject<{
34
34
  allowPrivateNetwork: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
35
35
  networks: z.ZodRecord<z.ZodString, z.ZodObject<{
36
36
  rpcUrl: z.ZodString;
37
- usdc: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
37
+ usdc: z.ZodString;
38
+ depositUrl: z.ZodOptional<z.ZodURL>;
39
+ depositInstructions: z.ZodOptional<z.ZodString>;
38
40
  eip712Domain: z.ZodOptional<z.ZodObject<{
39
41
  name: z.ZodString;
40
42
  version: z.ZodString;
@@ -63,8 +65,12 @@ export type MigrationOptions = {
63
65
  * either side. Returns the copied destination paths.
64
66
  */
65
67
  export declare function migrateLegacyVapiHome(options?: MigrationOptions): Promise<string[]>;
66
- export declare function getDefaultConfig(source?: NodeJS.ProcessEnv): VapiConfig;
68
+ export type DefaultConfigOptions = {
69
+ networks?: readonly string[];
70
+ };
71
+ export declare function getDefaultConfig(source?: NodeJS.ProcessEnv, options?: DefaultConfigOptions): VapiConfig;
67
72
  export declare function loadConfig(path?: string, source?: NodeJS.ProcessEnv): Promise<VapiConfig>;
68
- export declare function writeDefaultConfig(path?: string, source?: NodeJS.ProcessEnv): Promise<VapiConfig>;
73
+ export declare function writeDefaultConfig(path?: string, source?: NodeJS.ProcessEnv, options?: DefaultConfigOptions): Promise<VapiConfig>;
74
+ export declare function enableDefaultNetwork(network: "solana", path?: string, source?: NodeJS.ProcessEnv): Promise<VapiConfig>;
69
75
  export declare function isMissingFile(error: unknown): error is NodeJS.ErrnoException;
70
76
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB,+BAA+B,CAAC;AACjE,eAAO,MAAM,qBAAqB,iDAA8C,CAAC;AACjF,eAAO,MAAM,iCAAiC,kDAA+C,CAAC;AAC9F,eAAO,MAAM,0BAA0B;;;EAK7B,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,kFAAkF;AAClF,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC;AAGvC,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;iBAoCvB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAA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AAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA6B7F;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF,wBAAgB,gBAAgB,CAC9B,MAAM,GAAE,MAAM,CAAC,UAAwB,EACvC,OAAO,GAAE,oBAAyB,GACjC,UAAU,CAsCZ;AAED,wBAAsB,UAAU,CAC9B,IAAI,SAAwB,EAC5B,MAAM,GAAE,MAAM,CAAC,UAAwB,GACtC,OAAO,CAAC,UAAU,CAAC,CAmDrB;AAiBD,wBAAsB,kBAAkB,CACtC,IAAI,SAAwB,EAC5B,MAAM,GAAE,MAAM,CAAC,UAAwB,EACvC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,UAAU,CAAC,CAerB;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,QAAQ,EACjB,IAAI,SAAwB,EAC5B,MAAM,GAAE,MAAM,CAAC,UAAwB,GACtC,OAAO,CAAC,UAAU,CAAC,CAiBrB;AAYD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,cAAc,CAE5E"}
package/dist/index.d.ts CHANGED
@@ -1,17 +1,22 @@
1
1
  export * from "./call-contracts.js";
2
2
  export * from "./call-contracts-wire.js";
3
+ export * from "./accounts.js";
3
4
  export * from "./config.js";
4
5
  export * from "./discovery.js";
5
6
  export * from "./keystore.js";
6
7
  export * from "./marketplace-contracts.js";
7
8
  export * from "./net-guard.js";
8
9
  export * from "./networks.js";
10
+ export * from "./onramp.js";
9
11
  export * from "./policy.js";
10
12
  export * from "./receipts.js";
11
13
  export * from "./searches.js";
12
14
  export * from "./stats.js";
13
15
  export * from "./spend-policy.js";
16
+ export * from "./support-report.js";
14
17
  export * from "./sweep.js";
18
+ export * from "./siwx.js";
19
+ export * from "./svm.js";
15
20
  export * from "./wallet.js";
16
21
  export * from "./x402.js";
17
22
  export { BROWSER_ENABLED_X402_NETWORK_CONFIG, CANONICAL_X402_USDC_NETWORKS, getCanonicalX402Usdc, type CanonicalX402UsdcIdentity, type CanonicalX402UsdcNetwork, type X402NetworkConfig, type X402TokenDomain, } from "./x402-networks.js";
@@ -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,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,mCAAmC,EACnC,4BAA4B,EAC5B,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,oBAAoB,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,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AA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