sf-x402x 0.6.6-patch.3
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 +60 -0
- package/dist/cjs/client/index.d.ts +64 -0
- package/dist/cjs/client/index.js +811 -0
- package/dist/cjs/client/index.js.map +1 -0
- package/dist/cjs/config-CFBSAuxW.d.ts +10 -0
- package/dist/cjs/config-Dfuvno71.d.ts +19 -0
- package/dist/cjs/facilitator/index.d.ts +42 -0
- package/dist/cjs/facilitator/index.js +1827 -0
- package/dist/cjs/facilitator/index.js.map +1 -0
- package/dist/cjs/index.d.ts +16 -0
- package/dist/cjs/index.js +2207 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/middleware-BcYD9vqv.d.ts +93 -0
- package/dist/cjs/middleware-DagbDyNz.d.ts +93 -0
- package/dist/cjs/network--RYzQfBg.d.ts +11 -0
- package/dist/cjs/network-BGTUrx-D.d.ts +11 -0
- package/dist/cjs/paywall/index.d.ts +30 -0
- package/dist/cjs/paywall/index.js +141 -0
- package/dist/cjs/paywall/index.js.map +1 -0
- package/dist/cjs/rpc-De2c0oKR.d.ts +35 -0
- package/dist/cjs/rpc-TVntAK7V.d.ts +35 -0
- package/dist/cjs/schemes/index.d.ts +298 -0
- package/dist/cjs/schemes/index.js +2121 -0
- package/dist/cjs/schemes/index.js.map +1 -0
- package/dist/cjs/shared/evm/index.d.ts +55 -0
- package/dist/cjs/shared/evm/index.js +910 -0
- package/dist/cjs/shared/evm/index.js.map +1 -0
- package/dist/cjs/shared/index.d.ts +181 -0
- package/dist/cjs/shared/index.js +667 -0
- package/dist/cjs/shared/index.js.map +1 -0
- package/dist/cjs/types/index.d.ts +1214 -0
- package/dist/cjs/types/index.js +1408 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/cjs/verify/index.d.ts +7 -0
- package/dist/cjs/verify/index.js +427 -0
- package/dist/cjs/verify/index.js.map +1 -0
- package/dist/cjs/wallet-BReyvAJs.d.ts +151 -0
- package/dist/cjs/wallet-BTqCm9Zp.d.ts +27 -0
- package/dist/cjs/wallet-DndoTf1_.d.ts +48 -0
- package/dist/cjs/x402Specs-7OH8g851.d.ts +1306 -0
- package/dist/cjs/x402Specs-CFX8TBKR.d.ts +1306 -0
- package/dist/esm/chunk-5UPAZUO6.mjs +90 -0
- package/dist/esm/chunk-5UPAZUO6.mjs.map +1 -0
- package/dist/esm/chunk-7CWEZNFA.mjs +812 -0
- package/dist/esm/chunk-7CWEZNFA.mjs.map +1 -0
- package/dist/esm/chunk-MWDK4RSB.mjs +620 -0
- package/dist/esm/chunk-MWDK4RSB.mjs.map +1 -0
- package/dist/esm/chunk-R2NI44QI.mjs +327 -0
- package/dist/esm/chunk-R2NI44QI.mjs.map +1 -0
- package/dist/esm/chunk-WS2W5DJT.mjs +58 -0
- package/dist/esm/chunk-WS2W5DJT.mjs.map +1 -0
- package/dist/esm/chunk-XZA3USQF.mjs +784 -0
- package/dist/esm/chunk-XZA3USQF.mjs.map +1 -0
- package/dist/esm/chunk-Z3INM7T4.mjs +106 -0
- package/dist/esm/chunk-Z3INM7T4.mjs.map +1 -0
- package/dist/esm/client/index.d.mts +64 -0
- package/dist/esm/client/index.mjs +17 -0
- package/dist/esm/client/index.mjs.map +1 -0
- package/dist/esm/config-CFBSAuxW.d.mts +10 -0
- package/dist/esm/config-Dfuvno71.d.mts +19 -0
- package/dist/esm/facilitator/index.d.mts +42 -0
- package/dist/esm/facilitator/index.mjs +14 -0
- package/dist/esm/facilitator/index.mjs.map +1 -0
- package/dist/esm/index.d.mts +16 -0
- package/dist/esm/index.mjs +28 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/middleware-CAOp-bv4.d.mts +93 -0
- package/dist/esm/network--RYzQfBg.d.mts +11 -0
- package/dist/esm/paywall/index.d.mts +30 -0
- package/dist/esm/paywall/index.mjs +46 -0
- package/dist/esm/paywall/index.mjs.map +1 -0
- package/dist/esm/rpc-22QIQWIu.d.mts +35 -0
- package/dist/esm/schemes/index.d.mts +298 -0
- package/dist/esm/schemes/index.mjs +16 -0
- package/dist/esm/schemes/index.mjs.map +1 -0
- package/dist/esm/shared/evm/index.d.mts +55 -0
- package/dist/esm/shared/evm/index.mjs +18 -0
- package/dist/esm/shared/evm/index.mjs.map +1 -0
- package/dist/esm/shared/index.d.mts +181 -0
- package/dist/esm/shared/index.mjs +31 -0
- package/dist/esm/shared/index.mjs.map +1 -0
- package/dist/esm/types/index.d.mts +1214 -0
- package/dist/esm/types/index.mjs +81 -0
- package/dist/esm/types/index.mjs.map +1 -0
- package/dist/esm/verify/index.d.mts +7 -0
- package/dist/esm/verify/index.mjs +105 -0
- package/dist/esm/verify/index.mjs.map +1 -0
- package/dist/esm/wallet-BReyvAJs.d.mts +151 -0
- package/dist/esm/wallet-BTqCm9Zp.d.mts +27 -0
- package/dist/esm/wallet-C9iHSQbd.d.mts +48 -0
- package/dist/esm/x402Specs-7OH8g851.d.mts +1306 -0
- package/package.json +152 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RpcDevnet, SolanaRpcApiDevnet, RpcMainnet, SolanaRpcApiMainnet, RpcSubscriptionsFromTransport, SolanaRpcSubscriptionsApi, RpcSubscriptionsTransportFromClusterUrl, ClusterUrl } from '@solana/kit';
|
|
2
|
+
import { N as Network } from './network--RYzQfBg.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates a Solana RPC client for the devnet network.
|
|
6
|
+
*
|
|
7
|
+
* @param url - Optional URL of the devnet network.
|
|
8
|
+
* @returns A Solana RPC client.
|
|
9
|
+
*/
|
|
10
|
+
declare function createDevnetRpcClient(url?: string): RpcDevnet<SolanaRpcApiDevnet>;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a Solana RPC client for the mainnet network.
|
|
13
|
+
*
|
|
14
|
+
* @param url - Optional URL of the mainnet network.
|
|
15
|
+
* @returns A Solana RPC client.
|
|
16
|
+
*/
|
|
17
|
+
declare function createMainnetRpcClient(url?: string): RpcMainnet<SolanaRpcApiMainnet>;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the RPC client for the given network.
|
|
20
|
+
*
|
|
21
|
+
* @param network - The network to get the RPC client for
|
|
22
|
+
* @param url - Optional URL of the network. If not provided, the default URL will be used.
|
|
23
|
+
* @returns The RPC client for the given network
|
|
24
|
+
*/
|
|
25
|
+
declare function getRpcClient(network: Network, url?: string): RpcDevnet<SolanaRpcApiDevnet> | RpcMainnet<SolanaRpcApiMainnet>;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the RPC subscriptions for the given network.
|
|
28
|
+
*
|
|
29
|
+
* @param network - The network to get the RPC subscriptions for
|
|
30
|
+
* @param url - Optional URL of the network. If not provided, the default URL will be used.
|
|
31
|
+
* @returns The RPC subscriptions for the given network
|
|
32
|
+
*/
|
|
33
|
+
declare function getRpcSubscriptions(network: Network, url?: string): RpcSubscriptionsFromTransport<SolanaRpcSubscriptionsApi, RpcSubscriptionsTransportFromClusterUrl<ClusterUrl>>;
|
|
34
|
+
|
|
35
|
+
export { createMainnetRpcClient as a, getRpcSubscriptions as b, createDevnetRpcClient as c, getRpcClient as g };
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { Address, Transport, Chain, LocalAccount, Account } from 'viem';
|
|
2
|
+
import { S as SignerWallet, C as ConnectedClient } from '../wallet-BReyvAJs.mjs';
|
|
3
|
+
import { P as PaymentRequirements, U as UnsignedPaymentPayload, a as PaymentPayload, u as VerifyResponse, S as SettleResponse, b as ErrorReasons, E as ExactSvmPayload } from '../x402Specs-7OH8g851.mjs';
|
|
4
|
+
import { X as X402Config } from '../config-Dfuvno71.mjs';
|
|
5
|
+
import { KeyPairSigner, signTransaction, RpcDevnet, SolanaRpcApiDevnet, RpcMainnet, SolanaRpcApiMainnet, SendTransactionApi, CompilableTransactionMessage, Instruction, AccountLookupMeta, AccountMeta } from '@solana/kit';
|
|
6
|
+
import { b as getRpcSubscriptions } from '../rpc-22QIQWIu.mjs';
|
|
7
|
+
import * as _solana_program_token from '@solana-program/token';
|
|
8
|
+
import { parseTransferCheckedInstruction } from '@solana-program/token-2022';
|
|
9
|
+
import 'viem/chains';
|
|
10
|
+
import 'zod';
|
|
11
|
+
import '../network--RYzQfBg.mjs';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Prepares an unsigned payment header with the given sender address and payment requirements.
|
|
15
|
+
*
|
|
16
|
+
* @param from - The sender's address from which the payment will be made
|
|
17
|
+
* @param x402Version - The version of the X402 protocol to use
|
|
18
|
+
* @param paymentRequirements - The payment requirements containing scheme and network information
|
|
19
|
+
* @returns An unsigned payment payload containing authorization details
|
|
20
|
+
*/
|
|
21
|
+
declare function preparePaymentHeader(from: Address, x402Version: number, paymentRequirements: PaymentRequirements): UnsignedPaymentPayload;
|
|
22
|
+
/**
|
|
23
|
+
* Signs a payment header using the provided client and payment requirements.
|
|
24
|
+
*
|
|
25
|
+
* @param client - The signer wallet instance used to sign the payment header
|
|
26
|
+
* @param paymentRequirements - The payment requirements containing scheme and network information
|
|
27
|
+
* @param unsignedPaymentHeader - The unsigned payment payload to be signed
|
|
28
|
+
* @returns A promise that resolves to the signed payment payload
|
|
29
|
+
*/
|
|
30
|
+
declare function signPaymentHeader<transport extends Transport, chain extends Chain>(client: SignerWallet<chain, transport> | LocalAccount, paymentRequirements: PaymentRequirements, unsignedPaymentHeader: UnsignedPaymentPayload): Promise<PaymentPayload>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a complete payment payload by preparing and signing a payment header.
|
|
33
|
+
*
|
|
34
|
+
* @param client - The signer wallet instance used to create and sign the payment
|
|
35
|
+
* @param x402Version - The version of the X402 protocol to use
|
|
36
|
+
* @param paymentRequirements - The payment requirements containing scheme and network information
|
|
37
|
+
* @returns A promise that resolves to the complete signed payment payload
|
|
38
|
+
*/
|
|
39
|
+
declare function createPayment<transport extends Transport, chain extends Chain>(client: SignerWallet<chain, transport> | LocalAccount, x402Version: number, paymentRequirements: PaymentRequirements): Promise<PaymentPayload>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates and encodes a payment header for the given client and payment requirements.
|
|
42
|
+
*
|
|
43
|
+
* @param client - The signer wallet instance used to create the payment header
|
|
44
|
+
* @param x402Version - The version of the X402 protocol to use
|
|
45
|
+
* @param paymentRequirements - The payment requirements containing scheme and network information
|
|
46
|
+
* @returns A promise that resolves to the encoded payment header string
|
|
47
|
+
*/
|
|
48
|
+
declare function createPaymentHeader$1(client: SignerWallet | LocalAccount, x402Version: number, paymentRequirements: PaymentRequirements): Promise<string>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Verifies a payment payload against the required payment details
|
|
52
|
+
*
|
|
53
|
+
* This function performs several verification steps:
|
|
54
|
+
* - Verifies protocol version compatibility
|
|
55
|
+
* - Validates the permit signature
|
|
56
|
+
* - Confirms USDC contract address is correct for the chain
|
|
57
|
+
* - Checks permit deadline is sufficiently in the future
|
|
58
|
+
* - Verifies client has sufficient USDC balance
|
|
59
|
+
* - Ensures payment amount meets required minimum
|
|
60
|
+
*
|
|
61
|
+
* @param client - The public client used for blockchain interactions
|
|
62
|
+
* @param payload - The signed payment payload containing transfer parameters and signature
|
|
63
|
+
* @param paymentRequirements - The payment requirements that the payload must satisfy
|
|
64
|
+
* @returns A ValidPaymentRequest indicating if the payment is valid and any invalidation reason
|
|
65
|
+
*/
|
|
66
|
+
declare function verify$1<transport extends Transport, chain extends Chain, account extends Account | undefined>(client: ConnectedClient<transport, chain, account>, payload: PaymentPayload, paymentRequirements: PaymentRequirements): Promise<VerifyResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Settles a payment by executing a USDC transferWithAuthorization transaction
|
|
69
|
+
*
|
|
70
|
+
* This function executes the actual USDC transfer using the signed authorization from the user.
|
|
71
|
+
* The facilitator wallet submits the transaction but does not need to hold or transfer any tokens itself.
|
|
72
|
+
*
|
|
73
|
+
* @param wallet - The facilitator wallet that will submit the transaction
|
|
74
|
+
* @param paymentPayload - The signed payment payload containing the transfer parameters and signature
|
|
75
|
+
* @param paymentRequirements - The original payment details that were used to create the payload
|
|
76
|
+
* @returns A PaymentExecutionResponse containing the transaction status and hash
|
|
77
|
+
*/
|
|
78
|
+
declare function settle$1<transport extends Transport, chain extends Chain>(wallet: SignerWallet<chain, transport>, paymentPayload: PaymentPayload, paymentRequirements: PaymentRequirements): Promise<SettleResponse>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Encodes a payment payload into a base64 string, ensuring bigint values are properly stringified
|
|
82
|
+
*
|
|
83
|
+
* @param payment - The payment payload to encode
|
|
84
|
+
* @returns A base64 encoded string representation of the payment payload
|
|
85
|
+
*/
|
|
86
|
+
declare function encodePayment(payment: PaymentPayload): string;
|
|
87
|
+
/**
|
|
88
|
+
* Decodes a base64 encoded payment string back into a PaymentPayload object
|
|
89
|
+
*
|
|
90
|
+
* @param payment - The base64 encoded payment string to decode
|
|
91
|
+
* @returns The decoded and validated PaymentPayload object
|
|
92
|
+
*/
|
|
93
|
+
declare function decodePayment(payment: string): PaymentPayload;
|
|
94
|
+
|
|
95
|
+
declare const index$2_createPayment: typeof createPayment;
|
|
96
|
+
declare const index$2_decodePayment: typeof decodePayment;
|
|
97
|
+
declare const index$2_encodePayment: typeof encodePayment;
|
|
98
|
+
declare const index$2_preparePaymentHeader: typeof preparePaymentHeader;
|
|
99
|
+
declare const index$2_signPaymentHeader: typeof signPaymentHeader;
|
|
100
|
+
declare namespace index$2 {
|
|
101
|
+
export { index$2_createPayment as createPayment, createPaymentHeader$1 as createPaymentHeader, index$2_decodePayment as decodePayment, index$2_encodePayment as encodePayment, index$2_preparePaymentHeader as preparePaymentHeader, settle$1 as settle, index$2_signPaymentHeader as signPaymentHeader, verify$1 as verify };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Settle the payment payload against the payment requirements.
|
|
106
|
+
* TODO: handle durable nonce lifetime transactions
|
|
107
|
+
*
|
|
108
|
+
* @param signer - The signer that will sign the transaction
|
|
109
|
+
* @param payload - The payment payload to settle
|
|
110
|
+
* @param paymentRequirements - The payment requirements to settle against
|
|
111
|
+
* @param config - Optional configuration for X402 operations (e.g., custom RPC URLs)
|
|
112
|
+
* @returns A SettleResponse indicating if the payment is settled and any error reason
|
|
113
|
+
*/
|
|
114
|
+
declare function settle(signer: KeyPairSigner, payload: PaymentPayload, paymentRequirements: PaymentRequirements, config?: X402Config): Promise<SettleResponse>;
|
|
115
|
+
/**
|
|
116
|
+
* Send a signed transaction to the RPC.
|
|
117
|
+
* TODO: should this be moved to the shared/svm/rpc.ts file?
|
|
118
|
+
*
|
|
119
|
+
* @param signedTransaction - The signed transaction to send
|
|
120
|
+
* @param rpc - The RPC client to use to send the transaction
|
|
121
|
+
* @param sendTxConfig - The configuration for the transaction send
|
|
122
|
+
* @returns The signature of the sent transaction
|
|
123
|
+
*/
|
|
124
|
+
declare function sendSignedTransaction(signedTransaction: Awaited<ReturnType<typeof signTransaction>>, rpc: RpcDevnet<SolanaRpcApiDevnet> | RpcMainnet<SolanaRpcApiMainnet>, sendTxConfig?: Parameters<SendTransactionApi["sendTransaction"]>[1]): Promise<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Confirm a signed transaction.
|
|
127
|
+
* TODO: can some of this be refactored to be moved to the shared/svm/rpc.ts file?
|
|
128
|
+
* TODO: should the commitment and the timeout be passed in as parameters?
|
|
129
|
+
*
|
|
130
|
+
* @param signedTransaction - The signed transaction to confirm
|
|
131
|
+
* @param rpc - The RPC client to use to confirm the transaction
|
|
132
|
+
* @param rpcSubscriptions - The RPC subscriptions to use to confirm the transaction
|
|
133
|
+
* @returns The success and signature of the confirmed transaction
|
|
134
|
+
*/
|
|
135
|
+
declare function confirmSignedTransaction(signedTransaction: Awaited<ReturnType<typeof signTransaction>>, rpc: RpcDevnet<SolanaRpcApiDevnet> | RpcMainnet<SolanaRpcApiMainnet>, rpcSubscriptions: ReturnType<typeof getRpcSubscriptions>): Promise<{
|
|
136
|
+
success: boolean;
|
|
137
|
+
errorReason?: (typeof ErrorReasons)[number];
|
|
138
|
+
signature: string;
|
|
139
|
+
}>;
|
|
140
|
+
/**
|
|
141
|
+
* Send and confirm a signed transaction.
|
|
142
|
+
*
|
|
143
|
+
* @param signedTransaction - The signed transaction to send and confirm
|
|
144
|
+
* @param rpc - The RPC client to use to send and confirm the transaction
|
|
145
|
+
* @param rpcSubscriptions - The RPC subscriptions to use to send and confirm the transaction
|
|
146
|
+
* @returns The success and signature of the confirmed transaction
|
|
147
|
+
*/
|
|
148
|
+
declare function sendAndConfirmSignedTransaction(signedTransaction: Awaited<ReturnType<typeof signTransaction>>, rpc: RpcDevnet<SolanaRpcApiDevnet> | RpcMainnet<SolanaRpcApiMainnet>, rpcSubscriptions: ReturnType<typeof getRpcSubscriptions>): Promise<{
|
|
149
|
+
success: boolean;
|
|
150
|
+
errorReason?: (typeof ErrorReasons)[number];
|
|
151
|
+
signature: string;
|
|
152
|
+
}>;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Verify the payment payload against the payment requirements.
|
|
156
|
+
*
|
|
157
|
+
* @param signer - The signer that will sign and simulate the transaction
|
|
158
|
+
* @param payload - The payment payload to verify
|
|
159
|
+
* @param paymentRequirements - The payment requirements to verify against
|
|
160
|
+
* @param config - Optional configuration for X402 operations (e.g., custom RPC URLs)
|
|
161
|
+
* @returns A VerifyResponse indicating if the payment is valid and any invalidation reason
|
|
162
|
+
*/
|
|
163
|
+
declare function verify(signer: KeyPairSigner, payload: PaymentPayload, paymentRequirements: PaymentRequirements, config?: X402Config): Promise<VerifyResponse>;
|
|
164
|
+
/**
|
|
165
|
+
* Verify that the scheme and network are supported.
|
|
166
|
+
*
|
|
167
|
+
* @param payload - The payment payload to verify
|
|
168
|
+
* @param paymentRequirements - The payment requirements to verify against
|
|
169
|
+
*/
|
|
170
|
+
declare function verifySchemesAndNetworks(payload: PaymentPayload, paymentRequirements: PaymentRequirements): void;
|
|
171
|
+
/**
|
|
172
|
+
* Perform transaction introspection to validate the transaction structure and transfer details.
|
|
173
|
+
* This function handles decoding the transaction, validating the transfer instruction,
|
|
174
|
+
* and verifying all transfer details against the payment requirements.
|
|
175
|
+
*
|
|
176
|
+
* @param svmPayload - The SVM payload containing the transaction
|
|
177
|
+
* @param paymentRequirements - The payment requirements to verify against
|
|
178
|
+
* @param config - Optional configuration for X402 operations (e.g., custom RPC URLs)
|
|
179
|
+
*/
|
|
180
|
+
declare function transactionIntrospection(svmPayload: ExactSvmPayload, paymentRequirements: PaymentRequirements, config?: X402Config): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Verify that the transaction contains the expected instructions.
|
|
183
|
+
*
|
|
184
|
+
* @param transactionMessage - The transaction message to verify
|
|
185
|
+
* @param paymentRequirements - The payment requirements to verify against
|
|
186
|
+
* @param rpc - The RPC client to use for verifying account existence
|
|
187
|
+
* @throws Error if the transaction does not contain the expected instructions
|
|
188
|
+
*/
|
|
189
|
+
declare function verifyTransactionInstructions(transactionMessage: CompilableTransactionMessage, paymentRequirements: PaymentRequirements, rpc: RpcDevnet<SolanaRpcApiDevnet> | RpcMainnet<SolanaRpcApiMainnet>): Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* Verify that the compute limit instruction is valid.
|
|
192
|
+
*
|
|
193
|
+
* @param instruction - The compute limit instruction to verify
|
|
194
|
+
* @throws Error if the compute limit instruction is invalid
|
|
195
|
+
*/
|
|
196
|
+
declare function verifyComputeLimitInstruction(instruction: Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>): void;
|
|
197
|
+
/**
|
|
198
|
+
* Verify that the compute price instruction is valid.
|
|
199
|
+
* This function throws an error if the compute unit price is greater than 5 lamports,
|
|
200
|
+
* to protect the facilitator against gas fee abuse from the client.
|
|
201
|
+
*
|
|
202
|
+
* @param instruction - The compute price instruction to verify
|
|
203
|
+
* @throws Error if the compute price instruction is invalid
|
|
204
|
+
*/
|
|
205
|
+
declare function verifyComputePriceInstruction(instruction: Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>): void;
|
|
206
|
+
/**
|
|
207
|
+
* Verify that the create ATA instruction is valid.
|
|
208
|
+
*
|
|
209
|
+
* @param instruction - The create ATA instruction to verify
|
|
210
|
+
* @param paymentRequirements - The payment requirements to verify against
|
|
211
|
+
* @throws Error if the create ATA instruction is invalid
|
|
212
|
+
*/
|
|
213
|
+
declare function verifyCreateATAInstruction(instruction: Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>, paymentRequirements: PaymentRequirements): void;
|
|
214
|
+
/**
|
|
215
|
+
* Verify that the transfer instruction is valid.
|
|
216
|
+
*
|
|
217
|
+
* @param instruction - The transfer instruction to verify
|
|
218
|
+
* @param paymentRequirements - The payment requirements to verify against
|
|
219
|
+
* @param {object} options - The options for the verification of the transfer instruction
|
|
220
|
+
* @param {boolean} options.txHasCreateDestATAInstruction - Whether the transaction has a create destination ATA instruction
|
|
221
|
+
* @param rpc - The RPC client to use for verifying account existence
|
|
222
|
+
* @throws Error if the transfer instruction is invalid
|
|
223
|
+
*/
|
|
224
|
+
declare function verifyTransferInstruction(instruction: Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>, paymentRequirements: PaymentRequirements, { txHasCreateDestATAInstruction }: {
|
|
225
|
+
txHasCreateDestATAInstruction: boolean;
|
|
226
|
+
}, rpc: RpcDevnet<SolanaRpcApiDevnet> | RpcMainnet<SolanaRpcApiMainnet>): Promise<void>;
|
|
227
|
+
/**
|
|
228
|
+
* Verify that the transfer checked instruction is valid.
|
|
229
|
+
*
|
|
230
|
+
* @param parsedInstruction - The parsed transfer checked instruction to verify
|
|
231
|
+
* @param paymentRequirements - The payment requirements to verify against
|
|
232
|
+
* @param {object} options - The options for the verification of the transfer checked instruction
|
|
233
|
+
* @param {boolean} options.txHasCreateDestATAInstruction - Whether the transaction has a create destination ATA instruction
|
|
234
|
+
* @param rpc - The RPC client to use for verifying account existence
|
|
235
|
+
* @throws Error if the transfer checked instruction is invalid
|
|
236
|
+
*/
|
|
237
|
+
declare function verifyTransferCheckedInstruction(parsedInstruction: ReturnType<typeof parseTransferCheckedInstruction>, paymentRequirements: PaymentRequirements, { txHasCreateDestATAInstruction }: {
|
|
238
|
+
txHasCreateDestATAInstruction: boolean;
|
|
239
|
+
}, rpc: RpcDevnet<SolanaRpcApiDevnet> | RpcMainnet<SolanaRpcApiMainnet>): Promise<void>;
|
|
240
|
+
/**
|
|
241
|
+
* Inspect the decompiled transaction message to make sure that it is a valid
|
|
242
|
+
* transfer instruction.
|
|
243
|
+
*
|
|
244
|
+
* @param instruction - The instruction to get the transfer instruction from
|
|
245
|
+
* @returns The validated transfer instruction
|
|
246
|
+
* @throws Error if the instruction is not a valid transfer checked instruction
|
|
247
|
+
*/
|
|
248
|
+
declare function getValidatedTransferCheckedInstruction(instruction: Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>): _solana_program_token.ParsedTransferCheckedInstruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Creates and encodes a payment header for the given client and payment requirements.
|
|
252
|
+
*
|
|
253
|
+
* @param client - The signer instance used to create the payment header
|
|
254
|
+
* @param x402Version - The version of the X402 protocol to use
|
|
255
|
+
* @param paymentRequirements - The payment requirements containing scheme and network information
|
|
256
|
+
* @param config - Optional configuration for X402 operations (e.g., custom RPC URLs)
|
|
257
|
+
* @returns A promise that resolves to a base64 encoded payment header string
|
|
258
|
+
*/
|
|
259
|
+
declare function createPaymentHeader(client: KeyPairSigner, x402Version: number, paymentRequirements: PaymentRequirements, config?: X402Config): Promise<string>;
|
|
260
|
+
/**
|
|
261
|
+
* Creates and signs a payment for the given client and payment requirements.
|
|
262
|
+
*
|
|
263
|
+
* @param client - The signer instance used to create and sign the payment tx
|
|
264
|
+
* @param x402Version - The version of the X402 protocol to use
|
|
265
|
+
* @param paymentRequirements - The payment requirements
|
|
266
|
+
* @param config - Optional configuration for X402 operations (e.g., custom RPC URLs)
|
|
267
|
+
* @returns A promise that resolves to a payment payload containing a base64 encoded solana token transfer tx
|
|
268
|
+
*/
|
|
269
|
+
declare function createAndSignPayment(client: KeyPairSigner, x402Version: number, paymentRequirements: PaymentRequirements, config?: X402Config): Promise<PaymentPayload>;
|
|
270
|
+
|
|
271
|
+
declare const index$1_confirmSignedTransaction: typeof confirmSignedTransaction;
|
|
272
|
+
declare const index$1_createAndSignPayment: typeof createAndSignPayment;
|
|
273
|
+
declare const index$1_createPaymentHeader: typeof createPaymentHeader;
|
|
274
|
+
declare const index$1_getValidatedTransferCheckedInstruction: typeof getValidatedTransferCheckedInstruction;
|
|
275
|
+
declare const index$1_sendAndConfirmSignedTransaction: typeof sendAndConfirmSignedTransaction;
|
|
276
|
+
declare const index$1_sendSignedTransaction: typeof sendSignedTransaction;
|
|
277
|
+
declare const index$1_settle: typeof settle;
|
|
278
|
+
declare const index$1_transactionIntrospection: typeof transactionIntrospection;
|
|
279
|
+
declare const index$1_verify: typeof verify;
|
|
280
|
+
declare const index$1_verifyComputeLimitInstruction: typeof verifyComputeLimitInstruction;
|
|
281
|
+
declare const index$1_verifyComputePriceInstruction: typeof verifyComputePriceInstruction;
|
|
282
|
+
declare const index$1_verifyCreateATAInstruction: typeof verifyCreateATAInstruction;
|
|
283
|
+
declare const index$1_verifySchemesAndNetworks: typeof verifySchemesAndNetworks;
|
|
284
|
+
declare const index$1_verifyTransactionInstructions: typeof verifyTransactionInstructions;
|
|
285
|
+
declare const index$1_verifyTransferCheckedInstruction: typeof verifyTransferCheckedInstruction;
|
|
286
|
+
declare const index$1_verifyTransferInstruction: typeof verifyTransferInstruction;
|
|
287
|
+
declare namespace index$1 {
|
|
288
|
+
export { index$1_confirmSignedTransaction as confirmSignedTransaction, index$1_createAndSignPayment as createAndSignPayment, index$1_createPaymentHeader as createPaymentHeader, index$1_getValidatedTransferCheckedInstruction as getValidatedTransferCheckedInstruction, index$1_sendAndConfirmSignedTransaction as sendAndConfirmSignedTransaction, index$1_sendSignedTransaction as sendSignedTransaction, index$1_settle as settle, index$1_transactionIntrospection as transactionIntrospection, index$1_verify as verify, index$1_verifyComputeLimitInstruction as verifyComputeLimitInstruction, index$1_verifyComputePriceInstruction as verifyComputePriceInstruction, index$1_verifyCreateATAInstruction as verifyCreateATAInstruction, index$1_verifySchemesAndNetworks as verifySchemesAndNetworks, index$1_verifyTransactionInstructions as verifyTransactionInstructions, index$1_verifyTransferCheckedInstruction as verifyTransferCheckedInstruction, index$1_verifyTransferInstruction as verifyTransferInstruction };
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
declare const SCHEME = "exact";
|
|
292
|
+
|
|
293
|
+
declare const index_SCHEME: typeof SCHEME;
|
|
294
|
+
declare namespace index {
|
|
295
|
+
export { index_SCHEME as SCHEME, index$2 as evm, index$1 as svm };
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export { decodePayment, encodePayment, index as exact };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exact_exports
|
|
3
|
+
} from "../chunk-MWDK4RSB.mjs";
|
|
4
|
+
import {
|
|
5
|
+
decodePayment,
|
|
6
|
+
encodePayment
|
|
7
|
+
} from "../chunk-R2NI44QI.mjs";
|
|
8
|
+
import "../chunk-XZA3USQF.mjs";
|
|
9
|
+
import "../chunk-7CWEZNFA.mjs";
|
|
10
|
+
import "../chunk-5UPAZUO6.mjs";
|
|
11
|
+
export {
|
|
12
|
+
decodePayment,
|
|
13
|
+
encodePayment,
|
|
14
|
+
exact_exports as exact
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Transport, Chain, Account, Client, Address } from 'viem';
|
|
2
|
+
import { C as ChainConfig } from '../../config-CFBSAuxW.mjs';
|
|
3
|
+
import { C as ConnectedClient } from '../../wallet-BReyvAJs.mjs';
|
|
4
|
+
import '@solana/kit';
|
|
5
|
+
import 'viem/chains';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Gets the USDC contract address for the current chain from the client
|
|
9
|
+
*
|
|
10
|
+
* @param client - The Viem client instance connected to the blockchain
|
|
11
|
+
* @returns The USDC contract address for the current chain
|
|
12
|
+
*/
|
|
13
|
+
declare function getUsdcAddress<transport extends Transport, chain extends Chain | undefined = undefined, account extends Account | undefined = undefined>(client: Client<transport, chain, account>): Address;
|
|
14
|
+
/**
|
|
15
|
+
* Gets the USDC contract address for a specific chain ID
|
|
16
|
+
*
|
|
17
|
+
* @deprecated Use `getUsdcChainConfigForChain` instead
|
|
18
|
+
* @param chainId - The chain ID to get the USDC contract address for
|
|
19
|
+
* @returns The USDC contract address for the specified chain
|
|
20
|
+
*/
|
|
21
|
+
declare function getUsdcAddressForChain(chainId: number): Address;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the USDC address and eip712 domain name for a specific chain ID
|
|
24
|
+
*
|
|
25
|
+
* @param chainId - The chain ID
|
|
26
|
+
* @returns The USDC contract address and eip712 domain name for the specified chain
|
|
27
|
+
*/
|
|
28
|
+
declare function getUsdcChainConfigForChain(chainId: number): ChainConfig | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the version of the USDC contract, using a cache to avoid repeated calls
|
|
31
|
+
*
|
|
32
|
+
* @param client - The Viem client instance connected to the blockchain
|
|
33
|
+
* @returns A promise that resolves to the USDC contract version string
|
|
34
|
+
*/
|
|
35
|
+
declare function getVersion<transport extends Transport, chain extends Chain, account extends Account | undefined = undefined>(client: ConnectedClient<transport, chain, account>): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the USDC balance for a specific address
|
|
38
|
+
*
|
|
39
|
+
* @param client - The Viem client instance connected to the blockchain
|
|
40
|
+
* @param address - The address to check the USDC balance for
|
|
41
|
+
* @returns A promise that resolves to the USDC balance as a bigint
|
|
42
|
+
*/
|
|
43
|
+
declare function getUSDCBalance<transport extends Transport, chain extends Chain, account extends Account | undefined = undefined>(client: ConnectedClient<transport, chain, account>, address: Address): Promise<bigint>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Gets the USDC balance for a specific address
|
|
47
|
+
*
|
|
48
|
+
* @param client - The Viem client instance connected to the blockchain
|
|
49
|
+
* @param erc20Address - The address of the ERC20 contract
|
|
50
|
+
* @param address - The address to check the USDC balance for
|
|
51
|
+
* @returns A promise that resolves to the USDC balance as a bigint
|
|
52
|
+
*/
|
|
53
|
+
declare function getERC20Balance<transport extends Transport, chain extends Chain, account extends Account | undefined = undefined>(client: ConnectedClient<transport, chain, account>, erc20Address: Address, address: Address): Promise<bigint>;
|
|
54
|
+
|
|
55
|
+
export { getERC20Balance, getUSDCBalance, getUsdcAddress, getUsdcAddressForChain, getUsdcChainConfigForChain, getVersion };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getERC20Balance,
|
|
3
|
+
getUSDCBalance,
|
|
4
|
+
getUsdcAddress,
|
|
5
|
+
getUsdcAddressForChain,
|
|
6
|
+
getUsdcChainConfigForChain,
|
|
7
|
+
getVersion
|
|
8
|
+
} from "../../chunk-7CWEZNFA.mjs";
|
|
9
|
+
import "../../chunk-5UPAZUO6.mjs";
|
|
10
|
+
export {
|
|
11
|
+
getERC20Balance,
|
|
12
|
+
getUSDCBalance,
|
|
13
|
+
getUsdcAddress,
|
|
14
|
+
getUsdcAddressForChain,
|
|
15
|
+
getUsdcChainConfigForChain,
|
|
16
|
+
getVersion
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { N as Network } from '../network--RYzQfBg.mjs';
|
|
2
|
+
import * as _solana_kit from '@solana/kit';
|
|
3
|
+
import { Transaction, KeyPairSigner, RpcDevnet, SolanaRpcApiDevnet, RpcMainnet, SolanaRpcApiMainnet } from '@solana/kit';
|
|
4
|
+
import { Hex, Address } from 'viem';
|
|
5
|
+
import { R as RoutesConfig, a as RoutePattern, P as Price, E as ERC20TokenAmount, S as SPLTokenAmount } from '../middleware-CAOp-bv4.mjs';
|
|
6
|
+
import { P as PaymentRequirements, a as PaymentPayload, E as ExactSvmPayload } from '../x402Specs-7OH8g851.mjs';
|
|
7
|
+
import { c as createDevnetRpcClient, a as createMainnetRpcClient, g as getRpcClient, b as getRpcSubscriptions } from '../rpc-22QIQWIu.mjs';
|
|
8
|
+
import { a as SvmConnectedClient, S as SvmSigner, c as createSignerFromBase58, b as createSvmConnectedClient, i as isSignerWallet } from '../wallet-BTqCm9Zp.mjs';
|
|
9
|
+
import 'zod';
|
|
10
|
+
import '../wallet-BReyvAJs.mjs';
|
|
11
|
+
import 'viem/chains';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Converts an object to a JSON-safe format by converting bigint values to strings
|
|
15
|
+
* and recursively processing nested objects and arrays
|
|
16
|
+
*
|
|
17
|
+
* @param data - The object to convert to JSON-safe format
|
|
18
|
+
* @returns A new object with all bigint values converted to strings
|
|
19
|
+
*/
|
|
20
|
+
declare function toJsonSafe<T extends object>(data: T): object;
|
|
21
|
+
|
|
22
|
+
declare const Base64EncodedRegex: RegExp;
|
|
23
|
+
/**
|
|
24
|
+
* Encodes a string to base64 format
|
|
25
|
+
*
|
|
26
|
+
* @param data - The string to be encoded to base64
|
|
27
|
+
* @returns The base64 encoded string
|
|
28
|
+
*/
|
|
29
|
+
declare function safeBase64Encode(data: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Decodes a base64 string back to its original format
|
|
32
|
+
*
|
|
33
|
+
* @param data - The base64 encoded string to be decoded
|
|
34
|
+
* @returns The decoded string in UTF-8 format
|
|
35
|
+
*/
|
|
36
|
+
declare function safeBase64Decode(data: string): string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Converts a network name to its corresponding chain ID
|
|
40
|
+
*
|
|
41
|
+
* @param network - The network name to convert to a chain ID
|
|
42
|
+
* @returns The chain ID for the specified network
|
|
43
|
+
* @throws Error if the network is not supported
|
|
44
|
+
*/
|
|
45
|
+
declare function getNetworkId(network: Network): number;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Computes the route patterns for the given routes config
|
|
49
|
+
*
|
|
50
|
+
* @param routes - The routes config to compute the patterns for
|
|
51
|
+
* @returns The route patterns
|
|
52
|
+
*/
|
|
53
|
+
declare function computeRoutePatterns(routes: RoutesConfig): RoutePattern[];
|
|
54
|
+
/**
|
|
55
|
+
* Finds the matching route pattern for the given path and method
|
|
56
|
+
*
|
|
57
|
+
* @param routePatterns - The route patterns to search through
|
|
58
|
+
* @param path - The path to match against
|
|
59
|
+
* @param method - The HTTP method to match against
|
|
60
|
+
* @returns The matching route pattern or undefined if no match is found
|
|
61
|
+
*/
|
|
62
|
+
declare function findMatchingRoute(routePatterns: RoutePattern[], path: string, method: string): RoutePattern | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Gets the default asset (USDC) for the given network
|
|
65
|
+
*
|
|
66
|
+
* @param network - The network to get the default asset for
|
|
67
|
+
* @returns The default asset
|
|
68
|
+
*/
|
|
69
|
+
declare function getDefaultAsset(network: Network): {
|
|
70
|
+
address: `0x${string}` | _solana_kit.Address;
|
|
71
|
+
decimals: number;
|
|
72
|
+
eip712: {
|
|
73
|
+
name: string;
|
|
74
|
+
version: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Parses the amount from the given price
|
|
79
|
+
*
|
|
80
|
+
* @param price - The price to parse
|
|
81
|
+
* @param network - The network to get the default asset for
|
|
82
|
+
* @returns The parsed amount or an error message
|
|
83
|
+
*/
|
|
84
|
+
declare function processPriceToAtomicAmount(price: Price, network: Network): {
|
|
85
|
+
maxAmountRequired: string;
|
|
86
|
+
asset: ERC20TokenAmount["asset"] | SPLTokenAmount["asset"];
|
|
87
|
+
} | {
|
|
88
|
+
error: string;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Finds the matching payment requirements for the given payment
|
|
92
|
+
*
|
|
93
|
+
* @param paymentRequirements - The payment requirements to search through
|
|
94
|
+
* @param payment - The payment to match against
|
|
95
|
+
* @returns The matching payment requirements or undefined if no match is found
|
|
96
|
+
*/
|
|
97
|
+
declare function findMatchingPaymentRequirements(paymentRequirements: PaymentRequirements[], payment: PaymentPayload): {
|
|
98
|
+
scheme: "exact";
|
|
99
|
+
description: string;
|
|
100
|
+
asset: string;
|
|
101
|
+
maxAmountRequired: string;
|
|
102
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "x-layer" | "x-layer-testnet" | "solana-devnet" | "solana" | "sepolia" | "filecoin-calibration";
|
|
103
|
+
resource: string;
|
|
104
|
+
mimeType: string;
|
|
105
|
+
payTo: string;
|
|
106
|
+
maxTimeoutSeconds: number;
|
|
107
|
+
outputSchema?: Record<string, any> | undefined;
|
|
108
|
+
extra?: Record<string, any> | undefined;
|
|
109
|
+
} | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Decodes the X-PAYMENT-RESPONSE header
|
|
112
|
+
*
|
|
113
|
+
* @param header - The X-PAYMENT-RESPONSE header to decode
|
|
114
|
+
* @returns The decoded payment response
|
|
115
|
+
*/
|
|
116
|
+
declare function decodeXPaymentResponse(header: string): {
|
|
117
|
+
success: boolean;
|
|
118
|
+
transaction: Hex;
|
|
119
|
+
network: Network;
|
|
120
|
+
payer: Address;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Given an object with a base64 encoded transaction, decode the
|
|
125
|
+
* base64 encoded transaction into a solana transaction object.
|
|
126
|
+
*
|
|
127
|
+
* @param svmPayload - The SVM payload to decode
|
|
128
|
+
* @returns The decoded transaction
|
|
129
|
+
*/
|
|
130
|
+
declare function decodeTransactionFromPayload(svmPayload: ExactSvmPayload): Transaction;
|
|
131
|
+
/**
|
|
132
|
+
* Extract the token sender (owner of the source token account)
|
|
133
|
+
* from the TransferChecked instruction.
|
|
134
|
+
*
|
|
135
|
+
* @param transaction - The transaction to extract the token payer from
|
|
136
|
+
* @returns The token payer address as a base58 string
|
|
137
|
+
*/
|
|
138
|
+
declare function getTokenPayerFromTransaction(transaction: Transaction): string;
|
|
139
|
+
/**
|
|
140
|
+
* Sign and simulate a transaction.
|
|
141
|
+
*
|
|
142
|
+
* @param signer - The signer that will sign the transaction
|
|
143
|
+
* @param transaction - The transaction to sign and simulate
|
|
144
|
+
* @param rpc - The RPC client to use to simulate the transaction
|
|
145
|
+
* @returns The transaction simulation result
|
|
146
|
+
*/
|
|
147
|
+
declare function signAndSimulateTransaction(signer: KeyPairSigner, transaction: Transaction, rpc: RpcDevnet<SolanaRpcApiDevnet> | RpcMainnet<SolanaRpcApiMainnet>): Promise<Readonly<{
|
|
148
|
+
context: Readonly<{
|
|
149
|
+
slot: _solana_kit.Slot;
|
|
150
|
+
}>;
|
|
151
|
+
value: Readonly<{
|
|
152
|
+
readonly accounts: null;
|
|
153
|
+
}> & Readonly<{
|
|
154
|
+
err: _solana_kit.TransactionError | null;
|
|
155
|
+
logs: string[] | null;
|
|
156
|
+
returnData: Readonly<{
|
|
157
|
+
data: _solana_kit.Base64EncodedDataResponse;
|
|
158
|
+
programId: _solana_kit.Address;
|
|
159
|
+
}> | null;
|
|
160
|
+
unitsConsumed?: bigint;
|
|
161
|
+
}>;
|
|
162
|
+
}>>;
|
|
163
|
+
|
|
164
|
+
declare const index_KeyPairSigner: typeof KeyPairSigner;
|
|
165
|
+
declare const index_SvmConnectedClient: typeof SvmConnectedClient;
|
|
166
|
+
declare const index_SvmSigner: typeof SvmSigner;
|
|
167
|
+
declare const index_createDevnetRpcClient: typeof createDevnetRpcClient;
|
|
168
|
+
declare const index_createMainnetRpcClient: typeof createMainnetRpcClient;
|
|
169
|
+
declare const index_createSignerFromBase58: typeof createSignerFromBase58;
|
|
170
|
+
declare const index_createSvmConnectedClient: typeof createSvmConnectedClient;
|
|
171
|
+
declare const index_decodeTransactionFromPayload: typeof decodeTransactionFromPayload;
|
|
172
|
+
declare const index_getRpcClient: typeof getRpcClient;
|
|
173
|
+
declare const index_getRpcSubscriptions: typeof getRpcSubscriptions;
|
|
174
|
+
declare const index_getTokenPayerFromTransaction: typeof getTokenPayerFromTransaction;
|
|
175
|
+
declare const index_isSignerWallet: typeof isSignerWallet;
|
|
176
|
+
declare const index_signAndSimulateTransaction: typeof signAndSimulateTransaction;
|
|
177
|
+
declare namespace index {
|
|
178
|
+
export { index_KeyPairSigner as KeyPairSigner, index_SvmConnectedClient as SvmConnectedClient, index_SvmSigner as SvmSigner, index_createDevnetRpcClient as createDevnetRpcClient, index_createMainnetRpcClient as createMainnetRpcClient, index_createSignerFromBase58 as createSignerFromBase58, index_createSvmConnectedClient as createSvmConnectedClient, index_decodeTransactionFromPayload as decodeTransactionFromPayload, index_getRpcClient as getRpcClient, index_getRpcSubscriptions as getRpcSubscriptions, index_getTokenPayerFromTransaction as getTokenPayerFromTransaction, index_isSignerWallet as isSignerWallet, index_signAndSimulateTransaction as signAndSimulateTransaction };
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export { Base64EncodedRegex, computeRoutePatterns, decodeXPaymentResponse, findMatchingPaymentRequirements, findMatchingRoute, getDefaultAsset, getNetworkId, processPriceToAtomicAmount, safeBase64Decode, safeBase64Encode, index as svm, toJsonSafe };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Base64EncodedRegex,
|
|
3
|
+
computeRoutePatterns,
|
|
4
|
+
decodeXPaymentResponse,
|
|
5
|
+
findMatchingPaymentRequirements,
|
|
6
|
+
findMatchingRoute,
|
|
7
|
+
getDefaultAsset,
|
|
8
|
+
getNetworkId,
|
|
9
|
+
processPriceToAtomicAmount,
|
|
10
|
+
safeBase64Decode,
|
|
11
|
+
safeBase64Encode,
|
|
12
|
+
svm_exports2 as svm_exports,
|
|
13
|
+
toJsonSafe
|
|
14
|
+
} from "../chunk-XZA3USQF.mjs";
|
|
15
|
+
import "../chunk-7CWEZNFA.mjs";
|
|
16
|
+
import "../chunk-5UPAZUO6.mjs";
|
|
17
|
+
export {
|
|
18
|
+
Base64EncodedRegex,
|
|
19
|
+
computeRoutePatterns,
|
|
20
|
+
decodeXPaymentResponse,
|
|
21
|
+
findMatchingPaymentRequirements,
|
|
22
|
+
findMatchingRoute,
|
|
23
|
+
getDefaultAsset,
|
|
24
|
+
getNetworkId,
|
|
25
|
+
processPriceToAtomicAmount,
|
|
26
|
+
safeBase64Decode,
|
|
27
|
+
safeBase64Encode,
|
|
28
|
+
svm_exports as svm,
|
|
29
|
+
toJsonSafe
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|