Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabit3/x402-starter-kit
/ functions
Functions
59 in github.com/dabit3/x402-starter-kit
⨍
Functions
59
◇
Types & classes
22
↓ 5 callers
Function
formatSol
* Format SOL balance for display
src/setupSolanaWallets.ts:115
↓ 4 callers
Function
parsePaymentError
* Parse payment errors and provide helpful, actionable error messages. * Handles common Solana and EVM payment failures.
src/facilitator.ts:92
↓ 3 callers
Function
checkWallet
* Check wallet status
src/setupSolanaWallets.ts:129
↓ 2 callers
Method
buildHeaders
()
src/MerchantExecutor.ts:860
↓ 2 callers
Function
decodePrivateKey
* Decode a private key from various formats
src/setupSolanaWallets.ts:62
↓ 2 callers
Method
enqueueEvent
(event: Task)
src/x402Types.ts:43
↓ 2 callers
Function
formatUsdc
* Format USDC balance for display (6 decimals)
src/setupSolanaWallets.ts:122
↓ 2 callers
Function
getKeypair
* Get Keypair from private key bytes
src/setupSolanaWallets.ts:101
↓ 2 callers
Function
parsePaymentError
* Parse payment errors and provide helpful, actionable error messages. * Handles common Solana and EVM payment failures.
src/MerchantExecutor.ts:19
↓ 2 callers
Function
parsePaymentError
* Parse payment errors and provide helpful, actionable error messages.
src/testClientSolana.ts:32
↓ 2 callers
Method
sendRequest
* Send a request to the agent
src/testClientSolana.ts:304
↓ 2 callers
Method
sendRequest
* Send a request to the agent
src/testClient.ts:150
↓ 1 callers
Method
buildEip712Domain
(requirements: PaymentRequirements)
src/MerchantExecutor.ts:902
↓ 1 callers
Method
checkHealth
* Check agent health
src/testClientSolana.ts:461
↓ 1 callers
Method
checkHealth
* Check agent health
src/testClient.ts:281
↓ 1 callers
Function
checkWallet
()
check-wallet.js:32
↓ 1 callers
Function
createAta
* Create ATA for a wallet
src/setupSolanaWallets.ts:170
↓ 1 callers
Function
createPaymentPayload
(paymentRequired, wallet)
test-facilitator.js:49
↓ 1 callers
Function
createPaymentPayload
* Creates a payment payload using the x402 SVM scheme
src/testClientSolana.ts:237
↓ 1 callers
Function
createPaymentPayload
* Creates a payment payload by signing an EIP-712 typed data authorization. * This generates a transferWithAuthorization signature that allows the me
src/testClient.ts:84
↓ 1 callers
Method
createPaymentRequiredResponse
()
src/MerchantExecutor.ts:574
↓ 1 callers
Function
decodeBase58
* Decode a base58 string to bytes
src/testClientSolana.ts:141
↓ 1 callers
Function
decodePrivateKey
* Decodes a Solana private key from various formats * Supports: base58, base64, hex, and JSON array formats
src/testClientSolana.ts:175
↓ 1 callers
Method
execute
(context: RequestContext, eventQueue: EventQueue)
src/ExampleService.ts:80
↓ 1 callers
Method
fetchSolanaFeePayer
* Fetch the feePayer address from the facilitator for Solana networks
src/MerchantExecutor.ts:501
↓ 1 callers
Function
generateNonce
()
test-facilitator.js:37
↓ 1 callers
Function
generateNonce
()
src/testClient.ts:55
↓ 1 callers
Method
getAtomicAmount
(priceUsd: number)
src/MerchantExecutor.ts:855
↓ 1 callers
Function
getChainId
(network)
test-facilitator.js:41
↓ 1 callers
Function
getChainId
(network: string)
src/testClient.ts:59
↓ 1 callers
Method
getDefaultRpcUrl
(network: string)
src/MerchantExecutor.ts:911
↓ 1 callers
Function
getEvmCaip2Network
(network: string)
src/facilitator.ts:78
↓ 1 callers
Function
getSvmCaip2Network
(network: string)
src/facilitator.ts:83
↓ 1 callers
Method
initialize
* Initialize the resource server (async initialization for facilitator mode)
src/MerchantExecutor.ts:466
↓ 1 callers
Method
initialize
* Initialize the client with a Solana private key
src/testClientSolana.ts:274
↓ 1 callers
Function
initializeMerchant
()
src/server.ts:179
↓ 1 callers
Function
main
()
src/setupSolanaWallets.ts:207
↓ 1 callers
Function
main
* Main test function that demonstrates the x402 v2 payment flow with Solana. * * This function runs two tests: * 1. Sends a request without paymen
src/testClientSolana.ts:495
↓ 1 callers
Function
main
* Main test function that demonstrates the x402 v2 payment flow. * * This function runs two tests: * 1. Sends a request without payment to verify
src/testClient.ts:315
↓ 1 callers
Function
printWalletStatus
* Print wallet status
src/setupSolanaWallets.ts:197
↓ 1 callers
Function
selectPaymentRequirement
(paymentRequired)
test-facilitator.js:30
↓ 1 callers
Function
selectPaymentRequirement
(paymentRequired: any)
src/testClientSolana.ts:215
↓ 1 callers
Function
selectPaymentRequirement
(paymentRequired: any)
src/testClient.ts:47
↓ 1 callers
Method
sendPaidRequest
* Send a paid request (with Solana payment)
src/testClientSolana.ts:350
↓ 1 callers
Method
sendPaidRequest
* Send a paid request (with payment)
src/testClient.ts:196
↓ 1 callers
Method
settleOnChain
( payload: PaymentPayload, requirements: PaymentRequirements )
src/MerchantExecutor.ts:778
↓ 1 callers
Method
settlePayment
(payload: PaymentPayload)
src/MerchantExecutor.ts:622
↓ 1 callers
Function
startFacilitator
()
src/facilitator.ts:259
↓ 1 callers
Function
startServer
()
src/server.ts:436
↓ 1 callers
Function
testFacilitator
()
test-facilitator.js:82
↓ 1 callers
Method
toCAIP2Network
(network: string)
src/MerchantExecutor.ts:555
↓ 1 callers
Method
verifyPayment
(payload: PaymentPayload)
src/MerchantExecutor.ts:586
↓ 1 callers
Method
verifyPaymentLocally
( payload: PaymentPayload, requirements: PaymentRequirements )
src/MerchantExecutor.ts:669
Method
callFacilitator
( endpoint: 'verify' | 'settle', payload: PaymentPayload )
src/MerchantExecutor.ts:872
Method
constructor
(options: MerchantExecutorOptions)
src/MerchantExecutor.ts:359
Method
constructor
(agentUrl: string = AGENT_URL)
src/testClientSolana.ts:267
Method
constructor
({ apiKey, baseUrl, defaultHeaders, provider, payToAddress, network, model, te
src/ExampleService.ts:37
Method
constructor
(privateKey?: string, agentUrl: string = AGENT_URL)
src/testClient.ts:139
Method
getPaymentRequirements
()
src/MerchantExecutor.ts:570