x402-express-mantle 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.
- package/README.md +155 -0
- package/lib/cjs/client/index.d.ts +243 -0
- package/lib/cjs/client/index.js +413 -0
- package/lib/cjs/client/index.js.map +1 -0
- package/lib/cjs/exact/client/index.d.ts +37 -0
- package/lib/cjs/exact/client/index.js +281 -0
- package/lib/cjs/exact/client/index.js.map +1 -0
- package/lib/cjs/exact/facilitator/index.d.ts +110 -0
- package/lib/cjs/exact/facilitator/index.js +714 -0
- package/lib/cjs/exact/facilitator/index.js.map +1 -0
- package/lib/cjs/exact/server/index.d.ts +87 -0
- package/lib/cjs/exact/server/index.js +209 -0
- package/lib/cjs/exact/server/index.js.map +1 -0
- package/lib/cjs/exact/v1/client/index.d.ts +33 -0
- package/lib/cjs/exact/v1/client/index.js +169 -0
- package/lib/cjs/exact/v1/client/index.js.map +1 -0
- package/lib/cjs/exact/v1/facilitator/index.d.ts +71 -0
- package/lib/cjs/exact/v1/facilitator/index.js +384 -0
- package/lib/cjs/exact/v1/facilitator/index.js.map +1 -0
- package/lib/cjs/facilitator/index.d.ts +192 -0
- package/lib/cjs/facilitator/index.js +398 -0
- package/lib/cjs/facilitator/index.js.map +1 -0
- package/lib/cjs/http/index.d.ts +52 -0
- package/lib/cjs/http/index.js +827 -0
- package/lib/cjs/http/index.js.map +1 -0
- package/lib/cjs/index.d.ts +145 -0
- package/lib/cjs/index.js +314 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/mechanisms-CzuGzYsS.d.ts +270 -0
- package/lib/cjs/scheme-MoBRXFM8.d.ts +29 -0
- package/lib/cjs/server/index.d.ts +2 -0
- package/lib/cjs/server/index.js +1305 -0
- package/lib/cjs/server/index.js.map +1 -0
- package/lib/cjs/signer-5OVDxViv.d.ts +79 -0
- package/lib/cjs/signer-BMkbhFYE.d.ts +123 -0
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +66 -0
- package/lib/cjs/types/index.js.map +1 -0
- package/lib/cjs/types/v1/index.d.ts +1 -0
- package/lib/cjs/types/v1/index.js +19 -0
- package/lib/cjs/types/v1/index.js.map +1 -0
- package/lib/cjs/utils/index.d.ts +48 -0
- package/lib/cjs/utils/index.js +116 -0
- package/lib/cjs/utils/index.js.map +1 -0
- package/lib/cjs/v1/index.d.ts +12 -0
- package/lib/cjs/v1/index.js +180 -0
- package/lib/cjs/v1/index.js.map +1 -0
- package/lib/cjs/x402HTTPResourceServer-D1YtlH_r.d.ts +719 -0
- package/lib/esm/chunk-3CEIVWNN.mjs +339 -0
- package/lib/esm/chunk-3CEIVWNN.mjs.map +1 -0
- package/lib/esm/chunk-BJTO5JO5.mjs +11 -0
- package/lib/esm/chunk-BJTO5JO5.mjs.map +1 -0
- package/lib/esm/chunk-EEA7DKZI.mjs +111 -0
- package/lib/esm/chunk-EEA7DKZI.mjs.map +1 -0
- package/lib/esm/chunk-FOUXRQAV.mjs +88 -0
- package/lib/esm/chunk-FOUXRQAV.mjs.map +1 -0
- package/lib/esm/chunk-IKSTWKEM.mjs +157 -0
- package/lib/esm/chunk-IKSTWKEM.mjs.map +1 -0
- package/lib/esm/chunk-JYZWCLMP.mjs +305 -0
- package/lib/esm/chunk-JYZWCLMP.mjs.map +1 -0
- package/lib/esm/chunk-PNSAJQCF.mjs +108 -0
- package/lib/esm/chunk-PNSAJQCF.mjs.map +1 -0
- package/lib/esm/chunk-PSA4YVU2.mjs +92 -0
- package/lib/esm/chunk-PSA4YVU2.mjs.map +1 -0
- package/lib/esm/chunk-QLXM7BIB.mjs +23 -0
- package/lib/esm/chunk-QLXM7BIB.mjs.map +1 -0
- package/lib/esm/chunk-TDLQZ6MP.mjs +86 -0
- package/lib/esm/chunk-TDLQZ6MP.mjs.map +1 -0
- package/lib/esm/chunk-VE37GDG2.mjs +7 -0
- package/lib/esm/chunk-VE37GDG2.mjs.map +1 -0
- package/lib/esm/chunk-WWACQNRQ.mjs +7 -0
- package/lib/esm/chunk-WWACQNRQ.mjs.map +1 -0
- package/lib/esm/chunk-X4W4S5RB.mjs +39 -0
- package/lib/esm/chunk-X4W4S5RB.mjs.map +1 -0
- package/lib/esm/chunk-Z4QX3O5V.mjs +748 -0
- package/lib/esm/chunk-Z4QX3O5V.mjs.map +1 -0
- package/lib/esm/chunk-ZYXTTU74.mjs +88 -0
- package/lib/esm/chunk-ZYXTTU74.mjs.map +1 -0
- package/lib/esm/client/index.d.mts +243 -0
- package/lib/esm/client/index.mjs +260 -0
- package/lib/esm/client/index.mjs.map +1 -0
- package/lib/esm/exact/client/index.d.mts +37 -0
- package/lib/esm/exact/client/index.mjs +36 -0
- package/lib/esm/exact/client/index.mjs.map +1 -0
- package/lib/esm/exact/facilitator/index.d.mts +110 -0
- package/lib/esm/exact/facilitator/index.mjs +350 -0
- package/lib/esm/exact/facilitator/index.mjs.map +1 -0
- package/lib/esm/exact/server/index.d.mts +87 -0
- package/lib/esm/exact/server/index.mjs +129 -0
- package/lib/esm/exact/server/index.mjs.map +1 -0
- package/lib/esm/exact/v1/client/index.d.mts +33 -0
- package/lib/esm/exact/v1/client/index.mjs +8 -0
- package/lib/esm/exact/v1/client/index.mjs.map +1 -0
- package/lib/esm/exact/v1/facilitator/index.d.mts +71 -0
- package/lib/esm/exact/v1/facilitator/index.mjs +8 -0
- package/lib/esm/exact/v1/facilitator/index.mjs.map +1 -0
- package/lib/esm/facilitator/index.d.mts +192 -0
- package/lib/esm/facilitator/index.mjs +373 -0
- package/lib/esm/facilitator/index.mjs.map +1 -0
- package/lib/esm/http/index.d.mts +52 -0
- package/lib/esm/http/index.mjs +29 -0
- package/lib/esm/http/index.mjs.map +1 -0
- package/lib/esm/index.d.mts +145 -0
- package/lib/esm/index.mjs +277 -0
- package/lib/esm/index.mjs.map +1 -0
- package/lib/esm/mechanisms-CzuGzYsS.d.mts +270 -0
- package/lib/esm/scheme-fjF-9LhT.d.mts +29 -0
- package/lib/esm/server/index.d.mts +2 -0
- package/lib/esm/server/index.mjs +563 -0
- package/lib/esm/server/index.mjs.map +1 -0
- package/lib/esm/signer-5OVDxViv.d.mts +79 -0
- package/lib/esm/signer-BMkbhFYE.d.mts +123 -0
- package/lib/esm/types/index.d.mts +1 -0
- package/lib/esm/types/index.mjs +10 -0
- package/lib/esm/types/index.mjs.map +1 -0
- package/lib/esm/types/v1/index.d.mts +1 -0
- package/lib/esm/types/v1/index.mjs +1 -0
- package/lib/esm/types/v1/index.mjs.map +1 -0
- package/lib/esm/utils/index.d.mts +48 -0
- package/lib/esm/utils/index.mjs +20 -0
- package/lib/esm/utils/index.mjs.map +1 -0
- package/lib/esm/v1/index.d.mts +12 -0
- package/lib/esm/v1/index.mjs +13 -0
- package/lib/esm/v1/index.mjs.map +1 -0
- package/lib/esm/x402HTTPResourceServer-BIfIK5HS.d.mts +719 -0
- package/package.json +39 -0
- package/src/index.js +4 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ClientEvmSigner - Used by x402 clients to sign payment authorizations
|
|
3
|
+
* This is typically a LocalAccount or wallet that holds private keys
|
|
4
|
+
* and can sign EIP-712 typed data for payment authorizations
|
|
5
|
+
*/
|
|
6
|
+
type ClientEvmSigner = {
|
|
7
|
+
readonly address: `0x${string}`;
|
|
8
|
+
signTypedData(message: {
|
|
9
|
+
domain: Record<string, unknown>;
|
|
10
|
+
types: Record<string, unknown>;
|
|
11
|
+
primaryType: string;
|
|
12
|
+
message: Record<string, unknown>;
|
|
13
|
+
}): Promise<`0x${string}`>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* FacilitatorEvmSigner - Used by x402 facilitators to verify and settle payments
|
|
17
|
+
* This is typically a viem PublicClient + WalletClient combination that can
|
|
18
|
+
* read contract state, verify signatures, write transactions, and wait for receipts
|
|
19
|
+
*
|
|
20
|
+
* Supports multiple addresses for load balancing, key rotation, and high availability
|
|
21
|
+
*/
|
|
22
|
+
type FacilitatorEvmSigner = {
|
|
23
|
+
/**
|
|
24
|
+
* Get all addresses this facilitator can use for signing
|
|
25
|
+
* Enables dynamic address selection for load balancing and key rotation
|
|
26
|
+
*/
|
|
27
|
+
getAddresses(): readonly `0x${string}`[];
|
|
28
|
+
readContract(args: {
|
|
29
|
+
address: `0x${string}`;
|
|
30
|
+
abi: readonly unknown[];
|
|
31
|
+
functionName: string;
|
|
32
|
+
args?: readonly unknown[];
|
|
33
|
+
}): Promise<unknown>;
|
|
34
|
+
verifyTypedData(args: {
|
|
35
|
+
address: `0x${string}`;
|
|
36
|
+
domain: Record<string, unknown>;
|
|
37
|
+
types: Record<string, unknown>;
|
|
38
|
+
primaryType: string;
|
|
39
|
+
message: Record<string, unknown>;
|
|
40
|
+
signature: `0x${string}`;
|
|
41
|
+
}): Promise<boolean>;
|
|
42
|
+
writeContract(args: {
|
|
43
|
+
address: `0x${string}`;
|
|
44
|
+
abi: readonly unknown[];
|
|
45
|
+
functionName: string;
|
|
46
|
+
args: readonly unknown[];
|
|
47
|
+
}): Promise<`0x${string}`>;
|
|
48
|
+
sendTransaction(args: {
|
|
49
|
+
to: `0x${string}`;
|
|
50
|
+
data: `0x${string}`;
|
|
51
|
+
}): Promise<`0x${string}`>;
|
|
52
|
+
waitForTransactionReceipt(args: {
|
|
53
|
+
hash: `0x${string}`;
|
|
54
|
+
}): Promise<{
|
|
55
|
+
status: string;
|
|
56
|
+
}>;
|
|
57
|
+
getCode(args: {
|
|
58
|
+
address: `0x${string}`;
|
|
59
|
+
}): Promise<`0x${string}` | undefined>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Converts a signer to a ClientEvmSigner
|
|
63
|
+
*
|
|
64
|
+
* @param signer - The signer to convert to a ClientEvmSigner
|
|
65
|
+
* @returns The converted signer
|
|
66
|
+
*/
|
|
67
|
+
declare function toClientEvmSigner(signer: ClientEvmSigner): ClientEvmSigner;
|
|
68
|
+
/**
|
|
69
|
+
* Converts a viem client with single address to a FacilitatorEvmSigner
|
|
70
|
+
* Wraps the single address in a getAddresses() function for compatibility
|
|
71
|
+
*
|
|
72
|
+
* @param client - The client to convert (must have 'address' property)
|
|
73
|
+
* @returns FacilitatorEvmSigner with getAddresses() support
|
|
74
|
+
*/
|
|
75
|
+
declare function toFacilitatorEvmSigner(client: Omit<FacilitatorEvmSigner, "getAddresses"> & {
|
|
76
|
+
address: `0x${string}`;
|
|
77
|
+
}): FacilitatorEvmSigner;
|
|
78
|
+
|
|
79
|
+
export { type ClientEvmSigner as C, type FacilitatorEvmSigner as F, toFacilitatorEvmSigner as a, toClientEvmSigner as t };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { TransactionSigner, MessagePartialSigner, RpcDevnet, SolanaRpcApiDevnet, RpcTestnet, SolanaRpcApiTestnet, RpcMainnet, SolanaRpcApiMainnet, Address } from '@solana/kit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Client-side signer for creating and signing Solana transactions
|
|
5
|
+
* This is a wrapper around TransactionSigner from @solana/kit
|
|
6
|
+
*/
|
|
7
|
+
type ClientSvmSigner = TransactionSigner;
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for client operations
|
|
10
|
+
*/
|
|
11
|
+
type ClientSvmConfig = {
|
|
12
|
+
/**
|
|
13
|
+
* Optional custom RPC URL for the client to use
|
|
14
|
+
*/
|
|
15
|
+
rpcUrl?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* RPC client type from @solana/kit
|
|
19
|
+
* Can be devnet, testnet, or mainnet RPC client
|
|
20
|
+
*/
|
|
21
|
+
type FacilitatorRpcClient = RpcDevnet<SolanaRpcApiDevnet> | RpcTestnet<SolanaRpcApiTestnet> | RpcMainnet<SolanaRpcApiMainnet>;
|
|
22
|
+
/**
|
|
23
|
+
* Minimal facilitator signer interface for SVM operations.
|
|
24
|
+
* Supports multiple signers for load balancing and high availability.
|
|
25
|
+
* All implementation details (RPC clients, key management, signature handling) are hidden.
|
|
26
|
+
*/
|
|
27
|
+
type FacilitatorSvmSigner = {
|
|
28
|
+
/**
|
|
29
|
+
* Get all addresses this facilitator can use as fee payers
|
|
30
|
+
* Enables dynamic address selection for load balancing and key rotation
|
|
31
|
+
*
|
|
32
|
+
* @returns Array of addresses available for signing
|
|
33
|
+
*/
|
|
34
|
+
getAddresses(): readonly Address[];
|
|
35
|
+
/**
|
|
36
|
+
* Sign a partially-signed transaction with the signer matching feePayer
|
|
37
|
+
* Transaction is decoded, signed, and re-encoded internally
|
|
38
|
+
*
|
|
39
|
+
* @param transaction - Base64 encoded partially-signed transaction
|
|
40
|
+
* @param feePayer - Fee payer address (determines which signer to use)
|
|
41
|
+
* @param network - CAIP-2 network identifier
|
|
42
|
+
* @returns Base64 encoded fully-signed transaction
|
|
43
|
+
* @throws Error if no signer exists for feePayer or signing fails
|
|
44
|
+
*/
|
|
45
|
+
signTransaction(transaction: string, feePayer: Address, network: string): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Simulate a signed transaction to verify it would succeed
|
|
48
|
+
* Implementation manages RPC client selection and simulation details
|
|
49
|
+
*
|
|
50
|
+
* @param transaction - Base64 encoded signed transaction
|
|
51
|
+
* @param network - CAIP-2 network identifier
|
|
52
|
+
* @throws Error if simulation fails
|
|
53
|
+
*/
|
|
54
|
+
simulateTransaction(transaction: string, network: string): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Send a signed transaction to the network
|
|
57
|
+
* Implementation manages RPC client selection and sending details
|
|
58
|
+
*
|
|
59
|
+
* @param transaction - Base64 encoded signed transaction
|
|
60
|
+
* @param network - CAIP-2 network identifier
|
|
61
|
+
* @returns Transaction signature
|
|
62
|
+
* @throws Error if send fails
|
|
63
|
+
*/
|
|
64
|
+
sendTransaction(transaction: string, network: string): Promise<string>;
|
|
65
|
+
/**
|
|
66
|
+
* Wait for transaction confirmation
|
|
67
|
+
* Allows signer to implement custom retry logic, timeouts, and confirmation strategies
|
|
68
|
+
*
|
|
69
|
+
* @param signature - Transaction signature to confirm
|
|
70
|
+
* @param network - CAIP-2 network identifier
|
|
71
|
+
* @returns Promise that resolves when transaction is confirmed
|
|
72
|
+
* @throws Error if confirmation fails or times out
|
|
73
|
+
*/
|
|
74
|
+
confirmTransaction(signature: string, network: string): Promise<void>;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Convert a signer to ClientSvmSigner (identity function for type safety)
|
|
78
|
+
*
|
|
79
|
+
* @param signer - The signer to convert
|
|
80
|
+
* @returns The signer as ClientSvmSigner
|
|
81
|
+
*/
|
|
82
|
+
declare function toClientSvmSigner(signer: ClientSvmSigner): ClientSvmSigner;
|
|
83
|
+
/**
|
|
84
|
+
* RPC configuration for the facilitator
|
|
85
|
+
* Can be a single RPC (all networks), a network mapping, or config options
|
|
86
|
+
*/
|
|
87
|
+
type FacilitatorRpcConfig = FacilitatorRpcClient | Record<string, FacilitatorRpcClient> | {
|
|
88
|
+
defaultRpcUrl?: string;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Create a FacilitatorSvmSigner from a TransactionSigner and optional RPC config
|
|
92
|
+
*
|
|
93
|
+
* @param signer - The TransactionSigner (e.g., from createKeyPairSignerFromBytes)
|
|
94
|
+
* @param rpcConfig - Optional RPC configuration (single RPC, per-network map, or config)
|
|
95
|
+
* @returns A complete FacilitatorSvmSigner
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* import { createKeyPairSignerFromBytes, createSolanaRpc, devnet } from "@solana/kit";
|
|
100
|
+
*
|
|
101
|
+
* // Option 1: No RPC - use defaults (SIMPLEST)
|
|
102
|
+
* const keypair = await createKeyPairSignerFromBytes(privateKeyBytes);
|
|
103
|
+
* const facilitator = toFacilitatorSvmSigner(keypair);
|
|
104
|
+
*
|
|
105
|
+
* // Option 2: Single RPC for all networks
|
|
106
|
+
* const rpc = createSolanaRpc(devnet("https://api.devnet.solana.com"));
|
|
107
|
+
* const facilitator = toFacilitatorSvmSigner(keypair, rpc);
|
|
108
|
+
*
|
|
109
|
+
* // Option 3: Per-network RPC (FLEXIBLE)
|
|
110
|
+
* const facilitator = toFacilitatorSvmSigner(keypair, {
|
|
111
|
+
* [SOLANA_MAINNET_CAIP2]: myQuickNodeRpc,
|
|
112
|
+
* // Devnet/testnet use defaults
|
|
113
|
+
* });
|
|
114
|
+
*
|
|
115
|
+
* // Option 4: Custom default RPC URL
|
|
116
|
+
* const facilitator = toFacilitatorSvmSigner(keypair, {
|
|
117
|
+
* defaultRpcUrl: "https://my-rpc.com"
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
declare function toFacilitatorSvmSigner(signer: TransactionSigner & MessagePartialSigner, rpcConfig?: FacilitatorRpcConfig): FacilitatorSvmSigner;
|
|
122
|
+
|
|
123
|
+
export { type ClientSvmSigner as C, type FacilitatorSvmSigner as F, type ClientSvmConfig as a, toFacilitatorSvmSigner as b, type FacilitatorRpcClient as c, type FacilitatorRpcConfig as d, toClientSvmSigner as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { A as AssetAmount, M as Money, t as MoneyParser, N as Network, P as PaymentPayload, k as PaymentPayloadV1, c as PaymentRequired, j as PaymentRequiredV1, a as PaymentRequirements, i as PaymentRequirementsV1, h as Price, R as ResourceServerExtension, d as SchemeNetworkClient, b as SchemeNetworkFacilitator, f as SchemeNetworkServer, s as SettleError, q as SettleRequest, S as SettleResponse, e as SupportedResponse, r as VerifyError, p as VerifyRequest, V as VerifyResponse } from '../mechanisms-CzuGzYsS.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { k as PaymentPayloadV1, j as PaymentRequiredV1, i as PaymentRequirementsV1, m as SettleRequestV1, n as SettleResponseV1, o as SupportedResponseV1, l as VerifyRequestV1 } from '../../mechanisms-CzuGzYsS.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { N as Network } from '../mechanisms-CzuGzYsS.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Scheme data structure for facilitator storage
|
|
5
|
+
*/
|
|
6
|
+
interface SchemeData<T> {
|
|
7
|
+
facilitator: T;
|
|
8
|
+
networks: Set<Network>;
|
|
9
|
+
pattern: Network;
|
|
10
|
+
}
|
|
11
|
+
declare const findSchemesByNetwork: <T>(map: Map<string, Map<string, T>>, network: Network) => Map<string, T> | undefined;
|
|
12
|
+
declare const findByNetworkAndScheme: <T>(map: Map<string, Map<string, T>>, scheme: string, network: Network) => T | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Finds a facilitator by scheme and network using pattern matching.
|
|
15
|
+
* Works with new SchemeData storage structure.
|
|
16
|
+
*
|
|
17
|
+
* @param schemeMap - Map of scheme names to SchemeData
|
|
18
|
+
* @param scheme - The scheme to find
|
|
19
|
+
* @param network - The network to match against
|
|
20
|
+
* @returns The facilitator if found, undefined otherwise
|
|
21
|
+
*/
|
|
22
|
+
declare const findFacilitatorBySchemeAndNetwork: <T>(schemeMap: Map<string, SchemeData<T>>, scheme: string, network: Network) => T | undefined;
|
|
23
|
+
declare const Base64EncodedRegex: RegExp;
|
|
24
|
+
/**
|
|
25
|
+
* Encodes a string to base64 format
|
|
26
|
+
*
|
|
27
|
+
* @param data - The string to be encoded to base64
|
|
28
|
+
* @returns The base64 encoded string
|
|
29
|
+
*/
|
|
30
|
+
declare function safeBase64Encode(data: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Decodes a base64 string back to its original format
|
|
33
|
+
*
|
|
34
|
+
* @param data - The base64 encoded string to be decoded
|
|
35
|
+
* @returns The decoded string in UTF-8 format
|
|
36
|
+
*/
|
|
37
|
+
declare function safeBase64Decode(data: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Deep equality comparison for payment requirements
|
|
40
|
+
* Uses a normalized JSON.stringify for consistent comparison
|
|
41
|
+
*
|
|
42
|
+
* @param obj1 - First object to compare
|
|
43
|
+
* @param obj2 - Second object to compare
|
|
44
|
+
* @returns True if objects are deeply equal
|
|
45
|
+
*/
|
|
46
|
+
declare function deepEqual(obj1: unknown, obj2: unknown): boolean;
|
|
47
|
+
|
|
48
|
+
export { Base64EncodedRegex, type SchemeData, deepEqual, findByNetworkAndScheme, findFacilitatorBySchemeAndNetwork, findSchemesByNetwork, safeBase64Decode, safeBase64Encode };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Base64EncodedRegex,
|
|
3
|
+
deepEqual,
|
|
4
|
+
findByNetworkAndScheme,
|
|
5
|
+
findFacilitatorBySchemeAndNetwork,
|
|
6
|
+
findSchemesByNetwork,
|
|
7
|
+
safeBase64Decode,
|
|
8
|
+
safeBase64Encode
|
|
9
|
+
} from "../chunk-TDLQZ6MP.mjs";
|
|
10
|
+
import "../chunk-BJTO5JO5.mjs";
|
|
11
|
+
export {
|
|
12
|
+
Base64EncodedRegex,
|
|
13
|
+
deepEqual,
|
|
14
|
+
findByNetworkAndScheme,
|
|
15
|
+
findFacilitatorBySchemeAndNetwork,
|
|
16
|
+
findSchemesByNetwork,
|
|
17
|
+
safeBase64Decode,
|
|
18
|
+
safeBase64Encode
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { ExactSvmSchemeV1 } from '../exact/v1/client/index.mjs';
|
|
2
|
+
import '@x402/core/types';
|
|
3
|
+
import '../signer-BMkbhFYE.mjs';
|
|
4
|
+
import '@solana/kit';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* V1 exports for the SVM mechanism
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
declare const NETWORKS: string[];
|
|
11
|
+
|
|
12
|
+
export { NETWORKS };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NETWORKS
|
|
3
|
+
} from "../chunk-WWACQNRQ.mjs";
|
|
4
|
+
import {
|
|
5
|
+
ExactSvmSchemeV1
|
|
6
|
+
} from "../chunk-EEA7DKZI.mjs";
|
|
7
|
+
import "../chunk-3CEIVWNN.mjs";
|
|
8
|
+
import "../chunk-IKSTWKEM.mjs";
|
|
9
|
+
export {
|
|
10
|
+
ExactSvmSchemeV1,
|
|
11
|
+
NETWORKS
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|