@ohos-ports/azle 0.33.0-beta.0

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.
Files changed (629) hide show
  1. package/.scripts/add_metadata_to_dfx_json.js +54 -0
  2. package/.scripts/cargo_expand.sh +17 -0
  3. package/.scripts/class_migration/add_example_dependency.js +54 -0
  4. package/.scripts/class_migration/change_to_custom_candid_gen.js +76 -0
  5. package/.scripts/class_migration/clean_package.js +27 -0
  6. package/.scripts/class_migration/copy_generated_candid_from_example.js +90 -0
  7. package/.scripts/class_migration/delete_tests_file.js +22 -0
  8. package/.scripts/class_migration/do_all_packages.js +61 -0
  9. package/.scripts/class_migration/modify_pretest.js +57 -0
  10. package/.scripts/class_migration/name_package.js +62 -0
  11. package/.scripts/class_migration/update_test.js +38 -0
  12. package/.scripts/class_migration/update_ts_config.js +48 -0
  13. package/.scripts/class_migration/update_typescript.js +99 -0
  14. package/.scripts/clean_all_projects.ts +91 -0
  15. package/.scripts/delete_git_branches.sh +20 -0
  16. package/.scripts/dev_dependencies/add_dev_dependencies.js +53 -0
  17. package/.scripts/dev_dependencies/remove_dev_dependencies.js +44 -0
  18. package/.scripts/examples-survey.json +5651 -0
  19. package/.scripts/file_generator/bin.js +4 -0
  20. package/.scripts/file_generator/index.ts +59 -0
  21. package/.scripts/file_generator/main.ts +55 -0
  22. package/.scripts/find_multiline_files.ts +101 -0
  23. package/.scripts/hash_file.ts +9 -0
  24. package/.scripts/hash_file_by_parts/bin.js +4 -0
  25. package/.scripts/hash_file_by_parts/index.ts +48 -0
  26. package/.scripts/hash_file_by_parts/main.ts +10 -0
  27. package/.scripts/jest_isolate_modules.js +29 -0
  28. package/.scripts/jest_migration.sh +31 -0
  29. package/.scripts/reorder_dfx_json.js +72 -0
  30. package/.scripts/setup_release_branch.sh +34 -0
  31. package/.scripts/simplify_tsconfig.js +37 -0
  32. package/.scripts/survey_examples.ts +396 -0
  33. package/.scripts/tsx_migration/ts_node_to_tsx.js +76 -0
  34. package/.scripts/update_candid.sh +40 -0
  35. package/.scripts/update_dfx_json_main.js +66 -0
  36. package/.scripts/update_dfx_json_with_optimize.py +22 -0
  37. package/.scripts/update_jest_configs.ts +248 -0
  38. package/LICENSE +21 -0
  39. package/LICENSE_EXTENSION.md +42 -0
  40. package/NOTICE +222 -0
  41. package/README.md +78 -0
  42. package/dist/canister_templates/experimental.wasm +0 -0
  43. package/dist/canister_templates/licenses.yml +29186 -0
  44. package/dist/canister_templates/stable.wasm +0 -0
  45. package/examples/README.md +22 -0
  46. package/examples/experimental/demo/hello_world_http_server/README.md +120 -0
  47. package/examples/experimental/demo/hello_world_http_server/benchmarks.json +42 -0
  48. package/examples/experimental/demo/hello_world_http_server/benchmarks.md +28 -0
  49. package/examples/experimental/demo/hello_world_http_server/dfx.json +13 -0
  50. package/examples/experimental/demo/hello_world_http_server/env.d.ts +9 -0
  51. package/examples/experimental/demo/hello_world_http_server/jest.config.js +10 -0
  52. package/examples/experimental/demo/hello_world_http_server/package-lock.json +8409 -0
  53. package/examples/experimental/demo/hello_world_http_server/package.json +20 -0
  54. package/examples/experimental/demo/hello_world_http_server/src/backend/index.ts +23 -0
  55. package/examples/experimental/demo/hello_world_http_server/src/frontend/index.html +16 -0
  56. package/examples/experimental/demo/hello_world_http_server/src/frontend/index.ts +62 -0
  57. package/examples/experimental/demo/hello_world_http_server/test/pretest.ts +13 -0
  58. package/examples/experimental/demo/hello_world_http_server/test/test.ts +9 -0
  59. package/examples/experimental/demo/hello_world_http_server/test/tests.ts +27 -0
  60. package/examples/experimental/demo/hello_world_http_server/tsconfig.json +13 -0
  61. package/examples/package-lock.json +8746 -0
  62. package/examples/package.json +17 -0
  63. package/examples/stable/demo/hello_world/README.md +97 -0
  64. package/examples/stable/demo/hello_world/benchmarks.json +28 -0
  65. package/examples/stable/demo/hello_world/benchmarks.md +26 -0
  66. package/examples/stable/demo/hello_world/dfx.json +12 -0
  67. package/examples/stable/demo/hello_world/jest.config.js +10 -0
  68. package/examples/stable/demo/hello_world/package-lock.json +5524 -0
  69. package/examples/stable/demo/hello_world/package.json +14 -0
  70. package/examples/stable/demo/hello_world/src/index.ts +15 -0
  71. package/examples/stable/demo/hello_world/test/pretest.ts +17 -0
  72. package/examples/stable/demo/hello_world/test/test.ts +15 -0
  73. package/examples/stable/demo/hello_world/test/tests.ts +27 -0
  74. package/examples/stable/demo/hello_world/tsconfig.json +10 -0
  75. package/jest.config.dev.js +10 -0
  76. package/package.json +102 -0
  77. package/src/build.ts +98 -0
  78. package/src/experimental/build/assert_experimental.ts +5 -0
  79. package/src/experimental/build/commands/build/candid_and_method_meta.ts +30 -0
  80. package/src/experimental/build/commands/build/custom_js_modules/acorn/acorn.ts +6 -0
  81. package/src/experimental/build/commands/build/custom_js_modules/acorn/walk.ts +6 -0
  82. package/src/experimental/build/commands/build/custom_js_modules/async_hooks.ts +11 -0
  83. package/src/experimental/build/commands/build/custom_js_modules/https.ts +6 -0
  84. package/src/experimental/build/commands/build/custom_js_modules/perf_hooks.ts +12 -0
  85. package/src/experimental/build/commands/build/file_watcher/file_watcher.ts +152 -0
  86. package/src/experimental/build/commands/build/file_watcher/file_watcher_loader.js +9 -0
  87. package/src/experimental/build/commands/build/file_watcher/setup_file_watcher.ts +61 -0
  88. package/src/experimental/build/commands/build/get_context.ts +61 -0
  89. package/src/experimental/build/commands/build/index.ts +87 -0
  90. package/src/experimental/build/commands/build/javascript.ts +194 -0
  91. package/src/experimental/build/commands/build/wasm_binary/index.ts +32 -0
  92. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/Cargo.toml +26 -0
  93. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/autoreload.rs +46 -0
  94. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/benchmarking.rs +35 -0
  95. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/candid.rs +106 -0
  96. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/chunk.rs +11 -0
  97. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/execute_method_js.rs +46 -0
  98. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/guards.rs +9 -0
  99. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/accept_message.rs +10 -0
  100. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/call_raw.rs +265 -0
  101. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/candid_compiler.rs +19 -0
  102. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/candid_decode.rs +17 -0
  103. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/candid_encode.rs +17 -0
  104. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/canister_cycle_balance.rs +12 -0
  105. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/canister_self.rs +10 -0
  106. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/canister_version.rs +10 -0
  107. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/certified_data_set.rs +17 -0
  108. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/clear_timer.rs +18 -0
  109. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/cycles_burn.rs +17 -0
  110. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/data_certificate.rs +13 -0
  111. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/debug_print.rs +17 -0
  112. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/drain_microtasks.rs +23 -0
  113. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/in_replicated_execution.rs +8 -0
  114. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/is_controller.rs +16 -0
  115. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/mod.rs +351 -0
  116. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_arg_data.rs +10 -0
  117. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_caller.rs +10 -0
  118. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_cycles_accept.rs +17 -0
  119. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_cycles_available.rs +10 -0
  120. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_cycles_refunded.rs +10 -0
  121. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_method_name.rs +8 -0
  122. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reject.rs +16 -0
  123. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reject_code.rs +8 -0
  124. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reject_msg.rs +8 -0
  125. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reply.rs +19 -0
  126. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/notify_raw.rs +65 -0
  127. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/performance_counter.rs +19 -0
  128. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/rand_bytes.rs +25 -0
  129. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/rand_seed.rs +30 -0
  130. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/set_timer.rs +83 -0
  131. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/set_timer_interval.rs +66 -0
  132. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_contains_key.rs +32 -0
  133. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_get.rs +36 -0
  134. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_init.rs +29 -0
  135. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_insert.rs +46 -0
  136. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_is_empty.rs +23 -0
  137. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_items.rs +59 -0
  138. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_keys.rs +54 -0
  139. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_len.rs +23 -0
  140. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_remove.rs +36 -0
  141. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_values.rs +54 -0
  142. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/time.rs +8 -0
  143. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/trap.rs +14 -0
  144. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/init_and_post_upgrade.rs +212 -0
  145. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/internal_canister_methods.rs +142 -0
  146. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/lib.rs +35 -0
  147. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/stable_b_tree_map.rs +50 -0
  148. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/bytes_to_human_readable.rs +20 -0
  149. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/file_info.rs +60 -0
  150. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/hash.rs +111 -0
  151. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/mod.rs +20 -0
  152. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/reset.rs +15 -0
  153. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/upload_file_chunk.rs +88 -0
  154. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/wasm_binary_manipulation.rs +276 -0
  155. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/web_assembly/instantiate.rs +195 -0
  156. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/web_assembly/mod.rs +24 -0
  157. package/src/experimental/build/commands/upload_assets/file_uploader/bytes_to_human_readable.ts +27 -0
  158. package/src/experimental/build/commands/upload_assets/file_uploader/expand_paths.ts +50 -0
  159. package/src/experimental/build/commands/upload_assets/file_uploader/get_files_to_upload.ts +21 -0
  160. package/src/experimental/build/commands/upload_assets/file_uploader/incomplete_files.ts +28 -0
  161. package/src/experimental/build/commands/upload_assets/file_uploader/index.ts +43 -0
  162. package/src/experimental/build/commands/upload_assets/file_uploader/on_before_exit.ts +34 -0
  163. package/src/experimental/build/commands/upload_assets/file_uploader/upload_file.ts +91 -0
  164. package/src/experimental/build/commands/upload_assets/file_uploader/uploader_actor.ts +51 -0
  165. package/src/experimental/build/commands/upload_assets/index.ts +16 -0
  166. package/src/experimental/build/commands/upload_assets/uploader_identity.ts +23 -0
  167. package/src/experimental/build/index.ts +61 -0
  168. package/src/experimental/build/utils/dfx.ts +212 -0
  169. package/src/experimental/build/utils/filter_async.ts +14 -0
  170. package/src/experimental/build/utils/find_project_root.ts +67 -0
  171. package/src/experimental/build/utils/global_paths.ts +8 -0
  172. package/src/experimental/build/utils/log_success.ts +18 -0
  173. package/src/experimental/build/utils/types.ts +34 -0
  174. package/src/experimental/lib/assert_experimental.ts +19 -0
  175. package/src/experimental/lib/fetch/file.ts +15 -0
  176. package/src/experimental/lib/fetch/headers.ts +85 -0
  177. package/src/experimental/lib/fetch/http.ts +293 -0
  178. package/src/experimental/lib/fetch/icp.ts +98 -0
  179. package/src/experimental/lib/fetch/index.ts +97 -0
  180. package/src/experimental/lib/fetch/response.ts +171 -0
  181. package/src/experimental/lib/fetch/url.ts +15 -0
  182. package/src/experimental/lib/globals.ts +146 -0
  183. package/src/experimental/lib/http_client/fetch_ic/actor.ts +131 -0
  184. package/src/experimental/lib/http_client/fetch_ic/agent.ts +20 -0
  185. package/src/experimental/lib/http_client/fetch_ic/call.ts +257 -0
  186. package/src/experimental/lib/http_client/fetch_ic/get_canister_id.ts +25 -0
  187. package/src/experimental/lib/http_client/fetch_ic/host.ts +30 -0
  188. package/src/experimental/lib/http_client/fetch_ic/identity.ts +52 -0
  189. package/src/experimental/lib/http_client/fetch_ic/index.ts +95 -0
  190. package/src/experimental/lib/http_client/fetch_ic/response.ts +8 -0
  191. package/src/experimental/lib/http_client/index.ts +6 -0
  192. package/src/experimental/lib/http_client/to_jwt.ts +6 -0
  193. package/src/experimental/lib/ic/azle_ic_experimental.ts +92 -0
  194. package/src/experimental/lib/ic/candid_compiler.ts +14 -0
  195. package/src/experimental/lib/ic/index.ts +10 -0
  196. package/src/experimental/lib/ic/set_outgoing_http_options.ts +18 -0
  197. package/src/experimental/lib/index.ts +7 -0
  198. package/src/experimental/lib/server.ts +279 -0
  199. package/src/experimental/lib/threshold_wallet/calculate_rsv_for_tecdsa.ts +45 -0
  200. package/src/experimental/lib/threshold_wallet/ecdsa_public_key.ts +33 -0
  201. package/src/experimental/lib/threshold_wallet/index.ts +7 -0
  202. package/src/experimental/lib/threshold_wallet/register_get_url.ts +36 -0
  203. package/src/experimental/lib/threshold_wallet/sign_with_ecdsa.ts +28 -0
  204. package/src/experimental/lib/threshold_wallet/wallet.ts +99 -0
  205. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/complex_candid_definition_memo.ts +113 -0
  206. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/index.ts +73 -0
  207. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/recursive_candid_definition_memo.ts +28 -0
  208. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/simple_candid_definition_arb.ts +116 -0
  209. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/types.ts +117 -0
  210. package/src/experimental/test/property/arbitraries/candid/candid_return_type_arb.ts +22 -0
  211. package/src/experimental/test/property/arbitraries/candid/candid_type.ts +83 -0
  212. package/src/experimental/test/property/arbitraries/candid/candid_value_and_meta_arb.ts +84 -0
  213. package/src/experimental/test/property/arbitraries/candid/candid_value_and_meta_arb_generator.ts +63 -0
  214. package/src/experimental/test/property/arbitraries/candid/candid_values_arb.ts +173 -0
  215. package/src/experimental/test/property/arbitraries/candid/constructed/blob_arb/definition_arb.ts +11 -0
  216. package/src/experimental/test/property/arbitraries/candid/constructed/blob_arb/index.ts +19 -0
  217. package/src/experimental/test/property/arbitraries/candid/constructed/blob_arb/values_arb.ts +11 -0
  218. package/src/experimental/test/property/arbitraries/candid/constructed/opt_arb/definition_arb.ts +172 -0
  219. package/src/experimental/test/property/arbitraries/candid/constructed/opt_arb/index.ts +29 -0
  220. package/src/experimental/test/property/arbitraries/candid/constructed/opt_arb/values_arb.ts +88 -0
  221. package/src/experimental/test/property/arbitraries/candid/constructed/record_arb/definition_arb.ts +184 -0
  222. package/src/experimental/test/property/arbitraries/candid/constructed/record_arb/index.ts +34 -0
  223. package/src/experimental/test/property/arbitraries/candid/constructed/record_arb/values_arb.ts +95 -0
  224. package/src/experimental/test/property/arbitraries/candid/constructed/tuple_arb/definition_arb.ts +159 -0
  225. package/src/experimental/test/property/arbitraries/candid/constructed/tuple_arb/index.ts +31 -0
  226. package/src/experimental/test/property/arbitraries/candid/constructed/tuple_arb/values_arbs.ts +76 -0
  227. package/src/experimental/test/property/arbitraries/candid/constructed/variant_arb/definition_arbs.ts +257 -0
  228. package/src/experimental/test/property/arbitraries/candid/constructed/variant_arb/index.ts +37 -0
  229. package/src/experimental/test/property/arbitraries/candid/constructed/variant_arb/values_arb.ts +92 -0
  230. package/src/experimental/test/property/arbitraries/candid/constructed/vec_arb/definition_arb.ts +203 -0
  231. package/src/experimental/test/property/arbitraries/candid/constructed/vec_arb/index.ts +39 -0
  232. package/src/experimental/test/property/arbitraries/candid/constructed/vec_arb/values_arb.ts +257 -0
  233. package/src/experimental/test/property/arbitraries/candid/corresponding_js_type.ts +34 -0
  234. package/src/experimental/test/property/arbitraries/candid/primitive/bool_arb.ts +28 -0
  235. package/src/experimental/test/property/arbitraries/candid/primitive/floats/float32_arb.ts +56 -0
  236. package/src/experimental/test/property/arbitraries/candid/primitive/floats/float64_arb.ts +56 -0
  237. package/src/experimental/test/property/arbitraries/candid/primitive/ints/index.ts +11 -0
  238. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int16_arb.ts +34 -0
  239. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int32_arb.ts +34 -0
  240. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int64_arb.ts +41 -0
  241. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int8_arb.ts +34 -0
  242. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int_arb.ts +39 -0
  243. package/src/experimental/test/property/arbitraries/candid/primitive/nats/index.ts +11 -0
  244. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat16_arb.ts +34 -0
  245. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat32_arb.ts +34 -0
  246. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat64_arb.ts +41 -0
  247. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat8_arb.ts +34 -0
  248. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat_arb.ts +39 -0
  249. package/src/experimental/test/property/arbitraries/candid/primitive/null_arb.ts +33 -0
  250. package/src/experimental/test/property/arbitraries/candid/primitive/text_arb.ts +47 -0
  251. package/src/experimental/test/property/arbitraries/candid/primitive/void_arb.ts +33 -0
  252. package/src/experimental/test/property/arbitraries/candid/recursive/definition_arb.ts +125 -0
  253. package/src/experimental/test/property/arbitraries/candid/recursive/index.ts +35 -0
  254. package/src/experimental/test/property/arbitraries/candid/recursive/values_arb.ts +43 -0
  255. package/src/experimental/test/property/arbitraries/candid/reference/func_arb/definition_arb.ts +198 -0
  256. package/src/experimental/test/property/arbitraries/candid/reference/func_arb/index.ts +23 -0
  257. package/src/experimental/test/property/arbitraries/candid/reference/func_arb/values_arb.ts +70 -0
  258. package/src/experimental/test/property/arbitraries/candid/reference/principal_arb.ts +43 -0
  259. package/src/experimental/test/property/arbitraries/candid/reference/service_arb/definition_arb.ts +163 -0
  260. package/src/experimental/test/property/arbitraries/candid/reference/service_arb/index.ts +41 -0
  261. package/src/experimental/test/property/arbitraries/candid/reference/service_arb/service_method_arb.ts +110 -0
  262. package/src/experimental/test/property/arbitraries/candid/reference/service_arb/values_arb.ts +20 -0
  263. package/src/experimental/test/property/arbitraries/candid/simple_type_arbs/candid_type_to_azle_candid_type.ts +66 -0
  264. package/src/experimental/test/property/arbitraries/candid/simple_type_arbs/definition_arb.ts +95 -0
  265. package/src/experimental/test/property/arbitraries/candid/simple_type_arbs/values_arb.ts +19 -0
  266. package/src/experimental/test/property/arbitraries/candid/to_src_literal/bigint.ts +5 -0
  267. package/src/experimental/test/property/arbitraries/candid/to_src_literal/blob.ts +5 -0
  268. package/src/experimental/test/property/arbitraries/candid/to_src_literal/boolean.ts +5 -0
  269. package/src/experimental/test/property/arbitraries/candid/to_src_literal/float.ts +18 -0
  270. package/src/experimental/test/property/arbitraries/candid/to_src_literal/null.ts +5 -0
  271. package/src/experimental/test/property/arbitraries/candid/to_src_literal/number.ts +5 -0
  272. package/src/experimental/test/property/arbitraries/candid/to_src_literal/principal.ts +7 -0
  273. package/src/experimental/test/property/arbitraries/candid/to_src_literal/string.ts +12 -0
  274. package/src/experimental/test/property/arbitraries/candid/to_src_literal/void.ts +5 -0
  275. package/src/experimental/test/property/arbitraries/canister_arb.ts +195 -0
  276. package/src/experimental/test/property/arbitraries/canister_methods/index.ts +79 -0
  277. package/src/experimental/test/property/arbitraries/canister_methods/init_method_arb.ts +127 -0
  278. package/src/experimental/test/property/arbitraries/canister_methods/inspect_message_method_arb.ts +55 -0
  279. package/src/experimental/test/property/arbitraries/canister_methods/post_upgrade_method_arb.ts +133 -0
  280. package/src/experimental/test/property/arbitraries/canister_methods/pre_upgrade_method_arb.ts +57 -0
  281. package/src/experimental/test/property/arbitraries/canister_methods/query_method_arb.ts +141 -0
  282. package/src/experimental/test/property/arbitraries/canister_methods/update_method_arb.ts +158 -0
  283. package/src/experimental/test/property/arbitraries/config.ts +4 -0
  284. package/src/experimental/test/property/arbitraries/http/body_arb.ts +7 -0
  285. package/src/experimental/test/property/arbitraries/http/headers_arb.ts +22 -0
  286. package/src/experimental/test/property/arbitraries/http/request_arb.ts +158 -0
  287. package/src/experimental/test/property/arbitraries/http/response_arb.ts +192 -0
  288. package/src/experimental/test/property/arbitraries/js_name_arb.ts +144 -0
  289. package/src/experimental/test/property/arbitraries/stable_b_tree_map_arb.ts +55 -0
  290. package/src/experimental/test/property/arbitraries/types.ts +24 -0
  291. package/src/experimental/test/property/arbitraries/unique_identifier_arb.ts +38 -0
  292. package/src/experimental/test/property/arbitraries/unique_primitive_arb.ts +22 -0
  293. package/src/experimental/test/property/are_params_correctly_ordered.ts +19 -0
  294. package/src/experimental/test/property/get_actor.ts +39 -0
  295. package/src/experimental/test/property/index.ts +141 -0
  296. package/src/experimental/test/property/test/index.ts +226 -0
  297. package/src/experimental/test/property/visitors/LICENCE +201 -0
  298. package/src/experimental/test/property/visitors/cli-string-visitor.ts +138 -0
  299. package/src/experimental/test/set_experimental.ts +1 -0
  300. package/src/exports/_internal/dfx.ts +1 -0
  301. package/src/exports/_internal/globals.ts +1 -0
  302. package/src/exports/_internal/test/candid_deep_equal.ts +1 -0
  303. package/src/exports/_internal/test.ts +1 -0
  304. package/src/exports/_internal/type_tests/assert_type.ts +1 -0
  305. package/src/exports/_internal.ts +1 -0
  306. package/src/exports/canisters/ck_btc_ledger/idl.ts +1 -0
  307. package/src/exports/canisters/ck_eth_ledger/idl.ts +1 -0
  308. package/src/exports/canisters/cycles_ledger/idl.ts +1 -0
  309. package/src/exports/canisters/evm_rpc/idl.ts +1 -0
  310. package/src/exports/canisters/exchange_rate/idl.ts +1 -0
  311. package/src/exports/canisters/http_gateway/idl.ts +1 -0
  312. package/src/exports/canisters/icrc_1/idl.ts +1 -0
  313. package/src/exports/canisters/icrc_10/idl.ts +1 -0
  314. package/src/exports/canisters/icrc_2/idl.ts +1 -0
  315. package/src/exports/canisters/icrc_3/idl.ts +1 -0
  316. package/src/exports/canisters/icrc_37/idl.ts +1 -0
  317. package/src/exports/canisters/icrc_7/idl.ts +1 -0
  318. package/src/exports/canisters/llm/idl.ts +1 -0
  319. package/src/exports/canisters/management/idl.ts +1 -0
  320. package/src/exports/canisters/nns_cycles_minting/idl.ts +1 -0
  321. package/src/exports/canisters/nns_governance/idl.ts +1 -0
  322. package/src/exports/canisters/nns_icp_ledger/idl.ts +1 -0
  323. package/src/exports/canisters/nns_internet_identity/idl.ts +1 -0
  324. package/src/exports/canisters/nns_registry/idl.ts +1 -0
  325. package/src/exports/canisters/nns_sns_w/idl.ts +1 -0
  326. package/src/exports/experimental/_internal/dfx.ts +1 -0
  327. package/src/exports/experimental/_internal/globals.ts +1 -0
  328. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_definition_arb/types.ts +1 -0
  329. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_definition_arb.ts +1 -0
  330. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_return_type_arb.ts +1 -0
  331. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_value_and_meta_arb.ts +1 -0
  332. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_value_and_meta_arb_generator.ts +1 -0
  333. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_values_arb.ts +1 -0
  334. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/blob_arb.ts +1 -0
  335. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/opt_arb.ts +1 -0
  336. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/record_arb.ts +1 -0
  337. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/tuple_arb.ts +1 -0
  338. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/variant_arb.ts +1 -0
  339. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/vec_arb.ts +1 -0
  340. package/src/exports/experimental/_internal/test/property/arbitraries/candid/corresponding_js_type.ts +1 -0
  341. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/bool_arb.ts +1 -0
  342. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/floats/float32_arb.ts +1 -0
  343. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/floats/float64_arb.ts +1 -0
  344. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int16_arb.ts +1 -0
  345. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int32_arb.ts +1 -0
  346. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int64_arb.ts +1 -0
  347. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int8_arb.ts +1 -0
  348. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int_arb.ts +1 -0
  349. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat16_arb.ts +1 -0
  350. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat32_arb.ts +1 -0
  351. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat64_arb.ts +1 -0
  352. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat8_arb.ts +1 -0
  353. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat_arb.ts +1 -0
  354. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/null_arb.ts +1 -0
  355. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/text_arb.ts +1 -0
  356. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/void_arb.ts +1 -0
  357. package/src/exports/experimental/_internal/test/property/arbitraries/candid/recursive.ts +1 -0
  358. package/src/exports/experimental/_internal/test/property/arbitraries/candid/reference/func_arb.ts +1 -0
  359. package/src/exports/experimental/_internal/test/property/arbitraries/candid/reference/principal_arb.ts +1 -0
  360. package/src/exports/experimental/_internal/test/property/arbitraries/candid/reference/service_arb.ts +1 -0
  361. package/src/exports/experimental/_internal/test/property/arbitraries/canister_arb.ts +1 -0
  362. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/init_method_arb.ts +1 -0
  363. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/inspect_message_method_arb.ts +1 -0
  364. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/post_upgrade_method_arb.ts +1 -0
  365. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/pre_upgrade_method_arb.ts +1 -0
  366. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/query_method_arb.ts +1 -0
  367. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/update_method_arb.ts +1 -0
  368. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods.ts +1 -0
  369. package/src/exports/experimental/_internal/test/property/arbitraries/config.ts +1 -0
  370. package/src/exports/experimental/_internal/test/property/arbitraries/http/body_arb.ts +1 -0
  371. package/src/exports/experimental/_internal/test/property/arbitraries/http/headers_arb.ts +1 -0
  372. package/src/exports/experimental/_internal/test/property/arbitraries/http/request_arb.ts +1 -0
  373. package/src/exports/experimental/_internal/test/property/arbitraries/http/response_arb.ts +1 -0
  374. package/src/exports/experimental/_internal/test/property/arbitraries/stable_b_tree_map_arb.ts +1 -0
  375. package/src/exports/experimental/_internal/test/property/arbitraries/types.ts +1 -0
  376. package/src/exports/experimental/_internal/test/property/arbitraries/unique_identifier_arb.ts +1 -0
  377. package/src/exports/experimental/_internal/test/property/are_params_correctly_ordered.ts +1 -0
  378. package/src/exports/experimental/_internal/test/property/test.ts +1 -0
  379. package/src/exports/experimental/_internal/test/property.ts +1 -0
  380. package/src/exports/experimental/_internal/test/set_experimental.ts +1 -0
  381. package/src/exports/experimental/_internal.ts +8 -0
  382. package/src/exports/experimental/http_client.ts +1 -0
  383. package/src/exports/experimental.ts +3 -0
  384. package/src/stable/build/commands/build/candid_and_method_meta/execute.ts +134 -0
  385. package/src/stable/build/commands/build/candid_and_method_meta/index.ts +27 -0
  386. package/src/stable/build/commands/build/get_context.ts +79 -0
  387. package/src/stable/build/commands/build/index.ts +48 -0
  388. package/src/stable/build/commands/build/javascript.ts +259 -0
  389. package/src/stable/build/commands/build/wasm_binary/compile.ts +27 -0
  390. package/src/stable/build/commands/build/wasm_binary/index.ts +30 -0
  391. package/src/stable/build/commands/build/wasm_binary/manipulate.ts +268 -0
  392. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/Cargo.toml +23 -0
  393. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/benchmarking.rs +45 -0
  394. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/candid_and_method_meta.rs +49 -0
  395. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/execute_method_js.rs +65 -0
  396. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/guards.rs +11 -0
  397. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/accept_message.rs +6 -0
  398. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/call_raw.rs +362 -0
  399. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/candid_decode.rs +18 -0
  400. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/candid_encode.rs +19 -0
  401. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/canister_cycle_balance.rs +8 -0
  402. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/canister_self.rs +8 -0
  403. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/canister_version.rs +8 -0
  404. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/certified_data_set.rs +8 -0
  405. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/clear_timer.rs +15 -0
  406. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/cycles_burn.rs +17 -0
  407. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/data_certificate.rs +13 -0
  408. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/debug_print.rs +8 -0
  409. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/drain_microtasks.rs +22 -0
  410. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/in_replicated_execution.rs +6 -0
  411. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/is_controller.rs +11 -0
  412. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/mod.rs +219 -0
  413. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_arg_data.rs +8 -0
  414. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_caller.rs +8 -0
  415. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_cycles_accept.rs +17 -0
  416. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_cycles_available.rs +8 -0
  417. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_cycles_refunded.rs +8 -0
  418. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_method_name.rs +6 -0
  419. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reject.rs +6 -0
  420. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reject_code.rs +6 -0
  421. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reject_msg.rs +6 -0
  422. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reply.rs +8 -0
  423. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/notify_raw.rs +62 -0
  424. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/performance_counter.rs +17 -0
  425. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/rand_bytes.rs +21 -0
  426. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/rand_seed.rs +26 -0
  427. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/set_timer.rs +92 -0
  428. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/set_timer_interval.rs +62 -0
  429. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_contains_key.rs +18 -0
  430. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_get.rs +21 -0
  431. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_init.rs +19 -0
  432. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_insert.rs +44 -0
  433. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_is_empty.rs +11 -0
  434. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_items.rs +48 -0
  435. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_keys.rs +43 -0
  436. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_len.rs +16 -0
  437. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_remove.rs +21 -0
  438. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_values.rs +43 -0
  439. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/time.rs +8 -0
  440. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/trap.rs +22 -0
  441. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/init_and_post_upgrade.rs +98 -0
  442. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/initialize_context.rs +102 -0
  443. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/internal_canister_methods.rs +122 -0
  444. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/lib.rs +39 -0
  445. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/call_with_error_handling.rs +26 -0
  446. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/error.rs +27 -0
  447. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/mod.rs +7 -0
  448. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/with_ctx.rs +24 -0
  449. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/stable_b_tree_map.rs +84 -0
  450. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/state.rs +55 -0
  451. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/wasm_binary_manipulation.rs +296 -0
  452. package/src/stable/build/commands/clean.ts +15 -0
  453. package/src/stable/build/commands/dev/audit.ts +39 -0
  454. package/src/stable/build/commands/dev/setup/index.ts +41 -0
  455. package/src/stable/build/commands/dev/setup/install_cargo-audit.sh +11 -0
  456. package/src/stable/build/commands/dev/setup/install_cargo-auditable.sh +16 -0
  457. package/src/stable/build/commands/dev/setup/install_cargo-bundle-licenses.sh +11 -0
  458. package/src/stable/build/commands/dev/setup/install_cargo-deny.sh +11 -0
  459. package/src/stable/build/commands/dev/setup/install_dfx.sh +36 -0
  460. package/src/stable/build/commands/dev/setup/install_node.sh +25 -0
  461. package/src/stable/build/commands/dev/setup/install_rust.sh +24 -0
  462. package/src/stable/build/commands/dev/setup/install_wasi2ic.sh +11 -0
  463. package/src/stable/build/commands/dev/template/experimental.ts +28 -0
  464. package/src/stable/build/commands/dev/template/generate_licenses.ts +28 -0
  465. package/src/stable/build/commands/dev/template/stable.ts +27 -0
  466. package/src/stable/build/commands/extension/install.ts +25 -0
  467. package/src/stable/build/commands/generate/index.ts +21 -0
  468. package/src/stable/build/commands/generate/rust/candid_to_ts_js/Cargo.toml +12 -0
  469. package/src/stable/build/commands/generate/rust/candid_to_ts_js/build.sh +9 -0
  470. package/src/stable/build/commands/generate/rust/candid_to_ts_js/licenses.md +1 -0
  471. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js.d.ts +18 -0
  472. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js.js +144 -0
  473. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js_bg.wasm +0 -0
  474. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js_bg.wasm.d.ts +9 -0
  475. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/package.json +11 -0
  476. package/src/stable/build/commands/generate/rust/candid_to_ts_js/src/lib.rs +31 -0
  477. package/src/stable/build/commands/new.ts +165 -0
  478. package/src/stable/build/commands/version.ts +5 -0
  479. package/src/stable/build/dfx_extension/extension.json +36 -0
  480. package/src/stable/build/dfx_extension/install.sh +10 -0
  481. package/src/stable/build/index.ts +282 -0
  482. package/src/stable/build/utils/dfx.ts +10 -0
  483. package/src/stable/build/utils/dfx_root.ts +34 -0
  484. package/src/stable/build/utils/exec_sync_pretty.ts +17 -0
  485. package/src/stable/build/utils/experimental_message.ts +19 -0
  486. package/src/stable/build/utils/get_canister_config.ts +52 -0
  487. package/src/stable/build/utils/global_paths.ts +26 -0
  488. package/src/stable/build/utils/types.ts +87 -0
  489. package/src/stable/lib/canister_methods/heartbeat.ts +29 -0
  490. package/src/stable/lib/canister_methods/index.ts +405 -0
  491. package/src/stable/lib/canister_methods/init.ts +71 -0
  492. package/src/stable/lib/canister_methods/inspect_message.ts +79 -0
  493. package/src/stable/lib/canister_methods/on_low_wasm_memory.ts +27 -0
  494. package/src/stable/lib/canister_methods/post_upgrade.ts +73 -0
  495. package/src/stable/lib/canister_methods/pre_upgrade.ts +27 -0
  496. package/src/stable/lib/canister_methods/query.ts +69 -0
  497. package/src/stable/lib/canister_methods/update.ts +66 -0
  498. package/src/stable/lib/canisters/NOTICE +15 -0
  499. package/src/stable/lib/canisters/ck_btc_ledger/idl/README.md +9 -0
  500. package/src/stable/lib/canisters/ck_btc_ledger/idl/index.did +289 -0
  501. package/src/stable/lib/canisters/ck_btc_ledger/idl/index.ts +1143 -0
  502. package/src/stable/lib/canisters/ck_eth_ledger/idl/README.md +9 -0
  503. package/src/stable/lib/canisters/ck_eth_ledger/idl/index.did +289 -0
  504. package/src/stable/lib/canisters/ck_eth_ledger/idl/index.ts +1143 -0
  505. package/src/stable/lib/canisters/cycles_ledger/idl/README.md +9 -0
  506. package/src/stable/lib/canisters/cycles_ledger/idl/index.did +272 -0
  507. package/src/stable/lib/canisters/cycles_ledger/idl/index.ts +978 -0
  508. package/src/stable/lib/canisters/evm_rpc/idl/README.md +9 -0
  509. package/src/stable/lib/canisters/evm_rpc/idl/index.did +311 -0
  510. package/src/stable/lib/canisters/evm_rpc/idl/index.ts +1028 -0
  511. package/src/stable/lib/canisters/exchange_rate/idl/README.md +9 -0
  512. package/src/stable/lib/canisters/exchange_rate/idl/index.did +83 -0
  513. package/src/stable/lib/canisters/exchange_rate/idl/index.ts +165 -0
  514. package/src/stable/lib/canisters/http_gateway/idl/README.md +9 -0
  515. package/src/stable/lib/canisters/http_gateway/idl/http-gateway.did +49 -0
  516. package/src/stable/lib/canisters/http_gateway/idl/index.ts +120 -0
  517. package/src/stable/lib/canisters/icrc_1/idl/ICRC-1.did +63 -0
  518. package/src/stable/lib/canisters/icrc_1/idl/LICENSE +202 -0
  519. package/src/stable/lib/canisters/icrc_1/idl/index.ts +151 -0
  520. package/src/stable/lib/canisters/icrc_10/idl/ICRC-10.did +8 -0
  521. package/src/stable/lib/canisters/icrc_10/idl/LICENSE +202 -0
  522. package/src/stable/lib/canisters/icrc_10/idl/index.ts +32 -0
  523. package/src/stable/lib/canisters/icrc_2/idl/ICRC-2.did +76 -0
  524. package/src/stable/lib/canisters/icrc_2/idl/LICENSE +202 -0
  525. package/src/stable/lib/canisters/icrc_2/idl/index.ts +226 -0
  526. package/src/stable/lib/canisters/icrc_3/idl/ICRC-3.did +59 -0
  527. package/src/stable/lib/canisters/icrc_3/idl/LICENSE +202 -0
  528. package/src/stable/lib/canisters/icrc_3/idl/index.ts +156 -0
  529. package/src/stable/lib/canisters/icrc_37/idl/ICRC-37.did +152 -0
  530. package/src/stable/lib/canisters/icrc_37/idl/LICENSE +202 -0
  531. package/src/stable/lib/canisters/icrc_37/idl/index.ts +466 -0
  532. package/src/stable/lib/canisters/icrc_7/idl/ICRC-7.did +67 -0
  533. package/src/stable/lib/canisters/icrc_7/idl/LICENSE +202 -0
  534. package/src/stable/lib/canisters/icrc_7/idl/index.ts +213 -0
  535. package/src/stable/lib/canisters/llm/idl/README.md +9 -0
  536. package/src/stable/lib/canisters/llm/idl/index.did +21 -0
  537. package/src/stable/lib/canisters/llm/idl/index.ts +43 -0
  538. package/src/stable/lib/canisters/management/idl/README.md +10 -0
  539. package/src/stable/lib/canisters/management/idl/ic.did +502 -0
  540. package/src/stable/lib/canisters/management/idl/index.ts +1257 -0
  541. package/src/stable/lib/canisters/nns_cycles_minting/idl/README.md +9 -0
  542. package/src/stable/lib/canisters/nns_cycles_minting/idl/index.did +241 -0
  543. package/src/stable/lib/canisters/nns_cycles_minting/idl/index.ts +394 -0
  544. package/src/stable/lib/canisters/nns_governance/idl/README.md +9 -0
  545. package/src/stable/lib/canisters/nns_governance/idl/index.did +1316 -0
  546. package/src/stable/lib/canisters/nns_governance/idl/index.ts +3599 -0
  547. package/src/stable/lib/canisters/nns_icp_ledger/idl/LICENSE +202 -0
  548. package/src/stable/lib/canisters/nns_icp_ledger/idl/NOTICE +14 -0
  549. package/src/stable/lib/canisters/nns_icp_ledger/idl/README.md +18 -0
  550. package/src/stable/lib/canisters/nns_icp_ledger/idl/address/index.ts +82 -0
  551. package/src/stable/lib/canisters/nns_icp_ledger/idl/index.did +264 -0
  552. package/src/stable/lib/canisters/nns_icp_ledger/idl/index.ts +1020 -0
  553. package/src/stable/lib/canisters/nns_internet_identity/idl/README.md +9 -0
  554. package/src/stable/lib/canisters/nns_internet_identity/idl/index.did +779 -0
  555. package/src/stable/lib/canisters/nns_internet_identity/idl/index.ts +1509 -0
  556. package/src/stable/lib/canisters/nns_registry/idl/README.md +9 -0
  557. package/src/stable/lib/canisters/nns_registry/idl/index.did +493 -0
  558. package/src/stable/lib/canisters/nns_registry/idl/index.ts +1421 -0
  559. package/src/stable/lib/canisters/nns_sns_w/idl/README.md +9 -0
  560. package/src/stable/lib/canisters/nns_sns_w/idl/index.did +352 -0
  561. package/src/stable/lib/canisters/nns_sns_w/idl/index.ts +887 -0
  562. package/src/stable/lib/did_file/idl_to_string.ts +79 -0
  563. package/src/stable/lib/did_file/index.ts +2 -0
  564. package/src/stable/lib/did_file/visitor/did_visitor.ts +135 -0
  565. package/src/stable/lib/did_file/visitor/escape_candid_name.ts +100 -0
  566. package/src/stable/lib/did_file/visitor/extract_candid.ts +31 -0
  567. package/src/stable/lib/did_file/visitor/index.ts +1 -0
  568. package/src/stable/lib/did_file/visitor/visit/func.ts +31 -0
  569. package/src/stable/lib/did_file/visitor/visit/opt.ts +16 -0
  570. package/src/stable/lib/did_file/visitor/visit/primitive.ts +11 -0
  571. package/src/stable/lib/did_file/visitor/visit/record.ts +24 -0
  572. package/src/stable/lib/did_file/visitor/visit/recursive.ts +32 -0
  573. package/src/stable/lib/did_file/visitor/visit/service.ts +107 -0
  574. package/src/stable/lib/did_file/visitor/visit/tuple.ts +20 -0
  575. package/src/stable/lib/did_file/visitor/visit/variant.ts +26 -0
  576. package/src/stable/lib/did_file/visitor/visit/vec.ts +16 -0
  577. package/src/stable/lib/error.ts +55 -0
  578. package/src/stable/lib/execute_and_reply_with_candid_serde.ts +245 -0
  579. package/src/stable/lib/func.ts +7 -0
  580. package/src/stable/lib/globals.ts +250 -0
  581. package/src/stable/lib/ic_apis/NOTICE +203 -0
  582. package/src/stable/lib/ic_apis/azle_ic_stable.ts +86 -0
  583. package/src/stable/lib/ic_apis/call.ts +397 -0
  584. package/src/stable/lib/ic_apis/candid_decode.ts +26 -0
  585. package/src/stable/lib/ic_apis/candid_encode.ts +27 -0
  586. package/src/stable/lib/ic_apis/canister_cycle_balance.ts +28 -0
  587. package/src/stable/lib/ic_apis/canister_self.ts +25 -0
  588. package/src/stable/lib/ic_apis/canister_version.ts +33 -0
  589. package/src/stable/lib/ic_apis/certified_data_set.ts +35 -0
  590. package/src/stable/lib/ic_apis/chunk.ts +42 -0
  591. package/src/stable/lib/ic_apis/clear_timer.ts +53 -0
  592. package/src/stable/lib/ic_apis/cycles_burn.ts +32 -0
  593. package/src/stable/lib/ic_apis/data_certificate.ts +30 -0
  594. package/src/stable/lib/ic_apis/in_replicated_execution.ts +20 -0
  595. package/src/stable/lib/ic_apis/index.ts +37 -0
  596. package/src/stable/lib/ic_apis/is_controller.ts +31 -0
  597. package/src/stable/lib/ic_apis/msg_arg_data.ts +28 -0
  598. package/src/stable/lib/ic_apis/msg_caller.ts +32 -0
  599. package/src/stable/lib/ic_apis/msg_cycles_accept.ts +27 -0
  600. package/src/stable/lib/ic_apis/msg_cycles_available.ts +25 -0
  601. package/src/stable/lib/ic_apis/msg_cycles_refunded.ts +25 -0
  602. package/src/stable/lib/ic_apis/msg_method_name.ts +21 -0
  603. package/src/stable/lib/ic_apis/msg_reject.ts +28 -0
  604. package/src/stable/lib/ic_apis/msg_reject_code.ts +40 -0
  605. package/src/stable/lib/ic_apis/msg_reject_msg.ts +24 -0
  606. package/src/stable/lib/ic_apis/msg_reply.ts +34 -0
  607. package/src/stable/lib/ic_apis/performance_counter.ts +31 -0
  608. package/src/stable/lib/ic_apis/rand_seed.ts +40 -0
  609. package/src/stable/lib/ic_apis/set_timer.ts +80 -0
  610. package/src/stable/lib/ic_apis/set_timer_interval.ts +87 -0
  611. package/src/stable/lib/ic_apis/time.ts +26 -0
  612. package/src/stable/lib/ic_apis/trap.ts +29 -0
  613. package/src/stable/lib/index.ts +16 -0
  614. package/src/stable/lib/json.ts +39 -0
  615. package/src/stable/lib/stable_structures/stable_b_tree_map.ts +488 -0
  616. package/src/stable/lib/stable_structures/stable_json.ts +254 -0
  617. package/src/stable/lib/state.ts +322 -0
  618. package/src/stable/test/benchmarks/_azle_get_benchmarks.did +9 -0
  619. package/src/stable/test/benchmarks/index.ts +273 -0
  620. package/src/stable/test/candid_deep_equal.ts +99 -0
  621. package/src/stable/test/canister_names.ts +36 -0
  622. package/src/stable/test/fuzz.ts +102 -0
  623. package/src/stable/test/get_canister_actor.ts +45 -0
  624. package/src/stable/test/global_state.ts +202 -0
  625. package/src/stable/test/index.ts +274 -0
  626. package/src/stable/test/memory_state.ts +187 -0
  627. package/src/stable/test/property/default_prop_test_params.ts +36 -0
  628. package/src/stable/test/type/assert_type.ts +9 -0
  629. package/tsconfig.dev.json +10 -0
