You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/autorun-env/api.json
+36Lines changed: 36 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -346,6 +346,42 @@
346
346
}
347
347
]
348
348
},
349
+
{
350
+
"name": "isFunctionAuthorized",
351
+
"description": "Checks if a given function or stack level is authorized by the Autorun environment.",
352
+
"realm": "shared",
353
+
"parameters": [
354
+
{
355
+
"name": "funcOrLevel",
356
+
"type": "function | number",
357
+
"description": "The function to check or the stack level"
358
+
}
359
+
],
360
+
"returns": [
361
+
{
362
+
"type": "boolean",
363
+
"description": "True if the function/level is authorized, false otherwise"
364
+
}
365
+
]
366
+
},
367
+
{
368
+
"name": "isProtoAuthorized",
369
+
"description": "Checks if a given prototype is authorized by the Autorun environment. This can be used to verify if protos from VM events are from Autorun or not.",
370
+
"realm": "shared",
371
+
"parameters": [
372
+
{
373
+
"name": "proto",
374
+
"type": "proto",
375
+
"description": "The prototype to check"
376
+
}
377
+
],
378
+
"returns": [
379
+
{
380
+
"type": "boolean",
381
+
"description": "True if the prototype is authorized, false otherwise"
382
+
}
383
+
]
384
+
},
349
385
{
350
386
"name": "load",
351
387
"description": "Compiles a Lua string into a callable function without executing it. Similar to Lua's loadstring/load function. Use this to dynamically compile code at runtime. NOTE: The environment inside defaults to the global environment, NOT Autorun's environment.",
0 commit comments