@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.
- package/.scripts/add_metadata_to_dfx_json.js +54 -0
- package/.scripts/cargo_expand.sh +17 -0
- package/.scripts/class_migration/add_example_dependency.js +54 -0
- package/.scripts/class_migration/change_to_custom_candid_gen.js +76 -0
- package/.scripts/class_migration/clean_package.js +27 -0
- package/.scripts/class_migration/copy_generated_candid_from_example.js +90 -0
- package/.scripts/class_migration/delete_tests_file.js +22 -0
- package/.scripts/class_migration/do_all_packages.js +61 -0
- package/.scripts/class_migration/modify_pretest.js +57 -0
- package/.scripts/class_migration/name_package.js +62 -0
- package/.scripts/class_migration/update_test.js +38 -0
- package/.scripts/class_migration/update_ts_config.js +48 -0
- package/.scripts/class_migration/update_typescript.js +99 -0
- package/.scripts/clean_all_projects.ts +91 -0
- package/.scripts/delete_git_branches.sh +20 -0
- package/.scripts/dev_dependencies/add_dev_dependencies.js +53 -0
- package/.scripts/dev_dependencies/remove_dev_dependencies.js +44 -0
- package/.scripts/examples-survey.json +5651 -0
- package/.scripts/file_generator/bin.js +4 -0
- package/.scripts/file_generator/index.ts +59 -0
- package/.scripts/file_generator/main.ts +55 -0
- package/.scripts/find_multiline_files.ts +101 -0
- package/.scripts/hash_file.ts +9 -0
- package/.scripts/hash_file_by_parts/bin.js +4 -0
- package/.scripts/hash_file_by_parts/index.ts +48 -0
- package/.scripts/hash_file_by_parts/main.ts +10 -0
- package/.scripts/jest_isolate_modules.js +29 -0
- package/.scripts/jest_migration.sh +31 -0
- package/.scripts/reorder_dfx_json.js +72 -0
- package/.scripts/setup_release_branch.sh +34 -0
- package/.scripts/simplify_tsconfig.js +37 -0
- package/.scripts/survey_examples.ts +396 -0
- package/.scripts/tsx_migration/ts_node_to_tsx.js +76 -0
- package/.scripts/update_candid.sh +40 -0
- package/.scripts/update_dfx_json_main.js +66 -0
- package/.scripts/update_dfx_json_with_optimize.py +22 -0
- package/.scripts/update_jest_configs.ts +248 -0
- package/LICENSE +21 -0
- package/LICENSE_EXTENSION.md +42 -0
- package/NOTICE +222 -0
- package/README.md +78 -0
- package/dist/canister_templates/experimental.wasm +0 -0
- package/dist/canister_templates/licenses.yml +29186 -0
- package/dist/canister_templates/stable.wasm +0 -0
- package/examples/README.md +22 -0
- package/examples/experimental/demo/hello_world_http_server/README.md +120 -0
- package/examples/experimental/demo/hello_world_http_server/benchmarks.json +42 -0
- package/examples/experimental/demo/hello_world_http_server/benchmarks.md +28 -0
- package/examples/experimental/demo/hello_world_http_server/dfx.json +13 -0
- package/examples/experimental/demo/hello_world_http_server/env.d.ts +9 -0
- package/examples/experimental/demo/hello_world_http_server/jest.config.js +10 -0
- package/examples/experimental/demo/hello_world_http_server/package-lock.json +8409 -0
- package/examples/experimental/demo/hello_world_http_server/package.json +20 -0
- package/examples/experimental/demo/hello_world_http_server/src/backend/index.ts +23 -0
- package/examples/experimental/demo/hello_world_http_server/src/frontend/index.html +16 -0
- package/examples/experimental/demo/hello_world_http_server/src/frontend/index.ts +62 -0
- package/examples/experimental/demo/hello_world_http_server/test/pretest.ts +13 -0
- package/examples/experimental/demo/hello_world_http_server/test/test.ts +9 -0
- package/examples/experimental/demo/hello_world_http_server/test/tests.ts +27 -0
- package/examples/experimental/demo/hello_world_http_server/tsconfig.json +13 -0
- package/examples/package-lock.json +8746 -0
- package/examples/package.json +17 -0
- package/examples/stable/demo/hello_world/README.md +97 -0
- package/examples/stable/demo/hello_world/benchmarks.json +28 -0
- package/examples/stable/demo/hello_world/benchmarks.md +26 -0
- package/examples/stable/demo/hello_world/dfx.json +12 -0
- package/examples/stable/demo/hello_world/jest.config.js +10 -0
- package/examples/stable/demo/hello_world/package-lock.json +5524 -0
- package/examples/stable/demo/hello_world/package.json +14 -0
- package/examples/stable/demo/hello_world/src/index.ts +15 -0
- package/examples/stable/demo/hello_world/test/pretest.ts +17 -0
- package/examples/stable/demo/hello_world/test/test.ts +15 -0
- package/examples/stable/demo/hello_world/test/tests.ts +27 -0
- package/examples/stable/demo/hello_world/tsconfig.json +10 -0
- package/jest.config.dev.js +10 -0
- package/package.json +102 -0
- package/src/build.ts +98 -0
- package/src/experimental/build/assert_experimental.ts +5 -0
- package/src/experimental/build/commands/build/candid_and_method_meta.ts +30 -0
- package/src/experimental/build/commands/build/custom_js_modules/acorn/acorn.ts +6 -0
- package/src/experimental/build/commands/build/custom_js_modules/acorn/walk.ts +6 -0
- package/src/experimental/build/commands/build/custom_js_modules/async_hooks.ts +11 -0
- package/src/experimental/build/commands/build/custom_js_modules/https.ts +6 -0
- package/src/experimental/build/commands/build/custom_js_modules/perf_hooks.ts +12 -0
- package/src/experimental/build/commands/build/file_watcher/file_watcher.ts +152 -0
- package/src/experimental/build/commands/build/file_watcher/file_watcher_loader.js +9 -0
- package/src/experimental/build/commands/build/file_watcher/setup_file_watcher.ts +61 -0
- package/src/experimental/build/commands/build/get_context.ts +61 -0
- package/src/experimental/build/commands/build/index.ts +87 -0
- package/src/experimental/build/commands/build/javascript.ts +194 -0
- package/src/experimental/build/commands/build/wasm_binary/index.ts +32 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/Cargo.toml +26 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/autoreload.rs +46 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/benchmarking.rs +35 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/candid.rs +106 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/chunk.rs +11 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/execute_method_js.rs +46 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/guards.rs +9 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/accept_message.rs +10 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/call_raw.rs +265 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/candid_compiler.rs +19 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/candid_decode.rs +17 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/candid_encode.rs +17 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/canister_cycle_balance.rs +12 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/canister_self.rs +10 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/canister_version.rs +10 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/certified_data_set.rs +17 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/clear_timer.rs +18 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/cycles_burn.rs +17 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/data_certificate.rs +13 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/debug_print.rs +17 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/drain_microtasks.rs +23 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/in_replicated_execution.rs +8 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/is_controller.rs +16 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/mod.rs +351 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_arg_data.rs +10 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_caller.rs +10 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_cycles_accept.rs +17 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_cycles_available.rs +10 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_cycles_refunded.rs +10 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_method_name.rs +8 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reject.rs +16 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reject_code.rs +8 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reject_msg.rs +8 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reply.rs +19 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/notify_raw.rs +65 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/performance_counter.rs +19 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/rand_bytes.rs +25 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/rand_seed.rs +30 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/set_timer.rs +83 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/set_timer_interval.rs +66 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_contains_key.rs +32 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_get.rs +36 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_init.rs +29 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_insert.rs +46 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_is_empty.rs +23 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_items.rs +59 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_keys.rs +54 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_len.rs +23 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_remove.rs +36 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_values.rs +54 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/time.rs +8 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/trap.rs +14 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/init_and_post_upgrade.rs +212 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/internal_canister_methods.rs +142 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/lib.rs +35 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/stable_b_tree_map.rs +50 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/bytes_to_human_readable.rs +20 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/file_info.rs +60 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/hash.rs +111 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/mod.rs +20 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/reset.rs +15 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/upload_file_chunk.rs +88 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/wasm_binary_manipulation.rs +276 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/web_assembly/instantiate.rs +195 -0
- package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/web_assembly/mod.rs +24 -0
- package/src/experimental/build/commands/upload_assets/file_uploader/bytes_to_human_readable.ts +27 -0
- package/src/experimental/build/commands/upload_assets/file_uploader/expand_paths.ts +50 -0
- package/src/experimental/build/commands/upload_assets/file_uploader/get_files_to_upload.ts +21 -0
- package/src/experimental/build/commands/upload_assets/file_uploader/incomplete_files.ts +28 -0
- package/src/experimental/build/commands/upload_assets/file_uploader/index.ts +43 -0
- package/src/experimental/build/commands/upload_assets/file_uploader/on_before_exit.ts +34 -0
- package/src/experimental/build/commands/upload_assets/file_uploader/upload_file.ts +91 -0
- package/src/experimental/build/commands/upload_assets/file_uploader/uploader_actor.ts +51 -0
- package/src/experimental/build/commands/upload_assets/index.ts +16 -0
- package/src/experimental/build/commands/upload_assets/uploader_identity.ts +23 -0
- package/src/experimental/build/index.ts +61 -0
- package/src/experimental/build/utils/dfx.ts +212 -0
- package/src/experimental/build/utils/filter_async.ts +14 -0
- package/src/experimental/build/utils/find_project_root.ts +67 -0
- package/src/experimental/build/utils/global_paths.ts +8 -0
- package/src/experimental/build/utils/log_success.ts +18 -0
- package/src/experimental/build/utils/types.ts +34 -0
- package/src/experimental/lib/assert_experimental.ts +19 -0
- package/src/experimental/lib/fetch/file.ts +15 -0
- package/src/experimental/lib/fetch/headers.ts +85 -0
- package/src/experimental/lib/fetch/http.ts +293 -0
- package/src/experimental/lib/fetch/icp.ts +98 -0
- package/src/experimental/lib/fetch/index.ts +97 -0
- package/src/experimental/lib/fetch/response.ts +171 -0
- package/src/experimental/lib/fetch/url.ts +15 -0
- package/src/experimental/lib/globals.ts +146 -0
- package/src/experimental/lib/http_client/fetch_ic/actor.ts +131 -0
- package/src/experimental/lib/http_client/fetch_ic/agent.ts +20 -0
- package/src/experimental/lib/http_client/fetch_ic/call.ts +257 -0
- package/src/experimental/lib/http_client/fetch_ic/get_canister_id.ts +25 -0
- package/src/experimental/lib/http_client/fetch_ic/host.ts +30 -0
- package/src/experimental/lib/http_client/fetch_ic/identity.ts +52 -0
- package/src/experimental/lib/http_client/fetch_ic/index.ts +95 -0
- package/src/experimental/lib/http_client/fetch_ic/response.ts +8 -0
- package/src/experimental/lib/http_client/index.ts +6 -0
- package/src/experimental/lib/http_client/to_jwt.ts +6 -0
- package/src/experimental/lib/ic/azle_ic_experimental.ts +92 -0
- package/src/experimental/lib/ic/candid_compiler.ts +14 -0
- package/src/experimental/lib/ic/index.ts +10 -0
- package/src/experimental/lib/ic/set_outgoing_http_options.ts +18 -0
- package/src/experimental/lib/index.ts +7 -0
- package/src/experimental/lib/server.ts +279 -0
- package/src/experimental/lib/threshold_wallet/calculate_rsv_for_tecdsa.ts +45 -0
- package/src/experimental/lib/threshold_wallet/ecdsa_public_key.ts +33 -0
- package/src/experimental/lib/threshold_wallet/index.ts +7 -0
- package/src/experimental/lib/threshold_wallet/register_get_url.ts +36 -0
- package/src/experimental/lib/threshold_wallet/sign_with_ecdsa.ts +28 -0
- package/src/experimental/lib/threshold_wallet/wallet.ts +99 -0
- package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/complex_candid_definition_memo.ts +113 -0
- package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/index.ts +73 -0
- package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/recursive_candid_definition_memo.ts +28 -0
- package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/simple_candid_definition_arb.ts +116 -0
- package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/types.ts +117 -0
- package/src/experimental/test/property/arbitraries/candid/candid_return_type_arb.ts +22 -0
- package/src/experimental/test/property/arbitraries/candid/candid_type.ts +83 -0
- package/src/experimental/test/property/arbitraries/candid/candid_value_and_meta_arb.ts +84 -0
- package/src/experimental/test/property/arbitraries/candid/candid_value_and_meta_arb_generator.ts +63 -0
- package/src/experimental/test/property/arbitraries/candid/candid_values_arb.ts +173 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/blob_arb/definition_arb.ts +11 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/blob_arb/index.ts +19 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/blob_arb/values_arb.ts +11 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/opt_arb/definition_arb.ts +172 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/opt_arb/index.ts +29 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/opt_arb/values_arb.ts +88 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/record_arb/definition_arb.ts +184 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/record_arb/index.ts +34 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/record_arb/values_arb.ts +95 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/tuple_arb/definition_arb.ts +159 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/tuple_arb/index.ts +31 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/tuple_arb/values_arbs.ts +76 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/variant_arb/definition_arbs.ts +257 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/variant_arb/index.ts +37 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/variant_arb/values_arb.ts +92 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/vec_arb/definition_arb.ts +203 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/vec_arb/index.ts +39 -0
- package/src/experimental/test/property/arbitraries/candid/constructed/vec_arb/values_arb.ts +257 -0
- package/src/experimental/test/property/arbitraries/candid/corresponding_js_type.ts +34 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/bool_arb.ts +28 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/floats/float32_arb.ts +56 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/floats/float64_arb.ts +56 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/ints/index.ts +11 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/ints/int16_arb.ts +34 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/ints/int32_arb.ts +34 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/ints/int64_arb.ts +41 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/ints/int8_arb.ts +34 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/ints/int_arb.ts +39 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/nats/index.ts +11 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat16_arb.ts +34 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat32_arb.ts +34 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat64_arb.ts +41 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat8_arb.ts +34 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat_arb.ts +39 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/null_arb.ts +33 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/text_arb.ts +47 -0
- package/src/experimental/test/property/arbitraries/candid/primitive/void_arb.ts +33 -0
- package/src/experimental/test/property/arbitraries/candid/recursive/definition_arb.ts +125 -0
- package/src/experimental/test/property/arbitraries/candid/recursive/index.ts +35 -0
- package/src/experimental/test/property/arbitraries/candid/recursive/values_arb.ts +43 -0
- package/src/experimental/test/property/arbitraries/candid/reference/func_arb/definition_arb.ts +198 -0
- package/src/experimental/test/property/arbitraries/candid/reference/func_arb/index.ts +23 -0
- package/src/experimental/test/property/arbitraries/candid/reference/func_arb/values_arb.ts +70 -0
- package/src/experimental/test/property/arbitraries/candid/reference/principal_arb.ts +43 -0
- package/src/experimental/test/property/arbitraries/candid/reference/service_arb/definition_arb.ts +163 -0
- package/src/experimental/test/property/arbitraries/candid/reference/service_arb/index.ts +41 -0
- package/src/experimental/test/property/arbitraries/candid/reference/service_arb/service_method_arb.ts +110 -0
- package/src/experimental/test/property/arbitraries/candid/reference/service_arb/values_arb.ts +20 -0
- package/src/experimental/test/property/arbitraries/candid/simple_type_arbs/candid_type_to_azle_candid_type.ts +66 -0
- package/src/experimental/test/property/arbitraries/candid/simple_type_arbs/definition_arb.ts +95 -0
- package/src/experimental/test/property/arbitraries/candid/simple_type_arbs/values_arb.ts +19 -0
- package/src/experimental/test/property/arbitraries/candid/to_src_literal/bigint.ts +5 -0
- package/src/experimental/test/property/arbitraries/candid/to_src_literal/blob.ts +5 -0
- package/src/experimental/test/property/arbitraries/candid/to_src_literal/boolean.ts +5 -0
- package/src/experimental/test/property/arbitraries/candid/to_src_literal/float.ts +18 -0
- package/src/experimental/test/property/arbitraries/candid/to_src_literal/null.ts +5 -0
- package/src/experimental/test/property/arbitraries/candid/to_src_literal/number.ts +5 -0
- package/src/experimental/test/property/arbitraries/candid/to_src_literal/principal.ts +7 -0
- package/src/experimental/test/property/arbitraries/candid/to_src_literal/string.ts +12 -0
- package/src/experimental/test/property/arbitraries/candid/to_src_literal/void.ts +5 -0
- package/src/experimental/test/property/arbitraries/canister_arb.ts +195 -0
- package/src/experimental/test/property/arbitraries/canister_methods/index.ts +79 -0
- package/src/experimental/test/property/arbitraries/canister_methods/init_method_arb.ts +127 -0
- package/src/experimental/test/property/arbitraries/canister_methods/inspect_message_method_arb.ts +55 -0
- package/src/experimental/test/property/arbitraries/canister_methods/post_upgrade_method_arb.ts +133 -0
- package/src/experimental/test/property/arbitraries/canister_methods/pre_upgrade_method_arb.ts +57 -0
- package/src/experimental/test/property/arbitraries/canister_methods/query_method_arb.ts +141 -0
- package/src/experimental/test/property/arbitraries/canister_methods/update_method_arb.ts +158 -0
- package/src/experimental/test/property/arbitraries/config.ts +4 -0
- package/src/experimental/test/property/arbitraries/http/body_arb.ts +7 -0
- package/src/experimental/test/property/arbitraries/http/headers_arb.ts +22 -0
- package/src/experimental/test/property/arbitraries/http/request_arb.ts +158 -0
- package/src/experimental/test/property/arbitraries/http/response_arb.ts +192 -0
- package/src/experimental/test/property/arbitraries/js_name_arb.ts +144 -0
- package/src/experimental/test/property/arbitraries/stable_b_tree_map_arb.ts +55 -0
- package/src/experimental/test/property/arbitraries/types.ts +24 -0
- package/src/experimental/test/property/arbitraries/unique_identifier_arb.ts +38 -0
- package/src/experimental/test/property/arbitraries/unique_primitive_arb.ts +22 -0
- package/src/experimental/test/property/are_params_correctly_ordered.ts +19 -0
- package/src/experimental/test/property/get_actor.ts +39 -0
- package/src/experimental/test/property/index.ts +141 -0
- package/src/experimental/test/property/test/index.ts +226 -0
- package/src/experimental/test/property/visitors/LICENCE +201 -0
- package/src/experimental/test/property/visitors/cli-string-visitor.ts +138 -0
- package/src/experimental/test/set_experimental.ts +1 -0
- package/src/exports/_internal/dfx.ts +1 -0
- package/src/exports/_internal/globals.ts +1 -0
- package/src/exports/_internal/test/candid_deep_equal.ts +1 -0
- package/src/exports/_internal/test.ts +1 -0
- package/src/exports/_internal/type_tests/assert_type.ts +1 -0
- package/src/exports/_internal.ts +1 -0
- package/src/exports/canisters/ck_btc_ledger/idl.ts +1 -0
- package/src/exports/canisters/ck_eth_ledger/idl.ts +1 -0
- package/src/exports/canisters/cycles_ledger/idl.ts +1 -0
- package/src/exports/canisters/evm_rpc/idl.ts +1 -0
- package/src/exports/canisters/exchange_rate/idl.ts +1 -0
- package/src/exports/canisters/http_gateway/idl.ts +1 -0
- package/src/exports/canisters/icrc_1/idl.ts +1 -0
- package/src/exports/canisters/icrc_10/idl.ts +1 -0
- package/src/exports/canisters/icrc_2/idl.ts +1 -0
- package/src/exports/canisters/icrc_3/idl.ts +1 -0
- package/src/exports/canisters/icrc_37/idl.ts +1 -0
- package/src/exports/canisters/icrc_7/idl.ts +1 -0
- package/src/exports/canisters/llm/idl.ts +1 -0
- package/src/exports/canisters/management/idl.ts +1 -0
- package/src/exports/canisters/nns_cycles_minting/idl.ts +1 -0
- package/src/exports/canisters/nns_governance/idl.ts +1 -0
- package/src/exports/canisters/nns_icp_ledger/idl.ts +1 -0
- package/src/exports/canisters/nns_internet_identity/idl.ts +1 -0
- package/src/exports/canisters/nns_registry/idl.ts +1 -0
- package/src/exports/canisters/nns_sns_w/idl.ts +1 -0
- package/src/exports/experimental/_internal/dfx.ts +1 -0
- package/src/exports/experimental/_internal/globals.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_definition_arb/types.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_definition_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_return_type_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_value_and_meta_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_value_and_meta_arb_generator.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_values_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/blob_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/opt_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/record_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/tuple_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/variant_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/vec_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/corresponding_js_type.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/bool_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/floats/float32_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/floats/float64_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int16_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int32_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int64_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int8_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat16_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat32_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat64_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat8_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/null_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/text_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/void_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/recursive.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/reference/func_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/reference/principal_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/candid/reference/service_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/canister_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/init_method_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/inspect_message_method_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/post_upgrade_method_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/pre_upgrade_method_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/query_method_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/update_method_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/config.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/http/body_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/http/headers_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/http/request_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/http/response_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/stable_b_tree_map_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/types.ts +1 -0
- package/src/exports/experimental/_internal/test/property/arbitraries/unique_identifier_arb.ts +1 -0
- package/src/exports/experimental/_internal/test/property/are_params_correctly_ordered.ts +1 -0
- package/src/exports/experimental/_internal/test/property/test.ts +1 -0
- package/src/exports/experimental/_internal/test/property.ts +1 -0
- package/src/exports/experimental/_internal/test/set_experimental.ts +1 -0
- package/src/exports/experimental/_internal.ts +8 -0
- package/src/exports/experimental/http_client.ts +1 -0
- package/src/exports/experimental.ts +3 -0
- package/src/stable/build/commands/build/candid_and_method_meta/execute.ts +134 -0
- package/src/stable/build/commands/build/candid_and_method_meta/index.ts +27 -0
- package/src/stable/build/commands/build/get_context.ts +79 -0
- package/src/stable/build/commands/build/index.ts +48 -0
- package/src/stable/build/commands/build/javascript.ts +259 -0
- package/src/stable/build/commands/build/wasm_binary/compile.ts +27 -0
- package/src/stable/build/commands/build/wasm_binary/index.ts +30 -0
- package/src/stable/build/commands/build/wasm_binary/manipulate.ts +268 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/Cargo.toml +23 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/benchmarking.rs +45 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/candid_and_method_meta.rs +49 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/execute_method_js.rs +65 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/guards.rs +11 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/accept_message.rs +6 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/call_raw.rs +362 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/candid_decode.rs +18 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/candid_encode.rs +19 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/canister_cycle_balance.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/canister_self.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/canister_version.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/certified_data_set.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/clear_timer.rs +15 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/cycles_burn.rs +17 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/data_certificate.rs +13 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/debug_print.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/drain_microtasks.rs +22 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/in_replicated_execution.rs +6 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/is_controller.rs +11 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/mod.rs +219 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_arg_data.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_caller.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_cycles_accept.rs +17 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_cycles_available.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_cycles_refunded.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_method_name.rs +6 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reject.rs +6 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reject_code.rs +6 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reject_msg.rs +6 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reply.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/notify_raw.rs +62 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/performance_counter.rs +17 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/rand_bytes.rs +21 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/rand_seed.rs +26 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/set_timer.rs +92 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/set_timer_interval.rs +62 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_contains_key.rs +18 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_get.rs +21 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_init.rs +19 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_insert.rs +44 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_is_empty.rs +11 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_items.rs +48 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_keys.rs +43 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_len.rs +16 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_remove.rs +21 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_values.rs +43 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/time.rs +8 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/trap.rs +22 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/init_and_post_upgrade.rs +98 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/initialize_context.rs +102 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/internal_canister_methods.rs +122 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/lib.rs +39 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/call_with_error_handling.rs +26 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/error.rs +27 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/mod.rs +7 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/with_ctx.rs +24 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/stable_b_tree_map.rs +84 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/state.rs +55 -0
- package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/wasm_binary_manipulation.rs +296 -0
- package/src/stable/build/commands/clean.ts +15 -0
- package/src/stable/build/commands/dev/audit.ts +39 -0
- package/src/stable/build/commands/dev/setup/index.ts +41 -0
- package/src/stable/build/commands/dev/setup/install_cargo-audit.sh +11 -0
- package/src/stable/build/commands/dev/setup/install_cargo-auditable.sh +16 -0
- package/src/stable/build/commands/dev/setup/install_cargo-bundle-licenses.sh +11 -0
- package/src/stable/build/commands/dev/setup/install_cargo-deny.sh +11 -0
- package/src/stable/build/commands/dev/setup/install_dfx.sh +36 -0
- package/src/stable/build/commands/dev/setup/install_node.sh +25 -0
- package/src/stable/build/commands/dev/setup/install_rust.sh +24 -0
- package/src/stable/build/commands/dev/setup/install_wasi2ic.sh +11 -0
- package/src/stable/build/commands/dev/template/experimental.ts +28 -0
- package/src/stable/build/commands/dev/template/generate_licenses.ts +28 -0
- package/src/stable/build/commands/dev/template/stable.ts +27 -0
- package/src/stable/build/commands/extension/install.ts +25 -0
- package/src/stable/build/commands/generate/index.ts +21 -0
- package/src/stable/build/commands/generate/rust/candid_to_ts_js/Cargo.toml +12 -0
- package/src/stable/build/commands/generate/rust/candid_to_ts_js/build.sh +9 -0
- package/src/stable/build/commands/generate/rust/candid_to_ts_js/licenses.md +1 -0
- package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js.d.ts +18 -0
- package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js.js +144 -0
- package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js_bg.wasm +0 -0
- package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js_bg.wasm.d.ts +9 -0
- package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/package.json +11 -0
- package/src/stable/build/commands/generate/rust/candid_to_ts_js/src/lib.rs +31 -0
- package/src/stable/build/commands/new.ts +165 -0
- package/src/stable/build/commands/version.ts +5 -0
- package/src/stable/build/dfx_extension/extension.json +36 -0
- package/src/stable/build/dfx_extension/install.sh +10 -0
- package/src/stable/build/index.ts +282 -0
- package/src/stable/build/utils/dfx.ts +10 -0
- package/src/stable/build/utils/dfx_root.ts +34 -0
- package/src/stable/build/utils/exec_sync_pretty.ts +17 -0
- package/src/stable/build/utils/experimental_message.ts +19 -0
- package/src/stable/build/utils/get_canister_config.ts +52 -0
- package/src/stable/build/utils/global_paths.ts +26 -0
- package/src/stable/build/utils/types.ts +87 -0
- package/src/stable/lib/canister_methods/heartbeat.ts +29 -0
- package/src/stable/lib/canister_methods/index.ts +405 -0
- package/src/stable/lib/canister_methods/init.ts +71 -0
- package/src/stable/lib/canister_methods/inspect_message.ts +79 -0
- package/src/stable/lib/canister_methods/on_low_wasm_memory.ts +27 -0
- package/src/stable/lib/canister_methods/post_upgrade.ts +73 -0
- package/src/stable/lib/canister_methods/pre_upgrade.ts +27 -0
- package/src/stable/lib/canister_methods/query.ts +69 -0
- package/src/stable/lib/canister_methods/update.ts +66 -0
- package/src/stable/lib/canisters/NOTICE +15 -0
- package/src/stable/lib/canisters/ck_btc_ledger/idl/README.md +9 -0
- package/src/stable/lib/canisters/ck_btc_ledger/idl/index.did +289 -0
- package/src/stable/lib/canisters/ck_btc_ledger/idl/index.ts +1143 -0
- package/src/stable/lib/canisters/ck_eth_ledger/idl/README.md +9 -0
- package/src/stable/lib/canisters/ck_eth_ledger/idl/index.did +289 -0
- package/src/stable/lib/canisters/ck_eth_ledger/idl/index.ts +1143 -0
- package/src/stable/lib/canisters/cycles_ledger/idl/README.md +9 -0
- package/src/stable/lib/canisters/cycles_ledger/idl/index.did +272 -0
- package/src/stable/lib/canisters/cycles_ledger/idl/index.ts +978 -0
- package/src/stable/lib/canisters/evm_rpc/idl/README.md +9 -0
- package/src/stable/lib/canisters/evm_rpc/idl/index.did +311 -0
- package/src/stable/lib/canisters/evm_rpc/idl/index.ts +1028 -0
- package/src/stable/lib/canisters/exchange_rate/idl/README.md +9 -0
- package/src/stable/lib/canisters/exchange_rate/idl/index.did +83 -0
- package/src/stable/lib/canisters/exchange_rate/idl/index.ts +165 -0
- package/src/stable/lib/canisters/http_gateway/idl/README.md +9 -0
- package/src/stable/lib/canisters/http_gateway/idl/http-gateway.did +49 -0
- package/src/stable/lib/canisters/http_gateway/idl/index.ts +120 -0
- package/src/stable/lib/canisters/icrc_1/idl/ICRC-1.did +63 -0
- package/src/stable/lib/canisters/icrc_1/idl/LICENSE +202 -0
- package/src/stable/lib/canisters/icrc_1/idl/index.ts +151 -0
- package/src/stable/lib/canisters/icrc_10/idl/ICRC-10.did +8 -0
- package/src/stable/lib/canisters/icrc_10/idl/LICENSE +202 -0
- package/src/stable/lib/canisters/icrc_10/idl/index.ts +32 -0
- package/src/stable/lib/canisters/icrc_2/idl/ICRC-2.did +76 -0
- package/src/stable/lib/canisters/icrc_2/idl/LICENSE +202 -0
- package/src/stable/lib/canisters/icrc_2/idl/index.ts +226 -0
- package/src/stable/lib/canisters/icrc_3/idl/ICRC-3.did +59 -0
- package/src/stable/lib/canisters/icrc_3/idl/LICENSE +202 -0
- package/src/stable/lib/canisters/icrc_3/idl/index.ts +156 -0
- package/src/stable/lib/canisters/icrc_37/idl/ICRC-37.did +152 -0
- package/src/stable/lib/canisters/icrc_37/idl/LICENSE +202 -0
- package/src/stable/lib/canisters/icrc_37/idl/index.ts +466 -0
- package/src/stable/lib/canisters/icrc_7/idl/ICRC-7.did +67 -0
- package/src/stable/lib/canisters/icrc_7/idl/LICENSE +202 -0
- package/src/stable/lib/canisters/icrc_7/idl/index.ts +213 -0
- package/src/stable/lib/canisters/llm/idl/README.md +9 -0
- package/src/stable/lib/canisters/llm/idl/index.did +21 -0
- package/src/stable/lib/canisters/llm/idl/index.ts +43 -0
- package/src/stable/lib/canisters/management/idl/README.md +10 -0
- package/src/stable/lib/canisters/management/idl/ic.did +502 -0
- package/src/stable/lib/canisters/management/idl/index.ts +1257 -0
- package/src/stable/lib/canisters/nns_cycles_minting/idl/README.md +9 -0
- package/src/stable/lib/canisters/nns_cycles_minting/idl/index.did +241 -0
- package/src/stable/lib/canisters/nns_cycles_minting/idl/index.ts +394 -0
- package/src/stable/lib/canisters/nns_governance/idl/README.md +9 -0
- package/src/stable/lib/canisters/nns_governance/idl/index.did +1316 -0
- package/src/stable/lib/canisters/nns_governance/idl/index.ts +3599 -0
- package/src/stable/lib/canisters/nns_icp_ledger/idl/LICENSE +202 -0
- package/src/stable/lib/canisters/nns_icp_ledger/idl/NOTICE +14 -0
- package/src/stable/lib/canisters/nns_icp_ledger/idl/README.md +18 -0
- package/src/stable/lib/canisters/nns_icp_ledger/idl/address/index.ts +82 -0
- package/src/stable/lib/canisters/nns_icp_ledger/idl/index.did +264 -0
- package/src/stable/lib/canisters/nns_icp_ledger/idl/index.ts +1020 -0
- package/src/stable/lib/canisters/nns_internet_identity/idl/README.md +9 -0
- package/src/stable/lib/canisters/nns_internet_identity/idl/index.did +779 -0
- package/src/stable/lib/canisters/nns_internet_identity/idl/index.ts +1509 -0
- package/src/stable/lib/canisters/nns_registry/idl/README.md +9 -0
- package/src/stable/lib/canisters/nns_registry/idl/index.did +493 -0
- package/src/stable/lib/canisters/nns_registry/idl/index.ts +1421 -0
- package/src/stable/lib/canisters/nns_sns_w/idl/README.md +9 -0
- package/src/stable/lib/canisters/nns_sns_w/idl/index.did +352 -0
- package/src/stable/lib/canisters/nns_sns_w/idl/index.ts +887 -0
- package/src/stable/lib/did_file/idl_to_string.ts +79 -0
- package/src/stable/lib/did_file/index.ts +2 -0
- package/src/stable/lib/did_file/visitor/did_visitor.ts +135 -0
- package/src/stable/lib/did_file/visitor/escape_candid_name.ts +100 -0
- package/src/stable/lib/did_file/visitor/extract_candid.ts +31 -0
- package/src/stable/lib/did_file/visitor/index.ts +1 -0
- package/src/stable/lib/did_file/visitor/visit/func.ts +31 -0
- package/src/stable/lib/did_file/visitor/visit/opt.ts +16 -0
- package/src/stable/lib/did_file/visitor/visit/primitive.ts +11 -0
- package/src/stable/lib/did_file/visitor/visit/record.ts +24 -0
- package/src/stable/lib/did_file/visitor/visit/recursive.ts +32 -0
- package/src/stable/lib/did_file/visitor/visit/service.ts +107 -0
- package/src/stable/lib/did_file/visitor/visit/tuple.ts +20 -0
- package/src/stable/lib/did_file/visitor/visit/variant.ts +26 -0
- package/src/stable/lib/did_file/visitor/visit/vec.ts +16 -0
- package/src/stable/lib/error.ts +55 -0
- package/src/stable/lib/execute_and_reply_with_candid_serde.ts +245 -0
- package/src/stable/lib/func.ts +7 -0
- package/src/stable/lib/globals.ts +250 -0
- package/src/stable/lib/ic_apis/NOTICE +203 -0
- package/src/stable/lib/ic_apis/azle_ic_stable.ts +86 -0
- package/src/stable/lib/ic_apis/call.ts +397 -0
- package/src/stable/lib/ic_apis/candid_decode.ts +26 -0
- package/src/stable/lib/ic_apis/candid_encode.ts +27 -0
- package/src/stable/lib/ic_apis/canister_cycle_balance.ts +28 -0
- package/src/stable/lib/ic_apis/canister_self.ts +25 -0
- package/src/stable/lib/ic_apis/canister_version.ts +33 -0
- package/src/stable/lib/ic_apis/certified_data_set.ts +35 -0
- package/src/stable/lib/ic_apis/chunk.ts +42 -0
- package/src/stable/lib/ic_apis/clear_timer.ts +53 -0
- package/src/stable/lib/ic_apis/cycles_burn.ts +32 -0
- package/src/stable/lib/ic_apis/data_certificate.ts +30 -0
- package/src/stable/lib/ic_apis/in_replicated_execution.ts +20 -0
- package/src/stable/lib/ic_apis/index.ts +37 -0
- package/src/stable/lib/ic_apis/is_controller.ts +31 -0
- package/src/stable/lib/ic_apis/msg_arg_data.ts +28 -0
- package/src/stable/lib/ic_apis/msg_caller.ts +32 -0
- package/src/stable/lib/ic_apis/msg_cycles_accept.ts +27 -0
- package/src/stable/lib/ic_apis/msg_cycles_available.ts +25 -0
- package/src/stable/lib/ic_apis/msg_cycles_refunded.ts +25 -0
- package/src/stable/lib/ic_apis/msg_method_name.ts +21 -0
- package/src/stable/lib/ic_apis/msg_reject.ts +28 -0
- package/src/stable/lib/ic_apis/msg_reject_code.ts +40 -0
- package/src/stable/lib/ic_apis/msg_reject_msg.ts +24 -0
- package/src/stable/lib/ic_apis/msg_reply.ts +34 -0
- package/src/stable/lib/ic_apis/performance_counter.ts +31 -0
- package/src/stable/lib/ic_apis/rand_seed.ts +40 -0
- package/src/stable/lib/ic_apis/set_timer.ts +80 -0
- package/src/stable/lib/ic_apis/set_timer_interval.ts +87 -0
- package/src/stable/lib/ic_apis/time.ts +26 -0
- package/src/stable/lib/ic_apis/trap.ts +29 -0
- package/src/stable/lib/index.ts +16 -0
- package/src/stable/lib/json.ts +39 -0
- package/src/stable/lib/stable_structures/stable_b_tree_map.ts +488 -0
- package/src/stable/lib/stable_structures/stable_json.ts +254 -0
- package/src/stable/lib/state.ts +322 -0
- package/src/stable/test/benchmarks/_azle_get_benchmarks.did +9 -0
- package/src/stable/test/benchmarks/index.ts +273 -0
- package/src/stable/test/candid_deep_equal.ts +99 -0
- package/src/stable/test/canister_names.ts +36 -0
- package/src/stable/test/fuzz.ts +102 -0
- package/src/stable/test/get_canister_actor.ts +45 -0
- package/src/stable/test/global_state.ts +202 -0
- package/src/stable/test/index.ts +274 -0
- package/src/stable/test/memory_state.ts +187 -0
- package/src/stable/test/property/default_prop_test_params.ts +36 -0
- package/src/stable/test/type/assert_type.ts +9 -0
- package/tsconfig.dev.json +10 -0
|
@@ -0,0 +1,779 @@
|
|
|
1
|
+
type UserNumber = nat64;
|
|
2
|
+
type PublicKey = blob;
|
|
3
|
+
type CredentialId = blob;
|
|
4
|
+
type DeviceKey = PublicKey;
|
|
5
|
+
type UserKey = PublicKey;
|
|
6
|
+
type SessionKey = PublicKey;
|
|
7
|
+
type FrontendHostname = text;
|
|
8
|
+
type Timestamp = nat64;
|
|
9
|
+
|
|
10
|
+
type HeaderField = record {
|
|
11
|
+
text;
|
|
12
|
+
text;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type HttpRequest = record {
|
|
16
|
+
method : text;
|
|
17
|
+
url : text;
|
|
18
|
+
headers : vec HeaderField;
|
|
19
|
+
body : blob;
|
|
20
|
+
certificate_version : opt nat16;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type HttpResponse = record {
|
|
24
|
+
status_code : nat16;
|
|
25
|
+
headers : vec HeaderField;
|
|
26
|
+
body : blob;
|
|
27
|
+
upgrade : opt bool;
|
|
28
|
+
streaming_strategy : opt StreamingStrategy;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
type StreamingCallbackHttpResponse = record {
|
|
32
|
+
body : blob;
|
|
33
|
+
token : opt Token;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type Token = record {};
|
|
37
|
+
|
|
38
|
+
type StreamingStrategy = variant {
|
|
39
|
+
Callback : record {
|
|
40
|
+
callback : func(Token) -> (StreamingCallbackHttpResponse) query;
|
|
41
|
+
token : Token;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
type Purpose = variant {
|
|
46
|
+
recovery;
|
|
47
|
+
authentication;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type KeyType = variant {
|
|
51
|
+
unknown;
|
|
52
|
+
platform;
|
|
53
|
+
cross_platform;
|
|
54
|
+
seed_phrase;
|
|
55
|
+
browser_storage_key;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// This describes whether a device is "protected" or not.
|
|
59
|
+
// When protected, a device can only be updated or removed if the
|
|
60
|
+
// user is authenticated with that very device.
|
|
61
|
+
type DeviceProtection = variant {
|
|
62
|
+
protected;
|
|
63
|
+
unprotected;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
type Challenge = record {
|
|
67
|
+
png_base64 : text;
|
|
68
|
+
challenge_key : ChallengeKey;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
type DeviceData = record {
|
|
72
|
+
pubkey : DeviceKey;
|
|
73
|
+
alias : text;
|
|
74
|
+
credential_id : opt CredentialId;
|
|
75
|
+
purpose : Purpose;
|
|
76
|
+
key_type : KeyType;
|
|
77
|
+
protection : DeviceProtection;
|
|
78
|
+
origin : opt text;
|
|
79
|
+
// Metadata map for additional device information.
|
|
80
|
+
//
|
|
81
|
+
// Note: some fields above will be moved to the metadata map in the future.
|
|
82
|
+
// All field names of `DeviceData` (such as 'alias', 'origin, etc.) are
|
|
83
|
+
// reserved and cannot be written.
|
|
84
|
+
// In addition, the keys "usage" and "authenticator_attachment" are reserved as well.
|
|
85
|
+
metadata : opt MetadataMap;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// The same as `DeviceData` but with the `last_usage` field.
|
|
89
|
+
// This field cannot be written, hence the separate type.
|
|
90
|
+
type DeviceWithUsage = record {
|
|
91
|
+
pubkey : DeviceKey;
|
|
92
|
+
alias : text;
|
|
93
|
+
credential_id : opt CredentialId;
|
|
94
|
+
purpose : Purpose;
|
|
95
|
+
key_type : KeyType;
|
|
96
|
+
protection : DeviceProtection;
|
|
97
|
+
origin : opt text;
|
|
98
|
+
last_usage : opt Timestamp;
|
|
99
|
+
metadata : opt MetadataMap;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// Map with some variants for the value type.
|
|
103
|
+
// Note, due to the Candid mapping this must be a tuple type thus we cannot name the fields `key` and `value`.
|
|
104
|
+
type MetadataMap = vec record {
|
|
105
|
+
text;
|
|
106
|
+
variant { map : MetadataMap; string : text; bytes : vec nat8 };
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
type RegisterResponse = variant {
|
|
110
|
+
// A new user was successfully registered.
|
|
111
|
+
registered : record {
|
|
112
|
+
user_number : UserNumber;
|
|
113
|
+
};
|
|
114
|
+
// No more registrations are possible in this instance of the II service canister.
|
|
115
|
+
canister_full;
|
|
116
|
+
// The challenge was not successful.
|
|
117
|
+
bad_challenge;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
type AddTentativeDeviceResponse = variant {
|
|
121
|
+
// The device was tentatively added.
|
|
122
|
+
added_tentatively : record {
|
|
123
|
+
verification_code : text;
|
|
124
|
+
// Expiration date, in nanos since the epoch
|
|
125
|
+
device_registration_timeout : Timestamp;
|
|
126
|
+
};
|
|
127
|
+
// Device registration mode is off, either due to timeout or because it was never enabled.
|
|
128
|
+
device_registration_mode_off;
|
|
129
|
+
// There is another device already added tentatively
|
|
130
|
+
another_device_tentatively_added;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
type VerifyTentativeDeviceResponse = variant {
|
|
134
|
+
// The device was successfully verified.
|
|
135
|
+
verified;
|
|
136
|
+
// Wrong verification code entered. Retry with correct code.
|
|
137
|
+
wrong_code : record {
|
|
138
|
+
retries_left : nat8;
|
|
139
|
+
};
|
|
140
|
+
// Device registration mode is off, either due to timeout or because it was never enabled.
|
|
141
|
+
device_registration_mode_off;
|
|
142
|
+
// There is no tentative device to be verified.
|
|
143
|
+
no_device_to_verify;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
type Delegation = record {
|
|
147
|
+
pubkey : PublicKey;
|
|
148
|
+
expiration : Timestamp;
|
|
149
|
+
targets : opt vec principal;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
type SignedDelegation = record {
|
|
153
|
+
delegation : Delegation;
|
|
154
|
+
signature : blob;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
type GetDelegationResponse = variant {
|
|
158
|
+
// The signed delegation was successfully retrieved.
|
|
159
|
+
signed_delegation : SignedDelegation;
|
|
160
|
+
|
|
161
|
+
// The signature is not ready. Maybe retry by calling `prepare_delegation`
|
|
162
|
+
no_such_delegation;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
type InternetIdentityStats = record {
|
|
166
|
+
users_registered : nat64;
|
|
167
|
+
storage_layout_version : nat8;
|
|
168
|
+
assigned_user_number_range : record {
|
|
169
|
+
nat64;
|
|
170
|
+
nat64;
|
|
171
|
+
};
|
|
172
|
+
archive_info : ArchiveInfo;
|
|
173
|
+
canister_creation_cycles_cost : nat64;
|
|
174
|
+
// Map from event aggregation to a sorted list of top 100 sub-keys to their weights.
|
|
175
|
+
// Example: {"prepare_delegation_count 24h ic0.app": [{"https://dapp.com", 100}, {"https://dapp2.com", 50}]}
|
|
176
|
+
event_aggregations : vec record { text; vec record { text; nat64 } };
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// Configuration parameters related to the archive.
|
|
180
|
+
type ArchiveConfig = record {
|
|
181
|
+
// The allowed module hash of the archive canister.
|
|
182
|
+
// Changing this parameter does _not_ deploy the archive, but enable archive deployments with the
|
|
183
|
+
// corresponding wasm module.
|
|
184
|
+
module_hash : blob;
|
|
185
|
+
// Buffered archive entries limit. If reached, II will stop accepting new anchor operations
|
|
186
|
+
// until the buffered operations are acknowledged by the archive.
|
|
187
|
+
entries_buffer_limit : nat64;
|
|
188
|
+
// The maximum number of entries to be transferred to the archive per call.
|
|
189
|
+
entries_fetch_limit : nat16;
|
|
190
|
+
// Polling interval to fetch new entries from II (in nanoseconds).
|
|
191
|
+
// Changes to this parameter will only take effect after an archive deployment.
|
|
192
|
+
polling_interval_ns : nat64;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
// Information about the archive.
|
|
196
|
+
type ArchiveInfo = record {
|
|
197
|
+
// Canister id of the archive or empty if no archive has been deployed yet.
|
|
198
|
+
archive_canister : opt principal;
|
|
199
|
+
// Configuration parameters related to the II archive.
|
|
200
|
+
archive_config : opt ArchiveConfig;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// Rate limit configuration.
|
|
204
|
+
// Currently only used for `register`.
|
|
205
|
+
type RateLimitConfig = record {
|
|
206
|
+
// Time it takes (in ns) for a rate limiting token to be replenished.
|
|
207
|
+
time_per_token_ns : nat64;
|
|
208
|
+
// How many tokens are at most generated (to accommodate peaks).
|
|
209
|
+
max_tokens : nat64;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
// Captcha configuration
|
|
213
|
+
// Default:
|
|
214
|
+
// - max_unsolved_captchas: 500
|
|
215
|
+
// - captcha_trigger: Static, CaptchaEnabled
|
|
216
|
+
type CaptchaConfig = record {
|
|
217
|
+
// Maximum number of unsolved captchas.
|
|
218
|
+
max_unsolved_captchas : nat64;
|
|
219
|
+
// Configuration for when captcha protection should kick in.
|
|
220
|
+
captcha_trigger : variant {
|
|
221
|
+
// Based on the rate of registrations compared to some reference time frame and allowing some leeway.
|
|
222
|
+
Dynamic : record {
|
|
223
|
+
// Percentage of increased registration rate observed in the current rate sampling interval (compared to
|
|
224
|
+
// reference rate) at which II will enable captcha for new registrations.
|
|
225
|
+
threshold_pct : nat16;
|
|
226
|
+
// Length of the interval in seconds used to sample the current rate of registrations.
|
|
227
|
+
current_rate_sampling_interval_s : nat64;
|
|
228
|
+
// Length of the interval in seconds used to sample the reference rate of registrations.
|
|
229
|
+
reference_rate_sampling_interval_s : nat64;
|
|
230
|
+
};
|
|
231
|
+
// Statically enable / disable captcha
|
|
232
|
+
Static : variant {
|
|
233
|
+
CaptchaEnabled;
|
|
234
|
+
CaptchaDisabled;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
// Init arguments of II which can be supplied on install and upgrade.
|
|
240
|
+
//
|
|
241
|
+
// Each field is wrapped is `opt` to indicate whether the field should
|
|
242
|
+
// keep the previous value or update to a new value (e.g. `null` keeps the previous value).
|
|
243
|
+
//
|
|
244
|
+
// Some fields, like `openid_google`, have an additional nested `opt`, this indicates
|
|
245
|
+
// enable/disable status (e.g. `opt null` disables a feature while `null` leaves it untouched).
|
|
246
|
+
type InternetIdentityInit = record {
|
|
247
|
+
// Set lowest and highest anchor
|
|
248
|
+
assigned_user_number_range : opt record {
|
|
249
|
+
nat64;
|
|
250
|
+
nat64;
|
|
251
|
+
};
|
|
252
|
+
// Configuration parameters related to the II archive.
|
|
253
|
+
// Note: some parameters changes (like the polling interval) will only take effect after an archive deployment.
|
|
254
|
+
// See ArchiveConfig for details.
|
|
255
|
+
archive_config : opt ArchiveConfig;
|
|
256
|
+
// Set the amounts of cycles sent with the create canister message.
|
|
257
|
+
// This is configurable because in the staging environment cycles are required.
|
|
258
|
+
// The canister creation cost on mainnet is currently 100'000'000'000 cycles. If this value is higher thant the
|
|
259
|
+
// canister creation cost, the newly created canister will keep extra cycles.
|
|
260
|
+
canister_creation_cycles_cost : opt nat64;
|
|
261
|
+
// Rate limit for the `register` call.
|
|
262
|
+
register_rate_limit : opt RateLimitConfig;
|
|
263
|
+
// Configuration of the captcha in the registration flow.
|
|
264
|
+
captcha_config : opt CaptchaConfig;
|
|
265
|
+
// Configuration for Related Origins Requests
|
|
266
|
+
related_origins : opt vec text;
|
|
267
|
+
// Configuration for OpenID Google client
|
|
268
|
+
openid_google : opt opt OpenIdConfig;
|
|
269
|
+
// Configuration for Web Analytics
|
|
270
|
+
analytics_config : opt opt AnalyticsConfig;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
type ChallengeKey = text;
|
|
274
|
+
|
|
275
|
+
type ChallengeResult = record {
|
|
276
|
+
key : ChallengeKey;
|
|
277
|
+
chars : text;
|
|
278
|
+
};
|
|
279
|
+
type CaptchaResult = ChallengeResult;
|
|
280
|
+
|
|
281
|
+
// Extra information about registration status for new devices
|
|
282
|
+
type DeviceRegistrationInfo = record {
|
|
283
|
+
// If present, the user has tentatively added a new device. This
|
|
284
|
+
// new device needs to be verified (see relevant endpoint) before
|
|
285
|
+
// 'expiration'.
|
|
286
|
+
tentative_device : opt DeviceData;
|
|
287
|
+
// The timestamp at which the anchor will turn off registration mode
|
|
288
|
+
// (and the tentative device will be forgotten, if any, and if not verified)
|
|
289
|
+
expiration : Timestamp;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
// Information about the anchor
|
|
293
|
+
type IdentityAnchorInfo = record {
|
|
294
|
+
// All devices that can authenticate to this anchor
|
|
295
|
+
devices : vec DeviceWithUsage;
|
|
296
|
+
// Device registration status used when adding devices, see DeviceRegistrationInfo
|
|
297
|
+
device_registration : opt DeviceRegistrationInfo;
|
|
298
|
+
// OpenID accounts linked to this anchor
|
|
299
|
+
openid_credentials : opt vec OpenIdCredential;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
type AnchorCredentials = record {
|
|
303
|
+
credentials : vec WebAuthnCredential;
|
|
304
|
+
recovery_credentials : vec WebAuthnCredential;
|
|
305
|
+
recovery_phrases : vec PublicKey;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
type WebAuthnCredential = record {
|
|
309
|
+
credential_id : CredentialId;
|
|
310
|
+
pubkey : PublicKey;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
type DeployArchiveResult = variant {
|
|
314
|
+
// The archive was deployed successfully and the supplied wasm module has been installed. The principal of the archive
|
|
315
|
+
// canister is returned.
|
|
316
|
+
success : principal;
|
|
317
|
+
// Initial archive creation is already in progress.
|
|
318
|
+
creation_in_progress;
|
|
319
|
+
// Archive deployment failed. An error description is returned.
|
|
320
|
+
failed : text;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
type BufferedArchiveEntry = record {
|
|
324
|
+
anchor_number : UserNumber;
|
|
325
|
+
timestamp : Timestamp;
|
|
326
|
+
sequence_number : nat64;
|
|
327
|
+
entry : blob;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
// OpenID specific types
|
|
331
|
+
|
|
332
|
+
type Iss = text;
|
|
333
|
+
type Sub = text;
|
|
334
|
+
type Aud = text;
|
|
335
|
+
type JWT = text;
|
|
336
|
+
type Salt = blob;
|
|
337
|
+
|
|
338
|
+
type OpenIdConfig = record {
|
|
339
|
+
client_id : text;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
type OpenIdCredentialKey = record { Iss; Sub };
|
|
343
|
+
|
|
344
|
+
type AnalyticsConfig = variant {
|
|
345
|
+
Plausible: record {
|
|
346
|
+
domain: opt text;
|
|
347
|
+
hash_mode: opt bool;
|
|
348
|
+
track_localhost: opt bool;
|
|
349
|
+
api_host: opt text;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
type OpenIdCredential = record {
|
|
354
|
+
iss : Iss;
|
|
355
|
+
sub : Sub;
|
|
356
|
+
aud : Aud;
|
|
357
|
+
last_usage_timestamp : Timestamp;
|
|
358
|
+
metadata : MetadataMapV2;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
type OpenIdCredentialAddError = variant {
|
|
362
|
+
Unauthorized : principal;
|
|
363
|
+
JwtVerificationFailed;
|
|
364
|
+
OpenIdCredentialAlreadyRegistered;
|
|
365
|
+
InternalCanisterError : text;
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
type OpenIdCredentialRemoveError = variant {
|
|
369
|
+
Unauthorized : principal;
|
|
370
|
+
OpenIdCredentialNotFound;
|
|
371
|
+
InternalCanisterError : text;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
// API V2 specific types
|
|
375
|
+
// WARNING: These type are experimental and may change in the future.
|
|
376
|
+
|
|
377
|
+
type IdentityNumber = nat64;
|
|
378
|
+
|
|
379
|
+
// Map with some variants for the value type.
|
|
380
|
+
// Note, due to the Candid mapping this must be a tuple type thus we cannot name the fields `key` and `value`.
|
|
381
|
+
type MetadataMapV2 = vec record {
|
|
382
|
+
text;
|
|
383
|
+
variant { Map : MetadataMapV2; String : text; Bytes : vec nat8 };
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
// Authentication method using WebAuthn signatures
|
|
387
|
+
// See https://www.w3.org/TR/webauthn-2/
|
|
388
|
+
// This is a separate type because WebAuthn requires to also store
|
|
389
|
+
// the credential id (in addition to the public key).
|
|
390
|
+
type WebAuthn = record {
|
|
391
|
+
credential_id : CredentialId;
|
|
392
|
+
pubkey : PublicKey;
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
// Authentication method using generic signatures
|
|
396
|
+
// See https://internetcomputer.org/docs/current/references/ic-interface-spec/#signatures for
|
|
397
|
+
// supported signature schemes.
|
|
398
|
+
type PublicKeyAuthn = record {
|
|
399
|
+
pubkey : PublicKey;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
// The authentication methods currently supported by II.
|
|
403
|
+
type AuthnMethod = variant {
|
|
404
|
+
WebAuthn : WebAuthn;
|
|
405
|
+
PubKey : PublicKeyAuthn;
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
// This describes whether an authentication method is "protected" or not.
|
|
409
|
+
// When protected, a authentication method can only be updated or removed if the
|
|
410
|
+
// user is authenticated with that very authentication method.
|
|
411
|
+
type AuthnMethodProtection = variant {
|
|
412
|
+
Protected;
|
|
413
|
+
Unprotected;
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
type AuthnMethodPurpose = variant {
|
|
417
|
+
Recovery;
|
|
418
|
+
Authentication;
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
type AuthnMethodSecuritySettings = record {
|
|
422
|
+
protection : AuthnMethodProtection;
|
|
423
|
+
purpose : AuthnMethodPurpose;
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
type AuthnMethodData = record {
|
|
427
|
+
authn_method : AuthnMethod;
|
|
428
|
+
security_settings : AuthnMethodSecuritySettings;
|
|
429
|
+
// contains the following fields of the DeviceWithUsage type:
|
|
430
|
+
// - alias
|
|
431
|
+
// - origin
|
|
432
|
+
// - authenticator_attachment: data taken from key_type and reduced to "platform", "cross_platform" or absent on migration
|
|
433
|
+
// - usage: data taken from key_type and reduced to "recovery_phrase", "browser_storage_key" or absent on migration
|
|
434
|
+
// Note: for compatibility reasons with the v1 API, the entries above (if present)
|
|
435
|
+
// must be of the `String` variant. This restriction may be lifted in the future.
|
|
436
|
+
metadata : MetadataMapV2;
|
|
437
|
+
last_authentication : opt Timestamp;
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
// Extra information about registration status for new authentication methods
|
|
441
|
+
type AuthnMethodRegistrationInfo = record {
|
|
442
|
+
// If present, the user has registered a new authentication method. This
|
|
443
|
+
// new authentication needs to be verified before 'expiration' in order to
|
|
444
|
+
// be added to the identity.
|
|
445
|
+
authn_method : opt AuthnMethodData;
|
|
446
|
+
// The timestamp at which the identity will turn off registration mode
|
|
447
|
+
// (and the authentication method will be forgotten, if any, and if not verified)
|
|
448
|
+
expiration : Timestamp;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
type AuthnMethodConfirmationCode = record {
|
|
452
|
+
confirmation_code : text;
|
|
453
|
+
expiration : Timestamp;
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
type AuthnMethodRegisterError = variant {
|
|
457
|
+
// Authentication method registration mode is off, either due to timeout or because it was never enabled.
|
|
458
|
+
RegistrationModeOff;
|
|
459
|
+
// There is another authentication method already registered that needs to be confirmed first.
|
|
460
|
+
RegistrationAlreadyInProgress;
|
|
461
|
+
// The metadata of the provided authentication method contains invalid entries.
|
|
462
|
+
InvalidMetadata : text;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
type AuthnMethodConfirmationError = variant {
|
|
466
|
+
// Wrong confirmation code entered. Retry with correct code.
|
|
467
|
+
WrongCode : record {
|
|
468
|
+
retries_left : nat8;
|
|
469
|
+
};
|
|
470
|
+
// Authentication method registration mode is off, either due to timeout or because it was never enabled.
|
|
471
|
+
RegistrationModeOff;
|
|
472
|
+
// There is no registered authentication method to be confirmed.
|
|
473
|
+
NoAuthnMethodToConfirm;
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
type IdentityAuthnInfo = record {
|
|
477
|
+
authn_methods : vec AuthnMethod;
|
|
478
|
+
recovery_authn_methods : vec AuthnMethod;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
type IdentityInfo = record {
|
|
482
|
+
authn_methods : vec AuthnMethodData;
|
|
483
|
+
authn_method_registration : opt AuthnMethodRegistrationInfo;
|
|
484
|
+
openid_credentials : opt vec OpenIdCredential;
|
|
485
|
+
// Authentication method independent metadata
|
|
486
|
+
metadata : MetadataMapV2;
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
type IdentityInfoError = variant {
|
|
490
|
+
// The principal is not authorized to call this method with the given arguments.
|
|
491
|
+
Unauthorized : principal;
|
|
492
|
+
// Internal canister error. See the error message for details.
|
|
493
|
+
InternalCanisterError : text;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
type AuthnMethodAddError = variant {
|
|
497
|
+
InvalidMetadata : text;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
type AuthnMethodReplaceError = variant {
|
|
501
|
+
InvalidMetadata : text;
|
|
502
|
+
// No authentication method found with the given public key.
|
|
503
|
+
AuthnMethodNotFound;
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
type AuthnMethodMetadataReplaceError = variant {
|
|
507
|
+
InvalidMetadata : text;
|
|
508
|
+
// No authentication method found with the given public key.
|
|
509
|
+
AuthnMethodNotFound;
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
type AuthnMethodSecuritySettingsReplaceError = variant {
|
|
513
|
+
// No authentication method found with the given public key.
|
|
514
|
+
AuthnMethodNotFound;
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
type IdentityMetadataReplaceError = variant {
|
|
518
|
+
// The principal is not authorized to call this method with the given arguments.
|
|
519
|
+
Unauthorized : principal;
|
|
520
|
+
// The identity including the new metadata exceeds the maximum allowed size.
|
|
521
|
+
StorageSpaceExceeded : record {
|
|
522
|
+
space_available : nat64;
|
|
523
|
+
space_required : nat64;
|
|
524
|
+
};
|
|
525
|
+
// Internal canister error. See the error message for details.
|
|
526
|
+
InternalCanisterError : text;
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
type PrepareIdAliasRequest = record {
|
|
530
|
+
// Origin of the issuer in the attribute sharing flow.
|
|
531
|
+
issuer : FrontendHostname;
|
|
532
|
+
// Origin of the relying party in the attribute sharing flow.
|
|
533
|
+
relying_party : FrontendHostname;
|
|
534
|
+
// Identity for which the IdAlias should be generated.
|
|
535
|
+
identity_number : IdentityNumber;
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
type PrepareIdAliasError = variant {
|
|
539
|
+
// The principal is not authorized to call this method with the given arguments.
|
|
540
|
+
Unauthorized : principal;
|
|
541
|
+
// Internal canister error. See the error message for details.
|
|
542
|
+
InternalCanisterError : text;
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
// The prepared id alias contains two (still unsigned) credentials in JWT format,
|
|
546
|
+
// certifying the id alias for the issuer resp. the relying party.
|
|
547
|
+
type PreparedIdAlias = record {
|
|
548
|
+
rp_id_alias_jwt : text;
|
|
549
|
+
issuer_id_alias_jwt : text;
|
|
550
|
+
canister_sig_pk_der : PublicKey;
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
// The request to retrieve the actual signed id alias credentials.
|
|
554
|
+
// The field values should be equal to the values of corresponding
|
|
555
|
+
// fields from the preceding `PrepareIdAliasRequest` and `PrepareIdAliasResponse`.
|
|
556
|
+
type GetIdAliasRequest = record {
|
|
557
|
+
rp_id_alias_jwt : text;
|
|
558
|
+
issuer : FrontendHostname;
|
|
559
|
+
issuer_id_alias_jwt : text;
|
|
560
|
+
relying_party : FrontendHostname;
|
|
561
|
+
identity_number : IdentityNumber;
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
type GetIdAliasError = variant {
|
|
565
|
+
// The principal is not authorized to call this method with the given arguments.
|
|
566
|
+
Unauthorized : principal;
|
|
567
|
+
// The credential(s) are not available: may be expired or not prepared yet (call prepare_id_alias to prepare).
|
|
568
|
+
NoSuchCredentials : text;
|
|
569
|
+
// Internal canister error. See the error message for details.
|
|
570
|
+
InternalCanisterError : text;
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
// The signed id alias credentials for each involved party.
|
|
574
|
+
type IdAliasCredentials = record {
|
|
575
|
+
rp_id_alias_credential : SignedIdAlias;
|
|
576
|
+
issuer_id_alias_credential : SignedIdAlias;
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
type SignedIdAlias = record {
|
|
580
|
+
credential_jws : text;
|
|
581
|
+
id_alias : principal;
|
|
582
|
+
id_dapp : principal;
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
type IdRegNextStepResult = record {
|
|
586
|
+
// The next step in the registration flow
|
|
587
|
+
next_step : RegistrationFlowNextStep;
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
type IdRegStartError = variant {
|
|
591
|
+
// The method was called anonymously, which is not supported.
|
|
592
|
+
InvalidCaller;
|
|
593
|
+
// Too many registrations. Please try again later.
|
|
594
|
+
RateLimitExceeded;
|
|
595
|
+
// A registration flow is already in progress.
|
|
596
|
+
AlreadyInProgress;
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
// The next step in the registration flow:
|
|
600
|
+
// - CheckCaptcha: supply the solution to the captcha using `check_captcha`
|
|
601
|
+
// - Finish: finish the registration using `identity_registration_finish`
|
|
602
|
+
type RegistrationFlowNextStep = variant {
|
|
603
|
+
// Supply the captcha solution using check_captcha
|
|
604
|
+
CheckCaptcha : record {
|
|
605
|
+
captcha_png_base64 : text;
|
|
606
|
+
};
|
|
607
|
+
// Finish the registration using identity_registration_finish
|
|
608
|
+
Finish;
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
type CheckCaptchaArg = record {
|
|
612
|
+
solution : text;
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
type CheckCaptchaError = variant {
|
|
616
|
+
// The supplied solution was wrong. Try again with the new captcha.
|
|
617
|
+
WrongSolution : record {
|
|
618
|
+
new_captcha_png_base64 : text;
|
|
619
|
+
};
|
|
620
|
+
// This call is unexpected, see next_step.
|
|
621
|
+
UnexpectedCall : record {
|
|
622
|
+
next_step : RegistrationFlowNextStep;
|
|
623
|
+
};
|
|
624
|
+
// No registration flow ongoing for the caller.
|
|
625
|
+
NoRegistrationFlow;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
type IdRegFinishArg = record {
|
|
629
|
+
authn_method : AuthnMethodData;
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
type IdRegFinishResult = record {
|
|
633
|
+
identity_number : nat64;
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
type IdRegFinishError = variant {
|
|
637
|
+
// The configured maximum number of identities has been reached.
|
|
638
|
+
IdentityLimitReached;
|
|
639
|
+
// This call is unexpected, see next_step.
|
|
640
|
+
UnexpectedCall : record {
|
|
641
|
+
next_step : RegistrationFlowNextStep;
|
|
642
|
+
};
|
|
643
|
+
// No registration flow ongoing for the caller.
|
|
644
|
+
NoRegistrationFlow;
|
|
645
|
+
// The supplied authn_method is not valid.
|
|
646
|
+
InvalidAuthnMethod : text;
|
|
647
|
+
// Error while persisting the new identity.
|
|
648
|
+
StorageError : text;
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
service : (opt InternetIdentityInit) -> {
|
|
652
|
+
// Legacy identity management API
|
|
653
|
+
// ==============================
|
|
654
|
+
|
|
655
|
+
create_challenge : () -> (Challenge);
|
|
656
|
+
register : (DeviceData, ChallengeResult, opt principal) -> (RegisterResponse);
|
|
657
|
+
add : (UserNumber, DeviceData) -> ();
|
|
658
|
+
update : (UserNumber, DeviceKey, DeviceData) -> ();
|
|
659
|
+
// Atomically replace device matching the device key with the new device data
|
|
660
|
+
replace : (UserNumber, DeviceKey, DeviceData) -> ();
|
|
661
|
+
remove : (UserNumber, DeviceKey) -> ();
|
|
662
|
+
// Returns all devices of the user (authentication and recovery) but no information about device registrations.
|
|
663
|
+
// Note: Clears out the 'alias' fields on the devices. Use 'get_anchor_info' to obtain the full information.
|
|
664
|
+
// Deprecated: Use 'get_anchor_credentials' instead.
|
|
665
|
+
lookup : (UserNumber) -> (vec DeviceData) query;
|
|
666
|
+
get_anchor_credentials : (UserNumber) -> (AnchorCredentials) query;
|
|
667
|
+
get_anchor_info : (UserNumber) -> (IdentityAnchorInfo);
|
|
668
|
+
get_principal : (UserNumber, FrontendHostname) -> (principal) query;
|
|
669
|
+
|
|
670
|
+
enter_device_registration_mode : (UserNumber) -> (Timestamp);
|
|
671
|
+
exit_device_registration_mode : (UserNumber) -> ();
|
|
672
|
+
add_tentative_device : (UserNumber, DeviceData) -> (AddTentativeDeviceResponse);
|
|
673
|
+
verify_tentative_device : (UserNumber, verification_code : text) -> (VerifyTentativeDeviceResponse);
|
|
674
|
+
|
|
675
|
+
// V2 Identity Management API
|
|
676
|
+
// ==========================
|
|
677
|
+
// WARNING: The following methods are experimental and may ch 0ange in the future.
|
|
678
|
+
|
|
679
|
+
// Starts the identity registration flow to create a new identity.
|
|
680
|
+
identity_registration_start : () -> (variant { Ok : IdRegNextStepResult; Err : IdRegStartError });
|
|
681
|
+
|
|
682
|
+
// Check the captcha challenge
|
|
683
|
+
// If successful, the registration can be finished with `identity_registration_finish`.
|
|
684
|
+
check_captcha : (CheckCaptchaArg) -> (variant { Ok : IdRegNextStepResult; Err : CheckCaptchaError });
|
|
685
|
+
|
|
686
|
+
// Starts the identity registration flow to create a new identity.
|
|
687
|
+
identity_registration_finish : (IdRegFinishArg) -> (variant { Ok : IdRegFinishResult; Err : IdRegFinishError });
|
|
688
|
+
|
|
689
|
+
// Returns information about the authentication methods of the identity with the given number.
|
|
690
|
+
// Only returns the minimal information required for authentication without exposing any metadata such as aliases.
|
|
691
|
+
identity_authn_info : (IdentityNumber) -> (variant { Ok : IdentityAuthnInfo; Err }) query;
|
|
692
|
+
|
|
693
|
+
// Returns information about the identity with the given number.
|
|
694
|
+
// Requires authentication.
|
|
695
|
+
identity_info : (IdentityNumber) -> (variant { Ok : IdentityInfo; Err : IdentityInfoError });
|
|
696
|
+
|
|
697
|
+
// Replaces the authentication method independent metadata map.
|
|
698
|
+
// The existing metadata map will be overwritten.
|
|
699
|
+
// Requires authentication.
|
|
700
|
+
identity_metadata_replace : (IdentityNumber, MetadataMapV2) -> (variant { Ok; Err : IdentityMetadataReplaceError });
|
|
701
|
+
|
|
702
|
+
// Adds a new authentication method to the identity.
|
|
703
|
+
// Requires authentication.
|
|
704
|
+
authn_method_add : (IdentityNumber, AuthnMethodData) -> (variant { Ok; Err : AuthnMethodAddError });
|
|
705
|
+
|
|
706
|
+
// Atomically replaces the authentication method matching the supplied public key with the new authentication method
|
|
707
|
+
// provided.
|
|
708
|
+
// Requires authentication.
|
|
709
|
+
authn_method_replace : (IdentityNumber, PublicKey, AuthnMethodData) -> (variant { Ok; Err : AuthnMethodReplaceError });
|
|
710
|
+
|
|
711
|
+
// Replaces the authentication method metadata map.
|
|
712
|
+
// The existing metadata map will be overwritten.
|
|
713
|
+
// Requires authentication.
|
|
714
|
+
authn_method_metadata_replace : (IdentityNumber, PublicKey, MetadataMapV2) -> (variant { Ok; Err : AuthnMethodMetadataReplaceError });
|
|
715
|
+
|
|
716
|
+
// Replaces the authentication method security settings.
|
|
717
|
+
// The existing security settings will be overwritten.
|
|
718
|
+
// Requires authentication.
|
|
719
|
+
authn_method_security_settings_replace : (IdentityNumber, PublicKey, AuthnMethodSecuritySettings) -> (variant { Ok; Err : AuthnMethodSecuritySettingsReplaceError });
|
|
720
|
+
|
|
721
|
+
// Removes the authentication method associated with the public key from the identity.
|
|
722
|
+
// Requires authentication.
|
|
723
|
+
authn_method_remove : (IdentityNumber, PublicKey) -> (variant { Ok; Err });
|
|
724
|
+
|
|
725
|
+
// Enters the authentication method registration mode for the identity.
|
|
726
|
+
// In this mode, a new authentication method can be registered, which then needs to be
|
|
727
|
+
// confirmed before it can be used for authentication on this identity.
|
|
728
|
+
// The registration mode is automatically exited after the returned expiration timestamp.
|
|
729
|
+
// Requires authentication.
|
|
730
|
+
authn_method_registration_mode_enter : (IdentityNumber) -> (variant { Ok : record { expiration : Timestamp }; Err });
|
|
731
|
+
|
|
732
|
+
// Exits the authentication method registration mode for the identity.
|
|
733
|
+
// Requires authentication.
|
|
734
|
+
authn_method_registration_mode_exit : (IdentityNumber) -> (variant { Ok; Err });
|
|
735
|
+
|
|
736
|
+
// Registers a new authentication method to the identity.
|
|
737
|
+
// This authentication method needs to be confirmed before it can be used for authentication on this identity.
|
|
738
|
+
authn_method_register : (IdentityNumber, AuthnMethodData) -> (variant { Ok : AuthnMethodConfirmationCode; Err : AuthnMethodRegisterError });
|
|
739
|
+
|
|
740
|
+
// Confirms a previously registered authentication method.
|
|
741
|
+
// On successful confirmation, the authentication method is permanently added to the identity and can
|
|
742
|
+
// subsequently be used for authentication for that identity.
|
|
743
|
+
// Requires authentication.
|
|
744
|
+
authn_method_confirm : (IdentityNumber, confirmation_code : text) -> (variant { Ok; Err : AuthnMethodConfirmationError });
|
|
745
|
+
|
|
746
|
+
// Authentication protocol
|
|
747
|
+
// =======================
|
|
748
|
+
prepare_delegation : (UserNumber, FrontendHostname, SessionKey, maxTimeToLive : opt nat64) -> (UserKey, Timestamp);
|
|
749
|
+
get_delegation : (UserNumber, FrontendHostname, SessionKey, Timestamp) -> (GetDelegationResponse) query;
|
|
750
|
+
|
|
751
|
+
// Attribute Sharing MVP API
|
|
752
|
+
// =========================
|
|
753
|
+
// The methods below are used to generate ID-alias credentials during attribute sharing flow.
|
|
754
|
+
prepare_id_alias : (PrepareIdAliasRequest) -> (variant { Ok : PreparedIdAlias; Err : PrepareIdAliasError });
|
|
755
|
+
get_id_alias : (GetIdAliasRequest) -> (variant { Ok : IdAliasCredentials; Err : GetIdAliasError }) query;
|
|
756
|
+
|
|
757
|
+
// OpenID credentials protocol
|
|
758
|
+
// =========================
|
|
759
|
+
openid_credential_add : (IdentityNumber, JWT, Salt) -> (variant { Ok; Err : OpenIdCredentialAddError });
|
|
760
|
+
openid_credential_remove : (IdentityNumber, OpenIdCredentialKey) -> (variant { Ok; Err : OpenIdCredentialRemoveError });
|
|
761
|
+
|
|
762
|
+
// HTTP Gateway protocol
|
|
763
|
+
// =====================
|
|
764
|
+
http_request : (request : HttpRequest) -> (HttpResponse) query;
|
|
765
|
+
http_request_update : (request : HttpRequest) -> (HttpResponse);
|
|
766
|
+
|
|
767
|
+
// Internal Methods
|
|
768
|
+
// ================
|
|
769
|
+
init_salt : () -> ();
|
|
770
|
+
stats : () -> (InternetIdentityStats) query;
|
|
771
|
+
config : () -> (InternetIdentityInit) query;
|
|
772
|
+
|
|
773
|
+
deploy_archive : (wasm : blob) -> (DeployArchiveResult);
|
|
774
|
+
// Returns a batch of entries _sorted by sequence number_ to be archived.
|
|
775
|
+
// This is an update call because the archive information _must_ be certified.
|
|
776
|
+
// Only callable by this IIs archive canister.
|
|
777
|
+
fetch_entries : () -> (vec BufferedArchiveEntry);
|
|
778
|
+
acknowledge_entries : (sequence_number : nat64) -> ();
|
|
779
|
+
};
|