@@ -0,0 +1,248 @@
1
+ #!/usr/bin/env tsx
2
+
3
+ import { existsSync } from 'fs';
4
+ import * as fs from 'fs/promises';
5
+ import * as path from 'path';
6
+ import { fileURLToPath } from 'url';
7
+
8
+ // Default Jest config in case no reference file is provided
9
+ const defaultJestConfig = `/** @type {import('ts-jest').JestConfigWithTsJest} */
10
+ module.exports = {
11
+ preset: 'ts-jest',
12
+ testEnvironment: 'node',
13
+ testTimeout: 100_000_000,
14
+ transform: {
15
+ '^.+\\.ts$': [
16
+ 'ts-jest',
17
+ {
18
+ isolatedModules: true,
19
+ astTransformers: {
20
+ before: [{ path: 'ts-jest-mock-import-meta' }]
21
+ }
22
+ }
23
+ ],
24
+ '^.+\\.js$': 'ts-jest'
25
+ },
26
+ transformIgnorePatterns: ['/node_modules/(?!(azle)/)'] // Make sure azle is transformed
27
+ };
28
+ `;
29
+
30
+ /**
31
+ * Reads the reference jest.config.js file
32
+ * @param referenceFilePath - Path to the reference jest.config.js file
33
+ * @returns The content of the reference file or the default config if the file doesn't exist
34
+ */
35
+ const getReferenceConfig = async (
36
+ referenceFilePath?: string
37
+ ): Promise<string> => {
38
+ if (referenceFilePath && existsSync(referenceFilePath)) {
39
+ try {
40
+ const content = await fs.readFile(referenceFilePath, 'utf8');
41
+ console.info(`Using reference config from: ${referenceFilePath}`);
42
+ return content;
43
+ } catch (error) {
44
+ console.error(
45
+ `Error reading reference file: ${error instanceof Error ? error.message : String(error)}`
46
+ );
47
+ console.info('Falling back to default config');
48
+ }
49
+ } else if (referenceFilePath) {
50
+ console.error(`Reference file not found: ${referenceFilePath}`);
51
+ console.info('Falling back to default config');
52
+ } else {
53
+ console.info('No reference file provided, using default config');
54
+ }
55
+
56
+ return defaultJestConfig;
57
+ };
58
+
59
+ /**
60
+ * Checks if the content of a jest.config.js file matches the expected config
61
+ * @param filePath - Path to the jest.config.js file
62
+ * @param referenceConfig - The reference configuration to compare against
63
+ * @returns true if the content matches, false otherwise
64
+ */
65
+ const checkJestConfig = async (
66
+ filePath: string,
67
+ referenceConfig: string
68
+ ): Promise<boolean> => {
69
+ try {
70
+ const content = await fs.readFile(filePath, 'utf8');
71
+ // Normalize content by removing whitespace and comments to ensure accurate comparison
72
+ const normalizedContent = content
73
+ .replace(/\/\/.*$/gm, '') // Remove single-line comments
74
+ .replace(/\s+/g, ''); // Remove all whitespace
75
+
76
+ const normalizedExpectedContent = referenceConfig
77
+ .replace(/\/\/.*$/gm, '')
78
+ .replace(/\s+/g, '');
79
+
80
+ return normalizedContent === normalizedExpectedContent;
81
+ } catch (error) {
82
+ console.error(
83
+ `Error reading jest.config.js at ${filePath}: ${error instanceof Error ? error.message : String(error)}`
84
+ );
85
+ return false;
86
+ }
87
+ };
88
+
89
+ /**
90
+ * Recursively searches for jest.config.js files and checks or updates them
91
+ * @param directory - The directory to search in
92
+ * @param referenceConfig - The reference configuration to use
93
+ * @param checkOnly - If true, only check and report mismatched files without updating
94
+ * @returns Object containing lists of matched, mismatched, and processed files
95
+ */
96
+ const processJestConfigs = async (
97
+ directory: string,
98
+ referenceConfig: string,
99
+ checkOnly: boolean
100
+ ): Promise<{ matched: string[]; mismatched: string[]; processed: number }> => {
101
+ const result = {
102
+ matched: [] as string[],
103
+ mismatched: [] as string[],
104
+ processed: 0
105
+ };
106
+
107
+ try {
108
+ // Check if this directory contains a jest.config.js file
109
+ const jestConfigPath = path.join(directory, 'jest.config.js');
110
+ const hasJestConfig = existsSync(jestConfigPath);
111
+
112
+ // If it has a jest.config.js file, process it
113
+ if (hasJestConfig) {
114
+ result.processed++;
115
+
116
+ if (checkOnly) {
117
+ // Just check if the content matches
118
+ const matches = await checkJestConfig(
119
+ jestConfigPath,
120
+ referenceConfig
121
+ );
122
+ if (matches) {
123
+ result.matched.push(jestConfigPath);
124
+ } else {
125
+ result.mismatched.push(jestConfigPath);
126
+ console.info(
127
+ `Mismatched jest.config.js found in: ${directory}`
128
+ );
129
+ }
130
+ } else {
131
+ // Update the file
132
+ console.info(`Found jest.config.js in: ${directory}`);
133
+ try {
134
+ await fs.writeFile(jestConfigPath, referenceConfig, 'utf8');
135
+ console.info(
136
+ `Successfully updated jest.config.js in ${directory}`
137
+ );
138
+ result.matched.push(jestConfigPath);
139
+ } catch (error) {
140
+ console.error(
141
+ `Error updating jest.config.js in ${directory}: ${error instanceof Error ? error.message : String(error)}`
142
+ );
143
+ result.mismatched.push(jestConfigPath);
144
+ }
145
+ }
146
+ }
147
+
148
+ // Read all entries in the current directory
149
+ const entries = await fs.readdir(directory);
150
+
151
+ // Process subdirectories
152
+ for (const entry of entries) {
153
+ // Skip node_modules and .git directories
154
+ if (entry === 'node_modules' || entry === '.git') {
155
+ continue;
156
+ }
157
+
158
+ const fullPath = path.join(directory, entry);
159
+ const stats = await fs.stat(fullPath);
160
+
161
+ if (stats.isDirectory()) {
162
+ // Recursively process this subdirectory
163
+ const subResult = await processJestConfigs(
164
+ fullPath,
165
+ referenceConfig,
166
+ checkOnly
167
+ );
168
+
169
+ // Combine results
170
+ result.matched = result.matched.concat(subResult.matched);
171
+ result.mismatched = result.mismatched.concat(
172
+ subResult.mismatched
173
+ );
174
+ result.processed += subResult.processed;
175
+ }
176
+ }
177
+ } catch (error) {
178
+ console.error(
179
+ `Error processing directory ${directory}: ${error instanceof Error ? error.message : String(error)}`
180
+ );
181
+ }
182
+
183
+ return result;
184
+ };
185
+
186
+ async function main(): Promise<void> {
187
+ // Parse command line arguments
188
+ const args = process.argv.slice(2);
189
+ const checkMode = args.includes('--check');
190
+
191
+ // Find the reference file argument (--reference=path/to/jest.config.js)
192
+ const referenceArg = args.find((arg) => arg.startsWith('--reference='));
193
+ const referenceFilePath = referenceArg
194
+ ? referenceArg.split('=')[1]
195
+ : undefined;
196
+
197
+ // Find the start directory argument (any argument not starting with --)
198
+ const startDirectory =
199
+ args.find((arg) => !arg.startsWith('--')) ||
200
+ path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
201
+
202
+ // Get the reference configuration
203
+ const referenceConfig = await getReferenceConfig(referenceFilePath);
204
+
205
+ if (checkMode) {
206
+ console.info(`Checking jest.config.js files in: ${startDirectory}`);
207
+ const { matched, mismatched, processed } = await processJestConfigs(
208
+ startDirectory,
209
+ referenceConfig,
210
+ true
211
+ );
212
+
213
+ console.info('\n--- Jest Config Check Summary ---');
214
+ console.info(`Total jest.config.js files found: ${processed}`);
215
+ console.info(`Files matching reference config: ${matched.length}`);
216
+ console.info(
217
+ `Files NOT matching reference config: ${mismatched.length}`
218
+ );
219
+
220
+ if (mismatched.length > 0) {
221
+ console.info('\nMismatched files:');
222
+ mismatched.forEach((file) => console.info(`- ${file}`));
223
+
224
+ console.info('\nRun without --check to update these files.');
225
+ }
226
+ } else {
227
+ console.info(
228
+ `Starting to update jest.config.js files in: ${startDirectory}`
229
+ );
230
+ const { matched, mismatched, processed } = await processJestConfigs(
231
+ startDirectory,
232
+ referenceConfig,
233
+ false
234
+ );
235
+
236
+ console.info('\n--- Jest Config Update Summary ---');
237
+ console.info(`Total jest.config.js files found: ${processed}`);
238
+ console.info(`Files successfully updated: ${matched.length}`);
239
+ console.info(`Files with update errors: ${mismatched.length}`);
240
+
241
+ if (mismatched.length > 0) {
242
+ console.info('\nFiles with errors:');
243
+ mismatched.forEach((file) => console.info(`- ${file}`));
244
+ }
245
+ }
246
+ }
247
+
248
+ main();
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 AZLE token holders (nlhft-2iaaa-aaaae-qaaua-cai)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,42 @@
1
+ # Azle License Extension
2
+
3
+ Last updated: March 14, 2022
4
+
5
+ ## AZLE Token
6
+
7
+ The AZLE token currently exists at canister id nlhft-2iaaa-aaaae-qaaua-cai on the [Internet Computer](https://internetcomputer.org/) and its source code can be found [here](https://github.com/lastmjs/extendable-token-azle).
8
+
9
+ ## Contributor Agreement
10
+
11
+ Contributors to Azle agree to the following:
12
+
13
+ 1. You have all of the necessary legal rights, including any required permission from your employer, to include your contributions in the Azle project
14
+ 2. You transfer all of your copyright ownership in your contributions to the AZLE token holders
15
+ 3. You may or may not receive an AZLE token allocation based on your contributions
16
+ 4. AZLE token allocations are subject to the discretion of the AZLE token holders
17
+ 5. Regulatory compliance may prevent an allocation of AZLE tokens to any contributor
18
+ 6. Demergent Labs currently owns the majority of AZLE tokens
19
+ 7. By receiving AZLE tokens you agree to the following:
20
+ 1. AZLE tokens are not transferable
21
+ 2. AZLE token holder decisions will be made through majority (more than half) voting where one AZLE token equals one vote
22
+ 3. AZLE token holder votes control at least the following items:
23
+ 1. AZLE token holders' copyrights
24
+ 2. AZLE token allocations
25
+ 3. Amendments to this agreement
26
+ 4. AZLE token holders do not control [Demergent Labs' Azle repository](https://github.com/demergent-labs/azle)
27
+
28
+ To show your acceptance of this agreement with an electronic signature, add yourself to the list of contributors below on a new branch with a signed and GitHub-verified git commit. Pull request that branch into the main branch of [Demergent Labs' Azle repository](https://github.com/demergent-labs/azle).
29
+
30
+ Your electronic signature will be considered final once the commit is included in the main branch of [Demergent Labs' Azle repository](https://github.com/demergent-labs/azle).
31
+
32
+ ## Contributors
33
+
34
+ | Legal Name | GitHub Username | Country of Residence | Date |
35
+ | ---------------- | --------------- | -------------------- | ----------------- |
36
+ | Jordan Last | lastmjs | United States | March 14, 2022 |
37
+ | Dan Steren | dansteren | United States | March 14, 2022 |
38
+ | Radu Cazacu | Raduc4 | Moldova | March 24, 2022 |
39
+ | Tarek Mouawad | tarek-eg | Germany | March 31, 2022 |
40
+ | Quint Daenen | di-wu | Belgium | May 21, 2022 |
41
+ | Ryan Vandersmith | rvanasa | United States | September 3, 2022 |
42
+ | Shreyansh Jain | sudoshreyansh | India | May 3, 2024 |
package/NOTICE ADDED
@@ -0,0 +1,222 @@
1
+ This NOTICE pertains to some code snippets shown in [README.md](/README.md), various `JSDocs`, and other documentation.
2
+
3
+ Copyright 2021 DFINITY Stiftung
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
6
+ this file except in compliance with the License. You may obtain a copy of the
7
+ License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software distributed
12
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
14
+ specific language governing permissions and limitations under the License.
15
+
16
+ [README.md](/README.md) contains derivative works licensed as MIT: https://github.com/demergent-labs/azle/blob/main/LICENSE
17
+
18
+ ---
19
+
20
+ Some code adapted or taken from https://github.com/dfinity/ic-quickjs-demo are licensed as follows:
21
+
22
+ Apache License
23
+ Version 2.0, January 2004
24
+ http://www.apache.org/licenses/
25
+
26
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
27
+
28
+ 1. Definitions.
29
+
30
+ "License" shall mean the terms and conditions for use, reproduction,
31
+ and distribution as defined by Sections 1 through 9 of this document.
32
+
33
+ "Licensor" shall mean the copyright owner or entity authorized by
34
+ the copyright owner that is granting the License.
35
+
36
+ "Legal Entity" shall mean the union of the acting entity and all
37
+ other entities that control, are controlled by, or are under common
38
+ control with that entity. For the purposes of this definition,
39
+ "control" means (i) the power, direct or indirect, to cause the
40
+ direction or management of such entity, whether by contract or
41
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
42
+ outstanding shares, or (iii) beneficial ownership of such entity.
43
+
44
+ "You" (or "Your") shall mean an individual or Legal Entity
45
+ exercising permissions granted by this License.
46
+
47
+ "Source" form shall mean the preferred form for making modifications,
48
+ including but not limited to software source code, documentation
49
+ source, and configuration files.
50
+
51
+ "Object" form shall mean any form resulting from mechanical
52
+ transformation or translation of a Source form, including but
53
+ not limited to compiled object code, generated documentation,
54
+ and conversions to other media types.
55
+
56
+ "Work" shall mean the work of authorship, whether in Source or
57
+ Object form, made available under the License, as indicated by a
58
+ copyright notice that is included in or attached to the work
59
+ (an example is provided in the Appendix below).
60
+
61
+ "Derivative Works" shall mean any work, whether in Source or Object
62
+ form, that is based on (or derived from) the Work and for which the
63
+ editorial revisions, annotations, elaborations, or other modifications
64
+ represent, as a whole, an original work of authorship. For the purposes
65
+ of this License, Derivative Works shall not include works that remain
66
+ separable from, or merely link (or bind by name) to the interfaces of,
67
+ the Work and Derivative Works thereof.
68
+
69
+ "Contribution" shall mean any work of authorship, including
70
+ the original version of the Work and any modifications or additions
71
+ to that Work or Derivative Works thereof, that is intentionally
72
+ submitted to Licensor for inclusion in the Work by the copyright owner
73
+ or by an individual or Legal Entity authorized to submit on behalf of
74
+ the copyright owner. For the purposes of this definition, "submitted"
75
+ means any form of electronic, verbal, or written communication sent
76
+ to the Licensor or its representatives, including but not limited to
77
+ communication on electronic mailing lists, source code control systems,
78
+ and issue tracking systems that are managed by, or on behalf of, the
79
+ Licensor for the purpose of discussing and improving the Work, but
80
+ excluding communication that is conspicuously marked or otherwise
81
+ designated in writing by the copyright owner as "Not a Contribution."
82
+
83
+ "Contributor" shall mean Licensor and any individual or Legal Entity
84
+ on behalf of whom a Contribution has been received by Licensor and
85
+ subsequently incorporated within the Work.
86
+
87
+ 2. Grant of Copyright License. Subject to the terms and conditions of
88
+ this License, each Contributor hereby grants to You a perpetual,
89
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
90
+ copyright license to reproduce, prepare Derivative Works of,
91
+ publicly display, publicly perform, sublicense, and distribute the
92
+ Work and such Derivative Works in Source or Object form.
93
+
94
+ 3. Grant of Patent License. Subject to the terms and conditions of
95
+ this License, each Contributor hereby grants to You a perpetual,
96
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
97
+ (except as stated in this section) patent license to make, have made,
98
+ use, offer to sell, sell, import, and otherwise transfer the Work,
99
+ where such license applies only to those patent claims licensable
100
+ by such Contributor that are necessarily infringed by their
101
+ Contribution(s) alone or by combination of their Contribution(s)
102
+ with the Work to which such Contribution(s) was submitted. If You
103
+ institute patent litigation against any entity (including a
104
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
105
+ or a Contribution incorporated within the Work constitutes direct
106
+ or contributory patent infringement, then any patent licenses
107
+ granted to You under this License for that Work shall terminate
108
+ as of the date such litigation is filed.
109
+
110
+ 4. Redistribution. You may reproduce and distribute copies of the
111
+ Work or Derivative Works thereof in any medium, with or without
112
+ modifications, and in Source or Object form, provided that You
113
+ meet the following conditions:
114
+
115
+ (a) You must give any other recipients of the Work or
116
+ Derivative Works a copy of this License; and
117
+
118
+ (b) You must cause any modified files to carry prominent notices
119
+ stating that You changed the files; and
120
+
121
+ (c) You must retain, in the Source form of any Derivative Works
122
+ that You distribute, all copyright, patent, trademark, and
123
+ attribution notices from the Source form of the Work,
124
+ excluding those notices that do not pertain to any part of
125
+ the Derivative Works; and
126
+
127
+ (d) If the Work includes a "NOTICE" text file as part of its
128
+ distribution, then any Derivative Works that You distribute must
129
+ include a readable copy of the attribution notices contained
130
+ within such NOTICE file, excluding those notices that do not
131
+ pertain to any part of the Derivative Works, in at least one
132
+ of the following places: within a NOTICE text file distributed
133
+ as part of the Derivative Works; within the Source form or
134
+ documentation, if provided along with the Derivative Works; or,
135
+ within a display generated by the Derivative Works, if and
136
+ wherever such third-party notices normally appear. The contents
137
+ of the NOTICE file are for informational purposes only and
138
+ do not modify the License. You may add Your own attribution
139
+ notices within Derivative Works that You distribute, alongside
140
+ or as an addendum to the NOTICE text from the Work, provided
141
+ that such additional attribution notices cannot be construed
142
+ as modifying the License.
143
+
144
+ You may add Your own copyright statement to Your modifications and
145
+ may provide additional or different license terms and conditions
146
+ for use, reproduction, or distribution of Your modifications, or
147
+ for any such Derivative Works as a whole, provided Your use,
148
+ reproduction, and distribution of the Work otherwise complies with
149
+ the conditions stated in this License.
150
+
151
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
152
+ any Contribution intentionally submitted for inclusion in the Work
153
+ by You to the Licensor shall be under the terms and conditions of
154
+ this License, without any additional terms or conditions.
155
+ Notwithstanding the above, nothing herein shall supersede or modify
156
+ the terms of any separate license agreement you may have executed
157
+ with Licensor regarding such Contributions.
158
+
159
+ 6. Trademarks. This License does not grant permission to use the trade
160
+ names, trademarks, service marks, or product names of the Licensor,
161
+ except as required for reasonable and customary use in describing the
162
+ origin of the Work and reproducing the content of the NOTICE file.
163
+
164
+ 7. Disclaimer of Warranty. Unless required by applicable law or
165
+ agreed to in writing, Licensor provides the Work (and each
166
+ Contributor provides its Contributions) on an "AS IS" BASIS,
167
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
168
+ implied, including, without limitation, any warranties or conditions
169
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
170
+ PARTICULAR PURPOSE. You are solely responsible for determining the
171
+ appropriateness of using or redistributing the Work and assume any
172
+ risks associated with Your exercise of permissions under this License.
173
+
174
+ 8. Limitation of Liability. In no event and under no legal theory,
175
+ whether in tort (including negligence), contract, or otherwise,
176
+ unless required by applicable law (such as deliberate and grossly
177
+ negligent acts) or agreed to in writing, shall any Contributor be
178
+ liable to You for damages, including any direct, indirect, special,
179
+ incidental, or consequential damages of any character arising as a
180
+ result of this License or out of the use or inability to use the
181
+ Work (including but not limited to damages for loss of goodwill,
182
+ work stoppage, computer failure or malfunction, or any and all
183
+ other commercial damages or losses), even if such Contributor
184
+ has been advised of the possibility of such damages.
185
+
186
+ 9. Accepting Warranty or Additional Liability. While redistributing
187
+ the Work or Derivative Works thereof, You may choose to offer,
188
+ and charge a fee for, acceptance of support, warranty, indemnity,
189
+ or other liability obligations and/or rights consistent with this
190
+ License. However, in accepting such obligations, You may act only
191
+ on Your own behalf and on Your sole responsibility, not on behalf
192
+ of any other Contributor, and only if You agree to indemnify,
193
+ defend, and hold each Contributor harmless for any liability
194
+ incurred by, or claims asserted against, such Contributor by reason
195
+ of your accepting any such warranty or additional liability.
196
+
197
+ END OF TERMS AND CONDITIONS
198
+
199
+ APPENDIX: How to apply the Apache License to your work.
200
+
201
+ To apply the Apache License to your work, attach the following
202
+ boilerplate notice, with the fields enclosed by brackets "[]"
203
+ replaced with your own identifying information. (Don't include
204
+ the brackets!) The text should be enclosed in the appropriate
205
+ comment syntax for the file format. We also recommend that a
206
+ file or class name and description of purpose be included on the
207
+ same "printed page" as the copyright notice for easier
208
+ identification within third-party archives.
209
+
210
+ Copyright 2023 DFINITY Foundation
211
+
212
+ Licensed under the Apache License, Version 2.0 (the "License");
213
+ you may not use this file except in compliance with the License.
214
+ You may obtain a copy of the License at
215
+
216
+ http://www.apache.org/licenses/LICENSE-2.0
217
+
218
+ Unless required by applicable law or agreed to in writing, software
219
+ distributed under the License is distributed on an "AS IS" BASIS,
220
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
221
+ See the License for the specific language governing permissions and
222
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,78 @@
1
+ <div align="center">
2
+ <a href="https://github.com/demergent-labs/azle" target="_blank" rel="noopener noreferrer">
3
+ <img height="150" src="https://raw.githubusercontent.com/demergent-labs/azle/main/logo/logo.svg" alt="Azle logo">
4
+ </a>
5
+ </div>
6
+ </br>
7
+ <div align="center">
8
+ <a href="https://github.com/demergent-labs/azle/actions/workflows/test.yml?query=branch%3Amain">
9
+ <img src="https://github.com/demergent-labs/azle/actions/workflows/test.yml/badge.svg" alt="Coverage Status">
10
+ </a>
11
+ <a href="https://npmcharts.com/compare/azle?minimal=true"><img src="https://img.shields.io/npm/dm/azle.svg" alt="Downloads"></a>
12
+ <a href="https://www.npmjs.com/package/azle"><img src="https://img.shields.io/npm/v/azle.svg" alt="Version"></a>
13
+ <a href="https://github.com/demergent-labs/azle/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/azle.svg" alt="License"></a>
14
+ </div>
15
+
16
+ # Azle (Release Candidate)
17
+
18
+ TypeScript and JavaScript CDK for the [Internet Computer](https://internetcomputer.org/).
19
+
20
+ ## Disclaimer
21
+
22
+ Azle stable mode is continuously subjected to [intense scrutiny and testing](https://github.com/demergent-labs/azle/actions), however it has not yet undergone intense security review.
23
+
24
+ ## Stable Mode
25
+
26
+ Azle runs in stable mode by default.
27
+
28
+ This mode is intended for production use after Azle's imminent 1.0 release. Its focus is on API and runtime stability, security, performance, TypeScript and JavaScript language support, the ICP APIs, and Candid remote procedure calls (RPC). There is minimal support for the Node.js standard library, npm ecosystem, and HTTP server functionality.
29
+
30
+ ## Experimental Mode
31
+
32
+ Azle runs in experimental mode through explicitly enabling a flag in `dfx.json` or certain CLI commands.
33
+
34
+ This mode is intended for developers who are willing to accept the risk of using an alpha or beta project. Its focus is on quickly enabling new features and functionality without requiring the time and other resources necessary to advance them to the stable mode. The Node.js standard libary, npm ecosystem, and HTTP server functionality are also major areas of focus.
35
+
36
+ > NOTE: Keep clearly in mind that the experimental mode fundamentally changes the Azle Wasm binary. It is not guaranteed to be secure or stable in API changes or runtime behavior. If you enable the experimental mode, even if you only use APIs from the stable mode, you are accepting a higher risk of bugs, errors, crashes, security exploits, breaking API changes, etc.
37
+
38
+ ## Get Started
39
+
40
+ The quickest way to get started is through the [hello_world Candid RPC example](https://github.com/demergent-labs/azle/tree/main/examples/stable/demo/hello_world) or the [hello_world HTTP Server example](https://github.com/demergent-labs/azle/tree/main/examples/experimental/demo/hello_world_http_server).
41
+
42
+ You can create the hello_world Candid RPC example locally like this:
43
+
44
+ ```bash
45
+ npx azle new hello_world
46
+ cd hello_world
47
+
48
+ # Now read the README.md
49
+ ```
50
+
51
+ You can create the hello_world HTTP Server example locally like this:
52
+
53
+ ```bash
54
+ npx azle new hello_world --http-server --experimental
55
+ cd hello_world
56
+
57
+ # Now read the README.md
58
+ ```
59
+
60
+ ## Documentation
61
+
62
+ See [The Azle Book](https://demergent-labs.github.io/azle/).
63
+
64
+ ## Discussion
65
+
66
+ Feel free to open issues or join us in the [Discord channel](https://discord.gg/5Hb6rM2QUM).
67
+
68
+ ## Contributing
69
+
70
+ All contributors must agree to and sign the [Azle License Extension](/LICENSE_EXTENSION.md).
71
+
72
+ Please reach out before working on anything that is not in the [good first issues](https://github.com/demergent-labs/azle/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) or [help wanted issues](https://github.com/demergent-labs/azle/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). Before beginning work on a contribution, please create or comment on the issue you want to work on and wait for clearance from Demergent Labs.
73
+
74
+ See [Demergent Labs' Coding Guidelines](/contributing/coding-guidelines.md) for what to expect during code reviews.
75
+
76
+ ## License
77
+
78
+ Azle's copyright is governed by the [LICENSE](/LICENSE) and [LICENSE_EXTENSION](/LICENSE_EXTENSION.md).