MCPcopy Index your code
hub / github.com/codeaashu/claude-code / call

Function call

src/commands/x402/x402.ts:177–216  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

175}
176
177export const call: LocalCommandCall = async (args) => {
178 const subcommand = (args ?? '').trim().split(/\s+/)[0]?.toLowerCase()
179
180 let value: string
181
182 switch (subcommand) {
183 case 'setup':
184 value = handleSetup(args ?? '')
185 break
186 case 'status':
187 value = handleStatus()
188 break
189 case 'enable':
190 saveX402Config({ enabled: true })
191 value = isX402Enabled()
192 ? 'x402 payments enabled.'
193 : 'x402 enabled but no wallet configured. Run /x402 setup first.'
194 break
195 case 'disable':
196 saveX402Config({ enabled: false })
197 value = 'x402 payments disabled.'
198 break
199 case 'set-limit':
200 value = handleSetLimit(args ?? '')
201 break
202 case 'set-session':
203 value = handleSetSession(args ?? '')
204 break
205 case 'network':
206 value = handleNetwork(args ?? '')
207 break
208 case 'remove':
209 value = handleRemove()
210 break
211 default:
212 value = showHelp()
213 }
214
215 return { type: 'text', value }
216}

Callers

nothing calls this directly

Calls 9

handleSetupFunction · 0.85
handleStatusFunction · 0.85
saveX402ConfigFunction · 0.85
isX402EnabledFunction · 0.85
handleSetLimitFunction · 0.85
handleSetSessionFunction · 0.85
handleNetworkFunction · 0.85
handleRemoveFunction · 0.85
showHelpFunction · 0.85

Tested by

no test coverage detected