@@ -73,6 +73,13 @@ components:
73
73
schema :
74
74
type : string
75
75
example : " Internal Server Error"
76
+ Timeout :
77
+ description : Timeout
78
+ content :
79
+ text/plain :
80
+ schema :
81
+ type : string
82
+ example : " Timeout"
76
83
schemas :
77
84
NodeInfo :
78
85
$ref : ./components/schemas/node-info.schema.yaml
@@ -104,6 +111,8 @@ components:
104
111
$ref : ./components/schemas/read-only-function-args.schema.yaml
105
112
ReadOnlyFunctionResult :
106
113
$ref : ./components/schemas/read-only-function-result.schema.yaml
114
+ ClarityName :
115
+ $ref : ./components/schemas/clarity-name.schema.yaml
107
116
ClarityMetadata :
108
117
$ref : ./components/schemas/clarity-metadata.schema.yaml
109
118
ConstantValue :
@@ -267,9 +276,8 @@ paths:
267
276
- name : map_name
268
277
in : path
269
278
required : true
270
- description : Map name
271
279
schema :
272
- type : string
280
+ $ref : " #/components/schemas/ClarityName "
273
281
- $ref : ./components/parameters/proof.yaml
274
282
- $ref : ./components/parameters/tip.yaml
275
283
x-codegen-request-body-name : key
@@ -333,9 +341,13 @@ paths:
333
341
description : |
334
342
Call a read-only public function on a given contract.
335
343
336
- The contract is identified with [Stacks Address] and [Contract Name] in the URL path. The function is identified with [Function Name].
344
+ The contract is identified with [Stacks Address] and [Contract Name] in the URL path.
345
+ The function is identified with [Function Name].
337
346
338
- The arguments to the function are supplied via the POST body. This should be a JSON object with two main properties, `sender` which should be a standard Stacks address and `arguments` which should be an array of hex-encoded Clarity values.
347
+ The arguments to the function are supplied via the POST body.
348
+ This should be a JSON object with two main properties:
349
+ - `sender` which should be a standard Stacks address
350
+ - `arguments` which should be an array of hex-encoded Clarity values.
339
351
tags :
340
352
- Smart Contracts
341
353
security : []
@@ -345,17 +357,78 @@ paths:
345
357
- $ref : ./components/parameters/contract-name.yaml
346
358
- name : function_name
347
359
in : path
348
- description : Function name
349
360
required : true
350
361
schema :
351
- type : string
362
+ $ref : " #/components/schemas/ClarityName"
363
+ - $ref : ./components/parameters/tip.yaml
364
+ requestBody :
365
+ required : true
366
+ content :
367
+ application/json :
368
+ schema :
369
+ $ref : " #/components/schemas/ReadOnlyFunctionArgs"
370
+ responses :
371
+ " 200 " :
372
+ description : Function executed successfully
373
+ content :
374
+ application/json :
375
+ schema :
376
+ $ref : " #/components/schemas/ReadOnlyFunctionResult"
377
+ examples :
378
+ success :
379
+ summary : Successful function call
380
+ externalValue : " ./components/examples/read-only-function-success.example.json"
381
+ failure :
382
+ summary : Failed function call
383
+ externalValue : " ./components/examples/read-only-function-failure.example.json"
384
+ " 400 " :
385
+ $ref : " #/components/responses/BadRequest"
386
+ " 404 " :
387
+ $ref : " #/components/responses/NotFound"
388
+ " 500 " :
389
+ $ref : " #/components/responses/InternalServerError"
390
+
391
+ /v3/contracts/fast-call-read/{contract_address}/{contract_name}/{function_name} :
392
+ post :
393
+ summary : Call read-only function in fast mode (no cost and memory tracking)
394
+ description : |
395
+ Call a read-only public function on a given smart contract without cost tracking.
396
+
397
+ The contract is identified with [Stacks Address] and [Contract Name] in the URL path.
398
+ The function is identified with [Function Name].
399
+
400
+ The arguments to the function are supplied via the POST body.
401
+ This should be a JSON object with two main properties:
402
+ - `sender` which should be a standard Stacks address
403
+ - `arguments` which should be an array of hex-encoded Clarity values.
404
+
405
+ **This API endpoint requires a basic Authorization header.**
406
+ tags :
407
+ - Smart Contracts
408
+ security :
409
+ - rpcAuth : []
410
+ operationId : fastCallReadOnlyFunction
411
+ parameters :
412
+ - $ref : ./components/parameters/contract-address.yaml
413
+ - $ref : ./components/parameters/contract-name.yaml
414
+ - name : function_name
415
+ in : path
416
+ required : true
417
+ schema :
418
+ $ref : " #/components/schemas/ClarityName"
352
419
- $ref : ./components/parameters/tip.yaml
353
420
requestBody :
421
+ description : map of arguments and the simulated tx-sender where sender is either a Contract identifier or a normal Stacks address, and arguments is an array of hex serialized Clarity values.
354
422
required : true
355
423
content :
356
424
application/json :
357
425
schema :
358
426
$ref : " #/components/schemas/ReadOnlyFunctionArgs"
427
+ example :
428
+ sender : " SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info"
429
+ arguments :
430
+ - " 0x0011..."
431
+ - " 0x00231..."
359
432
responses :
360
433
" 200 " :
361
434
description : Function executed successfully
@@ -374,6 +447,8 @@ paths:
374
447
$ref : " #/components/responses/BadRequest"
375
448
" 404 " :
376
449
$ref : " #/components/responses/NotFound"
450
+ " 408 " :
451
+ $ref : " #/components/responses/Timeout"
377
452
" 500 " :
378
453
$ref : " #/components/responses/InternalServerError"
379
454
@@ -609,12 +684,9 @@ paths:
609
684
- name : trait_name
610
685
in : path
611
686
required : true
612
- description : Trait name, must conform to Clarity naming rules.
613
687
schema :
614
- type : string
615
- pattern : " ^([a-zA-Z0-9_]|[-!?+<>=/*]){1,128}$"
616
- minLength : 1
617
- maxLength : 128
688
+ $ref : " #/components/schemas/ClarityName"
689
+ example : " some-trait"
618
690
- $ref : ./components/parameters/tip.yaml
619
691
responses :
620
692
" 200 " :
@@ -739,9 +811,8 @@ paths:
739
811
- name : constant_name
740
812
in : path
741
813
required : true
742
- description : Constant name
743
814
schema :
744
- type : string
815
+ $ref : " #/components/schemas/ClarityName "
745
816
- $ref : ./components/parameters/tip.yaml
746
817
747
818
/v3/block_proposal :
0 commit comments