@vapi-network/mcp 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.
- package/README.md +135 -10
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7270 -1126
- package/dist/index.js.map +3 -3
- package/dist/server.d.ts +6 -4
- package/dist/siwx.d.ts +12 -0
- package/dist/tools/call.d.ts +6 -5
- package/dist/tools/inspect.d.ts +4 -1
- package/dist/tools/search.d.ts +1 -1
- package/dist/tools/wallet.d.ts +5 -2
- package/dist/x402.d.ts +3 -3
- package/package.json +2 -2
package/dist/server.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { type VapiConfig } from "@vapi-network/core";
|
|
2
|
-
import type { PrivateKeyAccount } from "viem/accounts";
|
|
1
|
+
import { type VapiPaymentAccount, type VapiConfig } from "@vapi-network/core";
|
|
3
2
|
import { z } from "zod";
|
|
4
3
|
import { callService, type CallToolInput, type CallToolResult } from "./tools/call.js";
|
|
5
4
|
export { callService, type CallToolInput, type CallToolResult };
|
|
6
5
|
export type VapiServerOptions = {
|
|
7
|
-
account:
|
|
6
|
+
account: VapiPaymentAccount;
|
|
8
7
|
config: VapiConfig;
|
|
9
8
|
fetchImpl?: typeof fetch;
|
|
10
9
|
ledgerPath?: string;
|
|
11
10
|
receiptsPath?: string;
|
|
12
11
|
searchesPath?: string;
|
|
12
|
+
reportsDirectory?: string;
|
|
13
13
|
};
|
|
14
14
|
type ToolResult = {
|
|
15
15
|
isError?: boolean;
|
|
@@ -52,7 +52,9 @@ export declare function loadServerConfig(): Promise<{
|
|
|
52
52
|
marketplaceDiscoveryUrl: string;
|
|
53
53
|
networks: Record<string, {
|
|
54
54
|
rpcUrl: string;
|
|
55
|
-
usdc:
|
|
55
|
+
usdc: string;
|
|
56
|
+
depositUrl?: string | undefined;
|
|
57
|
+
depositInstructions?: string | undefined;
|
|
56
58
|
eip712Domain?: {
|
|
57
59
|
name: string;
|
|
58
60
|
version: string;
|
package/dist/siwx.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SIWxChallenge, type SIWxSigner, type VapiConfig } from "@vapi-network/core";
|
|
2
|
+
export declare function parseSIWxResponse(response: Response, configuredNetworks: VapiConfig["networks"], responseUrl: string, requiredNetwork?: string): Promise<SIWxChallenge | null>;
|
|
3
|
+
export declare function buildSIWxProof(args: {
|
|
4
|
+
signer: SIWxSigner;
|
|
5
|
+
challenge: SIWxChallenge;
|
|
6
|
+
responseUrl: string;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
payload: import("@vapi-network/core").SIWxPayload;
|
|
9
|
+
headers: Readonly<{
|
|
10
|
+
"SIGN-IN-WITH-X": string;
|
|
11
|
+
}>;
|
|
12
|
+
}>;
|
package/dist/tools/call.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type LookupFn, type MarketplaceHit, type VapiConfig } from "@vapi-network/core";
|
|
2
|
-
import type { PrivateKeyAccount } from "viem/accounts";
|
|
1
|
+
import { type LookupFn, type MarketplaceHit, type VapiPaymentAccount, type VapiConfig } from "@vapi-network/core";
|
|
3
2
|
export type CallToolInput = {
|
|
4
3
|
id?: string;
|
|
5
4
|
url?: string;
|
|
@@ -17,8 +16,9 @@ export type PossibleSettlement = {
|
|
|
17
16
|
amountAtomic: string;
|
|
18
17
|
payTo: string;
|
|
19
18
|
payer: string;
|
|
20
|
-
authorizationNonce
|
|
21
|
-
authorizationExpiresAt
|
|
19
|
+
authorizationNonce?: string;
|
|
20
|
+
authorizationExpiresAt?: string;
|
|
21
|
+
authorizationTransaction?: string;
|
|
22
22
|
receipt: unknown | null;
|
|
23
23
|
};
|
|
24
24
|
export type PaymentRejection = {
|
|
@@ -43,6 +43,7 @@ export declare class VapiCallError extends Error {
|
|
|
43
43
|
export type CallToolResult = {
|
|
44
44
|
status: number;
|
|
45
45
|
body: unknown;
|
|
46
|
+
outcome?: "signed_in";
|
|
46
47
|
payment: null | {
|
|
47
48
|
network: string;
|
|
48
49
|
amountAtomic: string;
|
|
@@ -60,7 +61,7 @@ export type CallToolResult = {
|
|
|
60
61
|
export type CallServiceArgs = {
|
|
61
62
|
input: CallToolInput;
|
|
62
63
|
marketplaceHit?: MarketplaceHit;
|
|
63
|
-
account:
|
|
64
|
+
account: VapiPaymentAccount;
|
|
64
65
|
config: VapiConfig;
|
|
65
66
|
fetchImpl?: typeof fetch;
|
|
66
67
|
lookup?: LookupFn;
|
package/dist/tools/inspect.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DiscoveryEndpoint, type VapiConfig } from "@vapi-network/core";
|
|
1
|
+
import { type DiscoveryEndpoint, type ListingFee, type ListingGroup, type VapiConfig } from "@vapi-network/core";
|
|
2
2
|
export type InspectToolInput = {
|
|
3
3
|
id: string;
|
|
4
4
|
endpoint?: string;
|
|
@@ -6,6 +6,9 @@ export type InspectToolInput = {
|
|
|
6
6
|
export type InspectToolResult = Omit<Pick<DiscoveryEndpoint, "name" | "method" | "url" | "price" | "description" | "operationId" | "requestContentType" | "requestSchema" | "responseContentType">, "method"> & {
|
|
7
7
|
method: string | null;
|
|
8
8
|
network?: string;
|
|
9
|
+
/** Registry-owned listing disclosures; absent when the registry omits them. */
|
|
10
|
+
group?: ListingGroup;
|
|
11
|
+
fee?: ListingFee;
|
|
9
12
|
payment: DiscoveryEndpoint["payment"] | null;
|
|
10
13
|
};
|
|
11
14
|
export declare function inspectService(input: InspectToolInput, config: VapiConfig, fetchImpl?: typeof fetch): Promise<InspectToolResult>;
|
package/dist/tools/search.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { findMarketplaceApiByRef, resolveServiceEndpoint, searchMarketplace, type MarketplaceSearchInput, } from "@vapi-network/sources";
|
|
1
|
+
export { findMarketplaceApiByRef, resolveServiceEndpoint, resolveServiceListing, searchMarketplace, type MarketplaceSearchInput, } from "@vapi-network/sources";
|
package/dist/tools/wallet.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VapiConfig } from "@vapi-network/core";
|
|
1
|
+
import { type LookupFn, type VapiPaymentAccount, type VapiConfig } from "@vapi-network/core";
|
|
2
2
|
import type { Address } from "viem";
|
|
3
3
|
export type WalletBalance = {
|
|
4
4
|
network: string;
|
|
@@ -7,7 +7,10 @@ export type WalletBalance = {
|
|
|
7
7
|
usdc: string | null;
|
|
8
8
|
error?: string;
|
|
9
9
|
};
|
|
10
|
-
export declare function getWallet(
|
|
10
|
+
export declare function getWallet(account: Address | VapiPaymentAccount, config: VapiConfig, options?: {
|
|
11
|
+
fetchImpl?: typeof fetch;
|
|
12
|
+
lookup?: LookupFn;
|
|
13
|
+
}): Promise<{
|
|
11
14
|
address: Address;
|
|
12
15
|
balances: WalletBalance[];
|
|
13
16
|
}>;
|
package/dist/x402.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EIP3009_AUTHORIZATION_TYPES, X402Error, assertMaxPrice, buildEip3009TypedData, classifySettlement, parseSettlementResponse, usdToAtomic, type Eip3009Authorization, type X402PaymentHeaders as SharedX402PaymentHeaders, type X402PaymentPayload, type X402PaymentRequirements, type X402Quote, type X402Resource, type VapiConfig } from "@vapi-network/core";
|
|
1
|
+
import { EIP3009_AUTHORIZATION_TYPES, X402Error, assertMaxPrice, buildEip3009TypedData, classifySettlement, parseSettlementResponse, usdToAtomic, type Eip3009Authorization, type X402PaymentHeaders as SharedX402PaymentHeaders, type X402PaymentPayload, type X402PaymentRequirements, type X402Quote, type X402Resource, type X402Signer, type VapiConfig } from "@vapi-network/core";
|
|
2
2
|
import type { Hex } from "viem";
|
|
3
|
-
import type { PrivateKeyAccount } from "viem/accounts";
|
|
4
3
|
export { EIP3009_AUTHORIZATION_TYPES, X402Error, assertMaxPrice, buildEip3009TypedData, classifySettlement, parseSettlementResponse, usdToAtomic, };
|
|
5
4
|
export type { Eip3009Authorization, X402PaymentPayload, X402PaymentRequirements, X402Quote, X402Resource, };
|
|
6
5
|
export type X402PaymentHeaders = SharedX402PaymentHeaders & {
|
|
@@ -9,10 +8,11 @@ export type X402PaymentHeaders = SharedX402PaymentHeaders & {
|
|
|
9
8
|
export declare function parse402Challenge(challenge: unknown, configuredNetworks: VapiConfig["networks"], fallbackResourceUrl?: string, requiredNetwork?: string, expectedPayTo?: string): X402Quote;
|
|
10
9
|
export declare function parse402Response(response: Response, configuredNetworks: VapiConfig["networks"], requiredNetwork?: string, expectedPayTo?: string): Promise<X402Quote>;
|
|
11
10
|
export declare function buildX402Payment(args: {
|
|
12
|
-
account:
|
|
11
|
+
account: X402Signer;
|
|
13
12
|
quote: X402Quote;
|
|
14
13
|
nowSeconds?: number;
|
|
15
14
|
nonce?: Hex;
|
|
15
|
+
fetchImpl?: typeof fetch;
|
|
16
16
|
}): Promise<{
|
|
17
17
|
payload: X402PaymentPayload;
|
|
18
18
|
headers: X402PaymentHeaders;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vapi-network/mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Local, non-custodial MCP server for discovering and paying x402 APIs",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public",
|
|
32
|
-
"tag": "
|
|
32
|
+
"tag": "latest"
|
|
33
33
|
}
|
|
34
34
|
}
|