@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,1509 @@
|
|
|
1
|
+
import { ActorMethod } from '@dfinity/agent';
|
|
2
|
+
import { IDL } from '@dfinity/candid';
|
|
3
|
+
import { Principal } from '@dfinity/principal';
|
|
4
|
+
|
|
5
|
+
export type AddTentativeDeviceResponse =
|
|
6
|
+
| {
|
|
7
|
+
device_registration_mode_off: null;
|
|
8
|
+
}
|
|
9
|
+
| { another_device_tentatively_added: null }
|
|
10
|
+
| {
|
|
11
|
+
added_tentatively: {
|
|
12
|
+
verification_code: string;
|
|
13
|
+
device_registration_timeout: Timestamp;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type AnalyticsConfig = {
|
|
17
|
+
Plausible: {
|
|
18
|
+
domain: [] | [string];
|
|
19
|
+
track_localhost: [] | [boolean];
|
|
20
|
+
hash_mode: [] | [boolean];
|
|
21
|
+
api_host: [] | [string];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export interface AnchorCredentials {
|
|
25
|
+
recovery_phrases: Array<PublicKey>;
|
|
26
|
+
credentials: Array<WebAuthnCredential>;
|
|
27
|
+
recovery_credentials: Array<WebAuthnCredential>;
|
|
28
|
+
}
|
|
29
|
+
export interface ArchiveConfig {
|
|
30
|
+
polling_interval_ns: bigint;
|
|
31
|
+
entries_buffer_limit: bigint;
|
|
32
|
+
module_hash: Uint8Array | number[];
|
|
33
|
+
entries_fetch_limit: number;
|
|
34
|
+
}
|
|
35
|
+
export interface ArchiveInfo {
|
|
36
|
+
archive_config: [] | [ArchiveConfig];
|
|
37
|
+
archive_canister: [] | [Principal];
|
|
38
|
+
}
|
|
39
|
+
export type Aud = string;
|
|
40
|
+
export type AuthnMethod = { PubKey: PublicKeyAuthn } | { WebAuthn: WebAuthn };
|
|
41
|
+
export type AuthnMethodAddError = { InvalidMetadata: string };
|
|
42
|
+
export interface AuthnMethodConfirmationCode {
|
|
43
|
+
confirmation_code: string;
|
|
44
|
+
expiration: Timestamp;
|
|
45
|
+
}
|
|
46
|
+
export type AuthnMethodConfirmationError =
|
|
47
|
+
| { RegistrationModeOff: null }
|
|
48
|
+
| { NoAuthnMethodToConfirm: null }
|
|
49
|
+
| { WrongCode: { retries_left: number } };
|
|
50
|
+
export interface AuthnMethodData {
|
|
51
|
+
security_settings: AuthnMethodSecuritySettings;
|
|
52
|
+
metadata: MetadataMapV2;
|
|
53
|
+
last_authentication: [] | [Timestamp];
|
|
54
|
+
authn_method: AuthnMethod;
|
|
55
|
+
}
|
|
56
|
+
export type AuthnMethodMetadataReplaceError =
|
|
57
|
+
| { AuthnMethodNotFound: null }
|
|
58
|
+
| { InvalidMetadata: string };
|
|
59
|
+
export type AuthnMethodProtection = { Protected: null } | { Unprotected: null };
|
|
60
|
+
export type AuthnMethodPurpose = { Recovery: null } | { Authentication: null };
|
|
61
|
+
export type AuthnMethodRegisterError =
|
|
62
|
+
| { RegistrationModeOff: null }
|
|
63
|
+
| { RegistrationAlreadyInProgress: null }
|
|
64
|
+
| { InvalidMetadata: string };
|
|
65
|
+
export interface AuthnMethodRegistrationInfo {
|
|
66
|
+
expiration: Timestamp;
|
|
67
|
+
authn_method: [] | [AuthnMethodData];
|
|
68
|
+
}
|
|
69
|
+
export type AuthnMethodReplaceError =
|
|
70
|
+
| { AuthnMethodNotFound: null }
|
|
71
|
+
| { InvalidMetadata: string };
|
|
72
|
+
export interface AuthnMethodSecuritySettings {
|
|
73
|
+
protection: AuthnMethodProtection;
|
|
74
|
+
purpose: AuthnMethodPurpose;
|
|
75
|
+
}
|
|
76
|
+
export type AuthnMethodSecuritySettingsReplaceError = {
|
|
77
|
+
AuthnMethodNotFound: null;
|
|
78
|
+
};
|
|
79
|
+
export interface BufferedArchiveEntry {
|
|
80
|
+
sequence_number: bigint;
|
|
81
|
+
entry: Uint8Array | number[];
|
|
82
|
+
anchor_number: UserNumber;
|
|
83
|
+
timestamp: Timestamp;
|
|
84
|
+
}
|
|
85
|
+
export interface CaptchaConfig {
|
|
86
|
+
max_unsolved_captchas: bigint;
|
|
87
|
+
captcha_trigger:
|
|
88
|
+
| {
|
|
89
|
+
Dynamic: {
|
|
90
|
+
reference_rate_sampling_interval_s: bigint;
|
|
91
|
+
threshold_pct: number;
|
|
92
|
+
current_rate_sampling_interval_s: bigint;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
| { Static: { CaptchaDisabled: null } | { CaptchaEnabled: null } };
|
|
96
|
+
}
|
|
97
|
+
export type CaptchaResult = ChallengeResult;
|
|
98
|
+
export interface Challenge {
|
|
99
|
+
png_base64: string;
|
|
100
|
+
challenge_key: ChallengeKey;
|
|
101
|
+
}
|
|
102
|
+
export type ChallengeKey = string;
|
|
103
|
+
export interface ChallengeResult {
|
|
104
|
+
key: ChallengeKey;
|
|
105
|
+
chars: string;
|
|
106
|
+
}
|
|
107
|
+
export interface CheckCaptchaArg {
|
|
108
|
+
solution: string;
|
|
109
|
+
}
|
|
110
|
+
export type CheckCaptchaError =
|
|
111
|
+
| { NoRegistrationFlow: null }
|
|
112
|
+
| { UnexpectedCall: { next_step: RegistrationFlowNextStep } }
|
|
113
|
+
| { WrongSolution: { new_captcha_png_base64: string } };
|
|
114
|
+
export type CredentialId = Uint8Array | number[];
|
|
115
|
+
export interface Delegation {
|
|
116
|
+
pubkey: PublicKey;
|
|
117
|
+
targets: [] | [Array<Principal>];
|
|
118
|
+
expiration: Timestamp;
|
|
119
|
+
}
|
|
120
|
+
export type DeployArchiveResult =
|
|
121
|
+
| { creation_in_progress: null }
|
|
122
|
+
| { success: Principal }
|
|
123
|
+
| { failed: string };
|
|
124
|
+
export interface DeviceData {
|
|
125
|
+
alias: string;
|
|
126
|
+
metadata: [] | [MetadataMap];
|
|
127
|
+
origin: [] | [string];
|
|
128
|
+
protection: DeviceProtection;
|
|
129
|
+
pubkey: DeviceKey;
|
|
130
|
+
key_type: KeyType;
|
|
131
|
+
purpose: Purpose;
|
|
132
|
+
credential_id: [] | [CredentialId];
|
|
133
|
+
}
|
|
134
|
+
export type DeviceKey = PublicKey;
|
|
135
|
+
export type DeviceProtection = { unprotected: null } | { protected: null };
|
|
136
|
+
export interface DeviceRegistrationInfo {
|
|
137
|
+
tentative_device: [] | [DeviceData];
|
|
138
|
+
expiration: Timestamp;
|
|
139
|
+
}
|
|
140
|
+
export interface DeviceWithUsage {
|
|
141
|
+
alias: string;
|
|
142
|
+
last_usage: [] | [Timestamp];
|
|
143
|
+
metadata: [] | [MetadataMap];
|
|
144
|
+
origin: [] | [string];
|
|
145
|
+
protection: DeviceProtection;
|
|
146
|
+
pubkey: DeviceKey;
|
|
147
|
+
key_type: KeyType;
|
|
148
|
+
purpose: Purpose;
|
|
149
|
+
credential_id: [] | [CredentialId];
|
|
150
|
+
}
|
|
151
|
+
export type FrontendHostname = string;
|
|
152
|
+
export type GetDelegationResponse =
|
|
153
|
+
| { no_such_delegation: null }
|
|
154
|
+
| { signed_delegation: SignedDelegation };
|
|
155
|
+
export type GetIdAliasError =
|
|
156
|
+
| { InternalCanisterError: string }
|
|
157
|
+
| { Unauthorized: Principal }
|
|
158
|
+
| { NoSuchCredentials: string };
|
|
159
|
+
export interface GetIdAliasRequest {
|
|
160
|
+
rp_id_alias_jwt: string;
|
|
161
|
+
issuer: FrontendHostname;
|
|
162
|
+
issuer_id_alias_jwt: string;
|
|
163
|
+
relying_party: FrontendHostname;
|
|
164
|
+
identity_number: IdentityNumber;
|
|
165
|
+
}
|
|
166
|
+
export type HeaderField = [string, string];
|
|
167
|
+
export interface HttpRequest {
|
|
168
|
+
url: string;
|
|
169
|
+
method: string;
|
|
170
|
+
body: Uint8Array | number[];
|
|
171
|
+
headers: Array<HeaderField>;
|
|
172
|
+
certificate_version: [] | [number];
|
|
173
|
+
}
|
|
174
|
+
export interface HttpResponse {
|
|
175
|
+
body: Uint8Array | number[];
|
|
176
|
+
headers: Array<HeaderField>;
|
|
177
|
+
upgrade: [] | [boolean];
|
|
178
|
+
streaming_strategy: [] | [StreamingStrategy];
|
|
179
|
+
status_code: number;
|
|
180
|
+
}
|
|
181
|
+
export interface IdAliasCredentials {
|
|
182
|
+
rp_id_alias_credential: SignedIdAlias;
|
|
183
|
+
issuer_id_alias_credential: SignedIdAlias;
|
|
184
|
+
}
|
|
185
|
+
export interface IdRegFinishArg {
|
|
186
|
+
authn_method: AuthnMethodData;
|
|
187
|
+
}
|
|
188
|
+
export type IdRegFinishError =
|
|
189
|
+
| { NoRegistrationFlow: null }
|
|
190
|
+
| { UnexpectedCall: { next_step: RegistrationFlowNextStep } }
|
|
191
|
+
| { InvalidAuthnMethod: string }
|
|
192
|
+
| { IdentityLimitReached: null }
|
|
193
|
+
| { StorageError: string };
|
|
194
|
+
export interface IdRegFinishResult {
|
|
195
|
+
identity_number: bigint;
|
|
196
|
+
}
|
|
197
|
+
export interface IdRegNextStepResult {
|
|
198
|
+
next_step: RegistrationFlowNextStep;
|
|
199
|
+
}
|
|
200
|
+
export type IdRegStartError =
|
|
201
|
+
| { InvalidCaller: null }
|
|
202
|
+
| { AlreadyInProgress: null }
|
|
203
|
+
| { RateLimitExceeded: null };
|
|
204
|
+
export interface IdentityAnchorInfo {
|
|
205
|
+
devices: Array<DeviceWithUsage>;
|
|
206
|
+
openid_credentials: [] | [Array<OpenIdCredential>];
|
|
207
|
+
device_registration: [] | [DeviceRegistrationInfo];
|
|
208
|
+
}
|
|
209
|
+
export interface IdentityAuthnInfo {
|
|
210
|
+
authn_methods: Array<AuthnMethod>;
|
|
211
|
+
recovery_authn_methods: Array<AuthnMethod>;
|
|
212
|
+
}
|
|
213
|
+
export interface IdentityInfo {
|
|
214
|
+
authn_methods: Array<AuthnMethodData>;
|
|
215
|
+
metadata: MetadataMapV2;
|
|
216
|
+
authn_method_registration: [] | [AuthnMethodRegistrationInfo];
|
|
217
|
+
openid_credentials: [] | [Array<OpenIdCredential>];
|
|
218
|
+
}
|
|
219
|
+
export type IdentityInfoError =
|
|
220
|
+
| { InternalCanisterError: string }
|
|
221
|
+
| { Unauthorized: Principal };
|
|
222
|
+
export type IdentityMetadataReplaceError =
|
|
223
|
+
| {
|
|
224
|
+
InternalCanisterError: string;
|
|
225
|
+
}
|
|
226
|
+
| { Unauthorized: Principal }
|
|
227
|
+
| {
|
|
228
|
+
StorageSpaceExceeded: {
|
|
229
|
+
space_required: bigint;
|
|
230
|
+
space_available: bigint;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
export type IdentityNumber = bigint;
|
|
234
|
+
export interface InternetIdentityInit {
|
|
235
|
+
openid_google: [] | [[] | [OpenIdConfig]];
|
|
236
|
+
assigned_user_number_range: [] | [[bigint, bigint]];
|
|
237
|
+
archive_config: [] | [ArchiveConfig];
|
|
238
|
+
canister_creation_cycles_cost: [] | [bigint];
|
|
239
|
+
analytics_config: [] | [[] | [AnalyticsConfig]];
|
|
240
|
+
related_origins: [] | [Array<string>];
|
|
241
|
+
captcha_config: [] | [CaptchaConfig];
|
|
242
|
+
register_rate_limit: [] | [RateLimitConfig];
|
|
243
|
+
}
|
|
244
|
+
export interface InternetIdentityStats {
|
|
245
|
+
storage_layout_version: number;
|
|
246
|
+
users_registered: bigint;
|
|
247
|
+
assigned_user_number_range: [bigint, bigint];
|
|
248
|
+
archive_info: ArchiveInfo;
|
|
249
|
+
canister_creation_cycles_cost: bigint;
|
|
250
|
+
event_aggregations: Array<[string, Array<[string, bigint]>]>;
|
|
251
|
+
}
|
|
252
|
+
export type Iss = string;
|
|
253
|
+
export type JWT = string;
|
|
254
|
+
export type KeyType =
|
|
255
|
+
| { platform: null }
|
|
256
|
+
| { seed_phrase: null }
|
|
257
|
+
| { cross_platform: null }
|
|
258
|
+
| { unknown: null }
|
|
259
|
+
| { browser_storage_key: null };
|
|
260
|
+
export type MetadataMap = Array<
|
|
261
|
+
[
|
|
262
|
+
string,
|
|
263
|
+
(
|
|
264
|
+
| { map: MetadataMap }
|
|
265
|
+
| { string: string }
|
|
266
|
+
| { bytes: Uint8Array | number[] }
|
|
267
|
+
)
|
|
268
|
+
]
|
|
269
|
+
>;
|
|
270
|
+
export type MetadataMapV2 = Array<
|
|
271
|
+
[
|
|
272
|
+
string,
|
|
273
|
+
(
|
|
274
|
+
| { Map: MetadataMapV2 }
|
|
275
|
+
| { String: string }
|
|
276
|
+
| { Bytes: Uint8Array | number[] }
|
|
277
|
+
)
|
|
278
|
+
]
|
|
279
|
+
>;
|
|
280
|
+
export interface OpenIdConfig {
|
|
281
|
+
client_id: string;
|
|
282
|
+
}
|
|
283
|
+
export interface OpenIdCredential {
|
|
284
|
+
aud: Aud;
|
|
285
|
+
iss: Iss;
|
|
286
|
+
sub: Sub;
|
|
287
|
+
metadata: MetadataMapV2;
|
|
288
|
+
last_usage_timestamp: Timestamp;
|
|
289
|
+
}
|
|
290
|
+
export type OpenIdCredentialAddError =
|
|
291
|
+
| {
|
|
292
|
+
OpenIdCredentialAlreadyRegistered: null;
|
|
293
|
+
}
|
|
294
|
+
| { InternalCanisterError: string }
|
|
295
|
+
| { Unauthorized: Principal }
|
|
296
|
+
| { JwtVerificationFailed: null };
|
|
297
|
+
export type OpenIdCredentialKey = [Iss, Sub];
|
|
298
|
+
export type OpenIdCredentialRemoveError =
|
|
299
|
+
| { InternalCanisterError: string }
|
|
300
|
+
| { OpenIdCredentialNotFound: null }
|
|
301
|
+
| { Unauthorized: Principal };
|
|
302
|
+
export type PrepareIdAliasError =
|
|
303
|
+
| { InternalCanisterError: string }
|
|
304
|
+
| { Unauthorized: Principal };
|
|
305
|
+
export interface PrepareIdAliasRequest {
|
|
306
|
+
issuer: FrontendHostname;
|
|
307
|
+
relying_party: FrontendHostname;
|
|
308
|
+
identity_number: IdentityNumber;
|
|
309
|
+
}
|
|
310
|
+
export interface PreparedIdAlias {
|
|
311
|
+
rp_id_alias_jwt: string;
|
|
312
|
+
issuer_id_alias_jwt: string;
|
|
313
|
+
canister_sig_pk_der: PublicKey;
|
|
314
|
+
}
|
|
315
|
+
export type PublicKey = Uint8Array | number[];
|
|
316
|
+
export interface PublicKeyAuthn {
|
|
317
|
+
pubkey: PublicKey;
|
|
318
|
+
}
|
|
319
|
+
export type Purpose = { authentication: null } | { recovery: null };
|
|
320
|
+
export interface RateLimitConfig {
|
|
321
|
+
max_tokens: bigint;
|
|
322
|
+
time_per_token_ns: bigint;
|
|
323
|
+
}
|
|
324
|
+
export type RegisterResponse =
|
|
325
|
+
| { bad_challenge: null }
|
|
326
|
+
| { canister_full: null }
|
|
327
|
+
| { registered: { user_number: UserNumber } };
|
|
328
|
+
export type RegistrationFlowNextStep =
|
|
329
|
+
| {
|
|
330
|
+
CheckCaptcha: { captcha_png_base64: string };
|
|
331
|
+
}
|
|
332
|
+
| { Finish: null };
|
|
333
|
+
export type Salt = Uint8Array | number[];
|
|
334
|
+
export type SessionKey = PublicKey;
|
|
335
|
+
export interface SignedDelegation {
|
|
336
|
+
signature: Uint8Array | number[];
|
|
337
|
+
delegation: Delegation;
|
|
338
|
+
}
|
|
339
|
+
export interface SignedIdAlias {
|
|
340
|
+
credential_jws: string;
|
|
341
|
+
id_alias: Principal;
|
|
342
|
+
id_dapp: Principal;
|
|
343
|
+
}
|
|
344
|
+
export interface StreamingCallbackHttpResponse {
|
|
345
|
+
token: [] | [Token];
|
|
346
|
+
body: Uint8Array | number[];
|
|
347
|
+
}
|
|
348
|
+
export type StreamingStrategy = {
|
|
349
|
+
Callback: { token: Token; callback: [Principal, string] };
|
|
350
|
+
};
|
|
351
|
+
export type Sub = string;
|
|
352
|
+
export type Timestamp = bigint;
|
|
353
|
+
export type Token = {};
|
|
354
|
+
export type UserKey = PublicKey;
|
|
355
|
+
export type UserNumber = bigint;
|
|
356
|
+
export type VerifyTentativeDeviceResponse =
|
|
357
|
+
| {
|
|
358
|
+
device_registration_mode_off: null;
|
|
359
|
+
}
|
|
360
|
+
| { verified: null }
|
|
361
|
+
| { wrong_code: { retries_left: number } }
|
|
362
|
+
| { no_device_to_verify: null };
|
|
363
|
+
export interface WebAuthn {
|
|
364
|
+
pubkey: PublicKey;
|
|
365
|
+
credential_id: CredentialId;
|
|
366
|
+
}
|
|
367
|
+
export interface WebAuthnCredential {
|
|
368
|
+
pubkey: PublicKey;
|
|
369
|
+
credential_id: CredentialId;
|
|
370
|
+
}
|
|
371
|
+
export interface _SERVICE {
|
|
372
|
+
acknowledge_entries: ActorMethod<[bigint], undefined>;
|
|
373
|
+
add: ActorMethod<[UserNumber, DeviceData], undefined>;
|
|
374
|
+
add_tentative_device: ActorMethod<
|
|
375
|
+
[UserNumber, DeviceData],
|
|
376
|
+
AddTentativeDeviceResponse
|
|
377
|
+
>;
|
|
378
|
+
authn_method_add: ActorMethod<
|
|
379
|
+
[IdentityNumber, AuthnMethodData],
|
|
380
|
+
{ Ok: null } | { Err: AuthnMethodAddError }
|
|
381
|
+
>;
|
|
382
|
+
authn_method_confirm: ActorMethod<
|
|
383
|
+
[IdentityNumber, string],
|
|
384
|
+
{ Ok: null } | { Err: AuthnMethodConfirmationError }
|
|
385
|
+
>;
|
|
386
|
+
authn_method_metadata_replace: ActorMethod<
|
|
387
|
+
[IdentityNumber, PublicKey, MetadataMapV2],
|
|
388
|
+
{ Ok: null } | { Err: AuthnMethodMetadataReplaceError }
|
|
389
|
+
>;
|
|
390
|
+
authn_method_register: ActorMethod<
|
|
391
|
+
[IdentityNumber, AuthnMethodData],
|
|
392
|
+
{ Ok: AuthnMethodConfirmationCode } | { Err: AuthnMethodRegisterError }
|
|
393
|
+
>;
|
|
394
|
+
authn_method_registration_mode_enter: ActorMethod<
|
|
395
|
+
[IdentityNumber],
|
|
396
|
+
{ Ok: { expiration: Timestamp } } | { Err: null }
|
|
397
|
+
>;
|
|
398
|
+
authn_method_registration_mode_exit: ActorMethod<
|
|
399
|
+
[IdentityNumber],
|
|
400
|
+
{ Ok: null } | { Err: null }
|
|
401
|
+
>;
|
|
402
|
+
authn_method_remove: ActorMethod<
|
|
403
|
+
[IdentityNumber, PublicKey],
|
|
404
|
+
{ Ok: null } | { Err: null }
|
|
405
|
+
>;
|
|
406
|
+
authn_method_replace: ActorMethod<
|
|
407
|
+
[IdentityNumber, PublicKey, AuthnMethodData],
|
|
408
|
+
{ Ok: null } | { Err: AuthnMethodReplaceError }
|
|
409
|
+
>;
|
|
410
|
+
authn_method_security_settings_replace: ActorMethod<
|
|
411
|
+
[IdentityNumber, PublicKey, AuthnMethodSecuritySettings],
|
|
412
|
+
{ Ok: null } | { Err: AuthnMethodSecuritySettingsReplaceError }
|
|
413
|
+
>;
|
|
414
|
+
check_captcha: ActorMethod<
|
|
415
|
+
[CheckCaptchaArg],
|
|
416
|
+
{ Ok: IdRegNextStepResult } | { Err: CheckCaptchaError }
|
|
417
|
+
>;
|
|
418
|
+
config: ActorMethod<[], InternetIdentityInit>;
|
|
419
|
+
create_challenge: ActorMethod<[], Challenge>;
|
|
420
|
+
deploy_archive: ActorMethod<[Uint8Array | number[]], DeployArchiveResult>;
|
|
421
|
+
enter_device_registration_mode: ActorMethod<[UserNumber], Timestamp>;
|
|
422
|
+
exit_device_registration_mode: ActorMethod<[UserNumber], undefined>;
|
|
423
|
+
fetch_entries: ActorMethod<[], Array<BufferedArchiveEntry>>;
|
|
424
|
+
get_anchor_credentials: ActorMethod<[UserNumber], AnchorCredentials>;
|
|
425
|
+
get_anchor_info: ActorMethod<[UserNumber], IdentityAnchorInfo>;
|
|
426
|
+
get_delegation: ActorMethod<
|
|
427
|
+
[UserNumber, FrontendHostname, SessionKey, Timestamp],
|
|
428
|
+
GetDelegationResponse
|
|
429
|
+
>;
|
|
430
|
+
get_id_alias: ActorMethod<
|
|
431
|
+
[GetIdAliasRequest],
|
|
432
|
+
{ Ok: IdAliasCredentials } | { Err: GetIdAliasError }
|
|
433
|
+
>;
|
|
434
|
+
get_principal: ActorMethod<[UserNumber, FrontendHostname], Principal>;
|
|
435
|
+
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
436
|
+
http_request_update: ActorMethod<[HttpRequest], HttpResponse>;
|
|
437
|
+
identity_authn_info: ActorMethod<
|
|
438
|
+
[IdentityNumber],
|
|
439
|
+
{ Ok: IdentityAuthnInfo } | { Err: null }
|
|
440
|
+
>;
|
|
441
|
+
identity_info: ActorMethod<
|
|
442
|
+
[IdentityNumber],
|
|
443
|
+
{ Ok: IdentityInfo } | { Err: IdentityInfoError }
|
|
444
|
+
>;
|
|
445
|
+
identity_metadata_replace: ActorMethod<
|
|
446
|
+
[IdentityNumber, MetadataMapV2],
|
|
447
|
+
{ Ok: null } | { Err: IdentityMetadataReplaceError }
|
|
448
|
+
>;
|
|
449
|
+
identity_registration_finish: ActorMethod<
|
|
450
|
+
[IdRegFinishArg],
|
|
451
|
+
{ Ok: IdRegFinishResult } | { Err: IdRegFinishError }
|
|
452
|
+
>;
|
|
453
|
+
identity_registration_start: ActorMethod<
|
|
454
|
+
[],
|
|
455
|
+
{ Ok: IdRegNextStepResult } | { Err: IdRegStartError }
|
|
456
|
+
>;
|
|
457
|
+
init_salt: ActorMethod<[], undefined>;
|
|
458
|
+
lookup: ActorMethod<[UserNumber], Array<DeviceData>>;
|
|
459
|
+
openid_credential_add: ActorMethod<
|
|
460
|
+
[IdentityNumber, JWT, Salt],
|
|
461
|
+
{ Ok: null } | { Err: OpenIdCredentialAddError }
|
|
462
|
+
>;
|
|
463
|
+
openid_credential_remove: ActorMethod<
|
|
464
|
+
[IdentityNumber, OpenIdCredentialKey],
|
|
465
|
+
{ Ok: null } | { Err: OpenIdCredentialRemoveError }
|
|
466
|
+
>;
|
|
467
|
+
prepare_delegation: ActorMethod<
|
|
468
|
+
[UserNumber, FrontendHostname, SessionKey, [] | [bigint]],
|
|
469
|
+
[UserKey, Timestamp]
|
|
470
|
+
>;
|
|
471
|
+
prepare_id_alias: ActorMethod<
|
|
472
|
+
[PrepareIdAliasRequest],
|
|
473
|
+
{ Ok: PreparedIdAlias } | { Err: PrepareIdAliasError }
|
|
474
|
+
>;
|
|
475
|
+
register: ActorMethod<
|
|
476
|
+
[DeviceData, ChallengeResult, [] | [Principal]],
|
|
477
|
+
RegisterResponse
|
|
478
|
+
>;
|
|
479
|
+
remove: ActorMethod<[UserNumber, DeviceKey], undefined>;
|
|
480
|
+
replace: ActorMethod<[UserNumber, DeviceKey, DeviceData], undefined>;
|
|
481
|
+
stats: ActorMethod<[], InternetIdentityStats>;
|
|
482
|
+
update: ActorMethod<[UserNumber, DeviceKey, DeviceData], undefined>;
|
|
483
|
+
verify_tentative_device: ActorMethod<
|
|
484
|
+
[UserNumber, string],
|
|
485
|
+
VerifyTentativeDeviceResponse
|
|
486
|
+
>;
|
|
487
|
+
}
|
|
488
|
+
export type idlFactory = IDL.InterfaceFactory;
|
|
489
|
+
export type init = (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
490
|
+
export const MetadataMap = IDL.Rec();
|
|
491
|
+
export const MetadataMapV2 = IDL.Rec();
|
|
492
|
+
export const OpenIdConfig = IDL.Record({ client_id: IDL.Text });
|
|
493
|
+
export const ArchiveConfig = IDL.Record({
|
|
494
|
+
polling_interval_ns: IDL.Nat64,
|
|
495
|
+
entries_buffer_limit: IDL.Nat64,
|
|
496
|
+
module_hash: IDL.Vec(IDL.Nat8),
|
|
497
|
+
entries_fetch_limit: IDL.Nat16
|
|
498
|
+
});
|
|
499
|
+
export const AnalyticsConfig = IDL.Variant({
|
|
500
|
+
Plausible: IDL.Record({
|
|
501
|
+
domain: IDL.Opt(IDL.Text),
|
|
502
|
+
track_localhost: IDL.Opt(IDL.Bool),
|
|
503
|
+
hash_mode: IDL.Opt(IDL.Bool),
|
|
504
|
+
api_host: IDL.Opt(IDL.Text)
|
|
505
|
+
})
|
|
506
|
+
});
|
|
507
|
+
export const CaptchaConfig = IDL.Record({
|
|
508
|
+
max_unsolved_captchas: IDL.Nat64,
|
|
509
|
+
captcha_trigger: IDL.Variant({
|
|
510
|
+
Dynamic: IDL.Record({
|
|
511
|
+
reference_rate_sampling_interval_s: IDL.Nat64,
|
|
512
|
+
threshold_pct: IDL.Nat16,
|
|
513
|
+
current_rate_sampling_interval_s: IDL.Nat64
|
|
514
|
+
}),
|
|
515
|
+
Static: IDL.Variant({
|
|
516
|
+
CaptchaDisabled: IDL.Null,
|
|
517
|
+
CaptchaEnabled: IDL.Null
|
|
518
|
+
})
|
|
519
|
+
})
|
|
520
|
+
});
|
|
521
|
+
export const RateLimitConfig = IDL.Record({
|
|
522
|
+
max_tokens: IDL.Nat64,
|
|
523
|
+
time_per_token_ns: IDL.Nat64
|
|
524
|
+
});
|
|
525
|
+
export const InternetIdentityInit = IDL.Record({
|
|
526
|
+
openid_google: IDL.Opt(IDL.Opt(OpenIdConfig)),
|
|
527
|
+
assigned_user_number_range: IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
|
|
528
|
+
archive_config: IDL.Opt(ArchiveConfig),
|
|
529
|
+
canister_creation_cycles_cost: IDL.Opt(IDL.Nat64),
|
|
530
|
+
analytics_config: IDL.Opt(IDL.Opt(AnalyticsConfig)),
|
|
531
|
+
related_origins: IDL.Opt(IDL.Vec(IDL.Text)),
|
|
532
|
+
captcha_config: IDL.Opt(CaptchaConfig),
|
|
533
|
+
register_rate_limit: IDL.Opt(RateLimitConfig)
|
|
534
|
+
});
|
|
535
|
+
export const UserNumber = IDL.Nat64;
|
|
536
|
+
MetadataMap.fill(
|
|
537
|
+
IDL.Vec(
|
|
538
|
+
IDL.Tuple(
|
|
539
|
+
IDL.Text,
|
|
540
|
+
IDL.Variant({
|
|
541
|
+
map: MetadataMap,
|
|
542
|
+
string: IDL.Text,
|
|
543
|
+
bytes: IDL.Vec(IDL.Nat8)
|
|
544
|
+
})
|
|
545
|
+
)
|
|
546
|
+
)
|
|
547
|
+
);
|
|
548
|
+
export const DeviceProtection = IDL.Variant({
|
|
549
|
+
unprotected: IDL.Null,
|
|
550
|
+
protected: IDL.Null
|
|
551
|
+
});
|
|
552
|
+
export const PublicKey = IDL.Vec(IDL.Nat8);
|
|
553
|
+
export const DeviceKey = PublicKey;
|
|
554
|
+
export const KeyType = IDL.Variant({
|
|
555
|
+
platform: IDL.Null,
|
|
556
|
+
seed_phrase: IDL.Null,
|
|
557
|
+
cross_platform: IDL.Null,
|
|
558
|
+
unknown: IDL.Null,
|
|
559
|
+
browser_storage_key: IDL.Null
|
|
560
|
+
});
|
|
561
|
+
export const Purpose = IDL.Variant({
|
|
562
|
+
authentication: IDL.Null,
|
|
563
|
+
recovery: IDL.Null
|
|
564
|
+
});
|
|
565
|
+
export const CredentialId = IDL.Vec(IDL.Nat8);
|
|
566
|
+
export const DeviceData = IDL.Record({
|
|
567
|
+
alias: IDL.Text,
|
|
568
|
+
metadata: IDL.Opt(MetadataMap),
|
|
569
|
+
origin: IDL.Opt(IDL.Text),
|
|
570
|
+
protection: DeviceProtection,
|
|
571
|
+
pubkey: DeviceKey,
|
|
572
|
+
key_type: KeyType,
|
|
573
|
+
purpose: Purpose,
|
|
574
|
+
credential_id: IDL.Opt(CredentialId)
|
|
575
|
+
});
|
|
576
|
+
export const Timestamp = IDL.Nat64;
|
|
577
|
+
export const AddTentativeDeviceResponse = IDL.Variant({
|
|
578
|
+
device_registration_mode_off: IDL.Null,
|
|
579
|
+
another_device_tentatively_added: IDL.Null,
|
|
580
|
+
added_tentatively: IDL.Record({
|
|
581
|
+
verification_code: IDL.Text,
|
|
582
|
+
device_registration_timeout: Timestamp
|
|
583
|
+
})
|
|
584
|
+
});
|
|
585
|
+
export const IdentityNumber = IDL.Nat64;
|
|
586
|
+
export const AuthnMethodProtection = IDL.Variant({
|
|
587
|
+
Protected: IDL.Null,
|
|
588
|
+
Unprotected: IDL.Null
|
|
589
|
+
});
|
|
590
|
+
export const AuthnMethodPurpose = IDL.Variant({
|
|
591
|
+
Recovery: IDL.Null,
|
|
592
|
+
Authentication: IDL.Null
|
|
593
|
+
});
|
|
594
|
+
export const AuthnMethodSecuritySettings = IDL.Record({
|
|
595
|
+
protection: AuthnMethodProtection,
|
|
596
|
+
purpose: AuthnMethodPurpose
|
|
597
|
+
});
|
|
598
|
+
MetadataMapV2.fill(
|
|
599
|
+
IDL.Vec(
|
|
600
|
+
IDL.Tuple(
|
|
601
|
+
IDL.Text,
|
|
602
|
+
IDL.Variant({
|
|
603
|
+
Map: MetadataMapV2,
|
|
604
|
+
String: IDL.Text,
|
|
605
|
+
Bytes: IDL.Vec(IDL.Nat8)
|
|
606
|
+
})
|
|
607
|
+
)
|
|
608
|
+
)
|
|
609
|
+
);
|
|
610
|
+
export const PublicKeyAuthn = IDL.Record({ pubkey: PublicKey });
|
|
611
|
+
export const WebAuthn = IDL.Record({
|
|
612
|
+
pubkey: PublicKey,
|
|
613
|
+
credential_id: CredentialId
|
|
614
|
+
});
|
|
615
|
+
export const AuthnMethod = IDL.Variant({
|
|
616
|
+
PubKey: PublicKeyAuthn,
|
|
617
|
+
WebAuthn: WebAuthn
|
|
618
|
+
});
|
|
619
|
+
export const AuthnMethodData = IDL.Record({
|
|
620
|
+
security_settings: AuthnMethodSecuritySettings,
|
|
621
|
+
metadata: MetadataMapV2,
|
|
622
|
+
last_authentication: IDL.Opt(Timestamp),
|
|
623
|
+
authn_method: AuthnMethod
|
|
624
|
+
});
|
|
625
|
+
export const AuthnMethodAddError = IDL.Variant({
|
|
626
|
+
InvalidMetadata: IDL.Text
|
|
627
|
+
});
|
|
628
|
+
export const AuthnMethodConfirmationError = IDL.Variant({
|
|
629
|
+
RegistrationModeOff: IDL.Null,
|
|
630
|
+
NoAuthnMethodToConfirm: IDL.Null,
|
|
631
|
+
WrongCode: IDL.Record({ retries_left: IDL.Nat8 })
|
|
632
|
+
});
|
|
633
|
+
export const AuthnMethodMetadataReplaceError = IDL.Variant({
|
|
634
|
+
AuthnMethodNotFound: IDL.Null,
|
|
635
|
+
InvalidMetadata: IDL.Text
|
|
636
|
+
});
|
|
637
|
+
export const AuthnMethodConfirmationCode = IDL.Record({
|
|
638
|
+
confirmation_code: IDL.Text,
|
|
639
|
+
expiration: Timestamp
|
|
640
|
+
});
|
|
641
|
+
export const AuthnMethodRegisterError = IDL.Variant({
|
|
642
|
+
RegistrationModeOff: IDL.Null,
|
|
643
|
+
RegistrationAlreadyInProgress: IDL.Null,
|
|
644
|
+
InvalidMetadata: IDL.Text
|
|
645
|
+
});
|
|
646
|
+
export const AuthnMethodReplaceError = IDL.Variant({
|
|
647
|
+
AuthnMethodNotFound: IDL.Null,
|
|
648
|
+
InvalidMetadata: IDL.Text
|
|
649
|
+
});
|
|
650
|
+
export const AuthnMethodSecuritySettingsReplaceError = IDL.Variant({
|
|
651
|
+
AuthnMethodNotFound: IDL.Null
|
|
652
|
+
});
|
|
653
|
+
export const CheckCaptchaArg = IDL.Record({ solution: IDL.Text });
|
|
654
|
+
export const RegistrationFlowNextStep = IDL.Variant({
|
|
655
|
+
CheckCaptcha: IDL.Record({ captcha_png_base64: IDL.Text }),
|
|
656
|
+
Finish: IDL.Null
|
|
657
|
+
});
|
|
658
|
+
export const IdRegNextStepResult = IDL.Record({
|
|
659
|
+
next_step: RegistrationFlowNextStep
|
|
660
|
+
});
|
|
661
|
+
export const CheckCaptchaError = IDL.Variant({
|
|
662
|
+
NoRegistrationFlow: IDL.Null,
|
|
663
|
+
UnexpectedCall: IDL.Record({ next_step: RegistrationFlowNextStep }),
|
|
664
|
+
WrongSolution: IDL.Record({ new_captcha_png_base64: IDL.Text })
|
|
665
|
+
});
|
|
666
|
+
export const ChallengeKey = IDL.Text;
|
|
667
|
+
export const Challenge = IDL.Record({
|
|
668
|
+
png_base64: IDL.Text,
|
|
669
|
+
challenge_key: ChallengeKey
|
|
670
|
+
});
|
|
671
|
+
export const DeployArchiveResult = IDL.Variant({
|
|
672
|
+
creation_in_progress: IDL.Null,
|
|
673
|
+
success: IDL.Principal,
|
|
674
|
+
failed: IDL.Text
|
|
675
|
+
});
|
|
676
|
+
export const BufferedArchiveEntry = IDL.Record({
|
|
677
|
+
sequence_number: IDL.Nat64,
|
|
678
|
+
entry: IDL.Vec(IDL.Nat8),
|
|
679
|
+
anchor_number: UserNumber,
|
|
680
|
+
timestamp: Timestamp
|
|
681
|
+
});
|
|
682
|
+
export const WebAuthnCredential = IDL.Record({
|
|
683
|
+
pubkey: PublicKey,
|
|
684
|
+
credential_id: CredentialId
|
|
685
|
+
});
|
|
686
|
+
export const AnchorCredentials = IDL.Record({
|
|
687
|
+
recovery_phrases: IDL.Vec(PublicKey),
|
|
688
|
+
credentials: IDL.Vec(WebAuthnCredential),
|
|
689
|
+
recovery_credentials: IDL.Vec(WebAuthnCredential)
|
|
690
|
+
});
|
|
691
|
+
export const DeviceWithUsage = IDL.Record({
|
|
692
|
+
alias: IDL.Text,
|
|
693
|
+
last_usage: IDL.Opt(Timestamp),
|
|
694
|
+
metadata: IDL.Opt(MetadataMap),
|
|
695
|
+
origin: IDL.Opt(IDL.Text),
|
|
696
|
+
protection: DeviceProtection,
|
|
697
|
+
pubkey: DeviceKey,
|
|
698
|
+
key_type: KeyType,
|
|
699
|
+
purpose: Purpose,
|
|
700
|
+
credential_id: IDL.Opt(CredentialId)
|
|
701
|
+
});
|
|
702
|
+
export const Aud = IDL.Text;
|
|
703
|
+
export const Iss = IDL.Text;
|
|
704
|
+
export const Sub = IDL.Text;
|
|
705
|
+
export const OpenIdCredential = IDL.Record({
|
|
706
|
+
aud: Aud,
|
|
707
|
+
iss: Iss,
|
|
708
|
+
sub: Sub,
|
|
709
|
+
metadata: MetadataMapV2,
|
|
710
|
+
last_usage_timestamp: Timestamp
|
|
711
|
+
});
|
|
712
|
+
export const DeviceRegistrationInfo = IDL.Record({
|
|
713
|
+
tentative_device: IDL.Opt(DeviceData),
|
|
714
|
+
expiration: Timestamp
|
|
715
|
+
});
|
|
716
|
+
export const IdentityAnchorInfo = IDL.Record({
|
|
717
|
+
devices: IDL.Vec(DeviceWithUsage),
|
|
718
|
+
openid_credentials: IDL.Opt(IDL.Vec(OpenIdCredential)),
|
|
719
|
+
device_registration: IDL.Opt(DeviceRegistrationInfo)
|
|
720
|
+
});
|
|
721
|
+
export const FrontendHostname = IDL.Text;
|
|
722
|
+
export const SessionKey = PublicKey;
|
|
723
|
+
export const Delegation = IDL.Record({
|
|
724
|
+
pubkey: PublicKey,
|
|
725
|
+
targets: IDL.Opt(IDL.Vec(IDL.Principal)),
|
|
726
|
+
expiration: Timestamp
|
|
727
|
+
});
|
|
728
|
+
export const SignedDelegation = IDL.Record({
|
|
729
|
+
signature: IDL.Vec(IDL.Nat8),
|
|
730
|
+
delegation: Delegation
|
|
731
|
+
});
|
|
732
|
+
export const GetDelegationResponse = IDL.Variant({
|
|
733
|
+
no_such_delegation: IDL.Null,
|
|
734
|
+
signed_delegation: SignedDelegation
|
|
735
|
+
});
|
|
736
|
+
export const GetIdAliasRequest = IDL.Record({
|
|
737
|
+
rp_id_alias_jwt: IDL.Text,
|
|
738
|
+
issuer: FrontendHostname,
|
|
739
|
+
issuer_id_alias_jwt: IDL.Text,
|
|
740
|
+
relying_party: FrontendHostname,
|
|
741
|
+
identity_number: IdentityNumber
|
|
742
|
+
});
|
|
743
|
+
export const SignedIdAlias = IDL.Record({
|
|
744
|
+
credential_jws: IDL.Text,
|
|
745
|
+
id_alias: IDL.Principal,
|
|
746
|
+
id_dapp: IDL.Principal
|
|
747
|
+
});
|
|
748
|
+
export const IdAliasCredentials = IDL.Record({
|
|
749
|
+
rp_id_alias_credential: SignedIdAlias,
|
|
750
|
+
issuer_id_alias_credential: SignedIdAlias
|
|
751
|
+
});
|
|
752
|
+
export const GetIdAliasError = IDL.Variant({
|
|
753
|
+
InternalCanisterError: IDL.Text,
|
|
754
|
+
Unauthorized: IDL.Principal,
|
|
755
|
+
NoSuchCredentials: IDL.Text
|
|
756
|
+
});
|
|
757
|
+
export const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
|
|
758
|
+
export const HttpRequest = IDL.Record({
|
|
759
|
+
url: IDL.Text,
|
|
760
|
+
method: IDL.Text,
|
|
761
|
+
body: IDL.Vec(IDL.Nat8),
|
|
762
|
+
headers: IDL.Vec(HeaderField),
|
|
763
|
+
certificate_version: IDL.Opt(IDL.Nat16)
|
|
764
|
+
});
|
|
765
|
+
export const Token = IDL.Record({});
|
|
766
|
+
export const StreamingCallbackHttpResponse = IDL.Record({
|
|
767
|
+
token: IDL.Opt(Token),
|
|
768
|
+
body: IDL.Vec(IDL.Nat8)
|
|
769
|
+
});
|
|
770
|
+
export const StreamingStrategy = IDL.Variant({
|
|
771
|
+
Callback: IDL.Record({
|
|
772
|
+
token: Token,
|
|
773
|
+
callback: IDL.Func([Token], [StreamingCallbackHttpResponse], ['query'])
|
|
774
|
+
})
|
|
775
|
+
});
|
|
776
|
+
export const HttpResponse = IDL.Record({
|
|
777
|
+
body: IDL.Vec(IDL.Nat8),
|
|
778
|
+
headers: IDL.Vec(HeaderField),
|
|
779
|
+
upgrade: IDL.Opt(IDL.Bool),
|
|
780
|
+
streaming_strategy: IDL.Opt(StreamingStrategy),
|
|
781
|
+
status_code: IDL.Nat16
|
|
782
|
+
});
|
|
783
|
+
export const IdentityAuthnInfo = IDL.Record({
|
|
784
|
+
authn_methods: IDL.Vec(AuthnMethod),
|
|
785
|
+
recovery_authn_methods: IDL.Vec(AuthnMethod)
|
|
786
|
+
});
|
|
787
|
+
export const AuthnMethodRegistrationInfo = IDL.Record({
|
|
788
|
+
expiration: Timestamp,
|
|
789
|
+
authn_method: IDL.Opt(AuthnMethodData)
|
|
790
|
+
});
|
|
791
|
+
export const IdentityInfo = IDL.Record({
|
|
792
|
+
authn_methods: IDL.Vec(AuthnMethodData),
|
|
793
|
+
metadata: MetadataMapV2,
|
|
794
|
+
authn_method_registration: IDL.Opt(AuthnMethodRegistrationInfo),
|
|
795
|
+
openid_credentials: IDL.Opt(IDL.Vec(OpenIdCredential))
|
|
796
|
+
});
|
|
797
|
+
export const IdentityInfoError = IDL.Variant({
|
|
798
|
+
InternalCanisterError: IDL.Text,
|
|
799
|
+
Unauthorized: IDL.Principal
|
|
800
|
+
});
|
|
801
|
+
export const IdentityMetadataReplaceError = IDL.Variant({
|
|
802
|
+
InternalCanisterError: IDL.Text,
|
|
803
|
+
Unauthorized: IDL.Principal,
|
|
804
|
+
StorageSpaceExceeded: IDL.Record({
|
|
805
|
+
space_required: IDL.Nat64,
|
|
806
|
+
space_available: IDL.Nat64
|
|
807
|
+
})
|
|
808
|
+
});
|
|
809
|
+
export const IdRegFinishArg = IDL.Record({ authn_method: AuthnMethodData });
|
|
810
|
+
export const IdRegFinishResult = IDL.Record({ identity_number: IDL.Nat64 });
|
|
811
|
+
export const IdRegFinishError = IDL.Variant({
|
|
812
|
+
NoRegistrationFlow: IDL.Null,
|
|
813
|
+
UnexpectedCall: IDL.Record({ next_step: RegistrationFlowNextStep }),
|
|
814
|
+
InvalidAuthnMethod: IDL.Text,
|
|
815
|
+
IdentityLimitReached: IDL.Null,
|
|
816
|
+
StorageError: IDL.Text
|
|
817
|
+
});
|
|
818
|
+
export const IdRegStartError = IDL.Variant({
|
|
819
|
+
InvalidCaller: IDL.Null,
|
|
820
|
+
AlreadyInProgress: IDL.Null,
|
|
821
|
+
RateLimitExceeded: IDL.Null
|
|
822
|
+
});
|
|
823
|
+
export const JWT = IDL.Text;
|
|
824
|
+
export const Salt = IDL.Vec(IDL.Nat8);
|
|
825
|
+
export const OpenIdCredentialAddError = IDL.Variant({
|
|
826
|
+
OpenIdCredentialAlreadyRegistered: IDL.Null,
|
|
827
|
+
InternalCanisterError: IDL.Text,
|
|
828
|
+
Unauthorized: IDL.Principal,
|
|
829
|
+
JwtVerificationFailed: IDL.Null
|
|
830
|
+
});
|
|
831
|
+
export const OpenIdCredentialKey = IDL.Tuple(Iss, Sub);
|
|
832
|
+
export const OpenIdCredentialRemoveError = IDL.Variant({
|
|
833
|
+
InternalCanisterError: IDL.Text,
|
|
834
|
+
OpenIdCredentialNotFound: IDL.Null,
|
|
835
|
+
Unauthorized: IDL.Principal
|
|
836
|
+
});
|
|
837
|
+
export const UserKey = PublicKey;
|
|
838
|
+
export const PrepareIdAliasRequest = IDL.Record({
|
|
839
|
+
issuer: FrontendHostname,
|
|
840
|
+
relying_party: FrontendHostname,
|
|
841
|
+
identity_number: IdentityNumber
|
|
842
|
+
});
|
|
843
|
+
export const PreparedIdAlias = IDL.Record({
|
|
844
|
+
rp_id_alias_jwt: IDL.Text,
|
|
845
|
+
issuer_id_alias_jwt: IDL.Text,
|
|
846
|
+
canister_sig_pk_der: PublicKey
|
|
847
|
+
});
|
|
848
|
+
export const PrepareIdAliasError = IDL.Variant({
|
|
849
|
+
InternalCanisterError: IDL.Text,
|
|
850
|
+
Unauthorized: IDL.Principal
|
|
851
|
+
});
|
|
852
|
+
export const ChallengeResult = IDL.Record({
|
|
853
|
+
key: ChallengeKey,
|
|
854
|
+
chars: IDL.Text
|
|
855
|
+
});
|
|
856
|
+
export const RegisterResponse = IDL.Variant({
|
|
857
|
+
bad_challenge: IDL.Null,
|
|
858
|
+
canister_full: IDL.Null,
|
|
859
|
+
registered: IDL.Record({ user_number: UserNumber })
|
|
860
|
+
});
|
|
861
|
+
export const ArchiveInfo = IDL.Record({
|
|
862
|
+
archive_config: IDL.Opt(ArchiveConfig),
|
|
863
|
+
archive_canister: IDL.Opt(IDL.Principal)
|
|
864
|
+
});
|
|
865
|
+
export const InternetIdentityStats = IDL.Record({
|
|
866
|
+
storage_layout_version: IDL.Nat8,
|
|
867
|
+
users_registered: IDL.Nat64,
|
|
868
|
+
assigned_user_number_range: IDL.Tuple(IDL.Nat64, IDL.Nat64),
|
|
869
|
+
archive_info: ArchiveInfo,
|
|
870
|
+
canister_creation_cycles_cost: IDL.Nat64,
|
|
871
|
+
event_aggregations: IDL.Vec(
|
|
872
|
+
IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat64)))
|
|
873
|
+
)
|
|
874
|
+
});
|
|
875
|
+
export const VerifyTentativeDeviceResponse = IDL.Variant({
|
|
876
|
+
device_registration_mode_off: IDL.Null,
|
|
877
|
+
verified: IDL.Null,
|
|
878
|
+
wrong_code: IDL.Record({ retries_left: IDL.Nat8 }),
|
|
879
|
+
no_device_to_verify: IDL.Null
|
|
880
|
+
});
|
|
881
|
+
export const idlFactory: idlFactory = ({ IDL }) => {
|
|
882
|
+
const MetadataMap = IDL.Rec();
|
|
883
|
+
const MetadataMapV2 = IDL.Rec();
|
|
884
|
+
const OpenIdConfig = IDL.Record({ client_id: IDL.Text });
|
|
885
|
+
const ArchiveConfig = IDL.Record({
|
|
886
|
+
polling_interval_ns: IDL.Nat64,
|
|
887
|
+
entries_buffer_limit: IDL.Nat64,
|
|
888
|
+
module_hash: IDL.Vec(IDL.Nat8),
|
|
889
|
+
entries_fetch_limit: IDL.Nat16
|
|
890
|
+
});
|
|
891
|
+
const AnalyticsConfig = IDL.Variant({
|
|
892
|
+
Plausible: IDL.Record({
|
|
893
|
+
domain: IDL.Opt(IDL.Text),
|
|
894
|
+
track_localhost: IDL.Opt(IDL.Bool),
|
|
895
|
+
hash_mode: IDL.Opt(IDL.Bool),
|
|
896
|
+
api_host: IDL.Opt(IDL.Text)
|
|
897
|
+
})
|
|
898
|
+
});
|
|
899
|
+
const CaptchaConfig = IDL.Record({
|
|
900
|
+
max_unsolved_captchas: IDL.Nat64,
|
|
901
|
+
captcha_trigger: IDL.Variant({
|
|
902
|
+
Dynamic: IDL.Record({
|
|
903
|
+
reference_rate_sampling_interval_s: IDL.Nat64,
|
|
904
|
+
threshold_pct: IDL.Nat16,
|
|
905
|
+
current_rate_sampling_interval_s: IDL.Nat64
|
|
906
|
+
}),
|
|
907
|
+
Static: IDL.Variant({
|
|
908
|
+
CaptchaDisabled: IDL.Null,
|
|
909
|
+
CaptchaEnabled: IDL.Null
|
|
910
|
+
})
|
|
911
|
+
})
|
|
912
|
+
});
|
|
913
|
+
const RateLimitConfig = IDL.Record({
|
|
914
|
+
max_tokens: IDL.Nat64,
|
|
915
|
+
time_per_token_ns: IDL.Nat64
|
|
916
|
+
});
|
|
917
|
+
const InternetIdentityInit = IDL.Record({
|
|
918
|
+
openid_google: IDL.Opt(IDL.Opt(OpenIdConfig)),
|
|
919
|
+
assigned_user_number_range: IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
|
|
920
|
+
archive_config: IDL.Opt(ArchiveConfig),
|
|
921
|
+
canister_creation_cycles_cost: IDL.Opt(IDL.Nat64),
|
|
922
|
+
analytics_config: IDL.Opt(IDL.Opt(AnalyticsConfig)),
|
|
923
|
+
related_origins: IDL.Opt(IDL.Vec(IDL.Text)),
|
|
924
|
+
captcha_config: IDL.Opt(CaptchaConfig),
|
|
925
|
+
register_rate_limit: IDL.Opt(RateLimitConfig)
|
|
926
|
+
});
|
|
927
|
+
const UserNumber = IDL.Nat64;
|
|
928
|
+
MetadataMap.fill(
|
|
929
|
+
IDL.Vec(
|
|
930
|
+
IDL.Tuple(
|
|
931
|
+
IDL.Text,
|
|
932
|
+
IDL.Variant({
|
|
933
|
+
map: MetadataMap,
|
|
934
|
+
string: IDL.Text,
|
|
935
|
+
bytes: IDL.Vec(IDL.Nat8)
|
|
936
|
+
})
|
|
937
|
+
)
|
|
938
|
+
)
|
|
939
|
+
);
|
|
940
|
+
const DeviceProtection = IDL.Variant({
|
|
941
|
+
unprotected: IDL.Null,
|
|
942
|
+
protected: IDL.Null
|
|
943
|
+
});
|
|
944
|
+
const PublicKey = IDL.Vec(IDL.Nat8);
|
|
945
|
+
const DeviceKey = PublicKey;
|
|
946
|
+
const KeyType = IDL.Variant({
|
|
947
|
+
platform: IDL.Null,
|
|
948
|
+
seed_phrase: IDL.Null,
|
|
949
|
+
cross_platform: IDL.Null,
|
|
950
|
+
unknown: IDL.Null,
|
|
951
|
+
browser_storage_key: IDL.Null
|
|
952
|
+
});
|
|
953
|
+
const Purpose = IDL.Variant({
|
|
954
|
+
authentication: IDL.Null,
|
|
955
|
+
recovery: IDL.Null
|
|
956
|
+
});
|
|
957
|
+
const CredentialId = IDL.Vec(IDL.Nat8);
|
|
958
|
+
const DeviceData = IDL.Record({
|
|
959
|
+
alias: IDL.Text,
|
|
960
|
+
metadata: IDL.Opt(MetadataMap),
|
|
961
|
+
origin: IDL.Opt(IDL.Text),
|
|
962
|
+
protection: DeviceProtection,
|
|
963
|
+
pubkey: DeviceKey,
|
|
964
|
+
key_type: KeyType,
|
|
965
|
+
purpose: Purpose,
|
|
966
|
+
credential_id: IDL.Opt(CredentialId)
|
|
967
|
+
});
|
|
968
|
+
const Timestamp = IDL.Nat64;
|
|
969
|
+
const AddTentativeDeviceResponse = IDL.Variant({
|
|
970
|
+
device_registration_mode_off: IDL.Null,
|
|
971
|
+
another_device_tentatively_added: IDL.Null,
|
|
972
|
+
added_tentatively: IDL.Record({
|
|
973
|
+
verification_code: IDL.Text,
|
|
974
|
+
device_registration_timeout: Timestamp
|
|
975
|
+
})
|
|
976
|
+
});
|
|
977
|
+
const IdentityNumber = IDL.Nat64;
|
|
978
|
+
const AuthnMethodProtection = IDL.Variant({
|
|
979
|
+
Protected: IDL.Null,
|
|
980
|
+
Unprotected: IDL.Null
|
|
981
|
+
});
|
|
982
|
+
const AuthnMethodPurpose = IDL.Variant({
|
|
983
|
+
Recovery: IDL.Null,
|
|
984
|
+
Authentication: IDL.Null
|
|
985
|
+
});
|
|
986
|
+
const AuthnMethodSecuritySettings = IDL.Record({
|
|
987
|
+
protection: AuthnMethodProtection,
|
|
988
|
+
purpose: AuthnMethodPurpose
|
|
989
|
+
});
|
|
990
|
+
MetadataMapV2.fill(
|
|
991
|
+
IDL.Vec(
|
|
992
|
+
IDL.Tuple(
|
|
993
|
+
IDL.Text,
|
|
994
|
+
IDL.Variant({
|
|
995
|
+
Map: MetadataMapV2,
|
|
996
|
+
String: IDL.Text,
|
|
997
|
+
Bytes: IDL.Vec(IDL.Nat8)
|
|
998
|
+
})
|
|
999
|
+
)
|
|
1000
|
+
)
|
|
1001
|
+
);
|
|
1002
|
+
const PublicKeyAuthn = IDL.Record({ pubkey: PublicKey });
|
|
1003
|
+
const WebAuthn = IDL.Record({
|
|
1004
|
+
pubkey: PublicKey,
|
|
1005
|
+
credential_id: CredentialId
|
|
1006
|
+
});
|
|
1007
|
+
const AuthnMethod = IDL.Variant({
|
|
1008
|
+
PubKey: PublicKeyAuthn,
|
|
1009
|
+
WebAuthn: WebAuthn
|
|
1010
|
+
});
|
|
1011
|
+
const AuthnMethodData = IDL.Record({
|
|
1012
|
+
security_settings: AuthnMethodSecuritySettings,
|
|
1013
|
+
metadata: MetadataMapV2,
|
|
1014
|
+
last_authentication: IDL.Opt(Timestamp),
|
|
1015
|
+
authn_method: AuthnMethod
|
|
1016
|
+
});
|
|
1017
|
+
const AuthnMethodAddError = IDL.Variant({ InvalidMetadata: IDL.Text });
|
|
1018
|
+
const AuthnMethodConfirmationError = IDL.Variant({
|
|
1019
|
+
RegistrationModeOff: IDL.Null,
|
|
1020
|
+
NoAuthnMethodToConfirm: IDL.Null,
|
|
1021
|
+
WrongCode: IDL.Record({ retries_left: IDL.Nat8 })
|
|
1022
|
+
});
|
|
1023
|
+
const AuthnMethodMetadataReplaceError = IDL.Variant({
|
|
1024
|
+
AuthnMethodNotFound: IDL.Null,
|
|
1025
|
+
InvalidMetadata: IDL.Text
|
|
1026
|
+
});
|
|
1027
|
+
const AuthnMethodConfirmationCode = IDL.Record({
|
|
1028
|
+
confirmation_code: IDL.Text,
|
|
1029
|
+
expiration: Timestamp
|
|
1030
|
+
});
|
|
1031
|
+
const AuthnMethodRegisterError = IDL.Variant({
|
|
1032
|
+
RegistrationModeOff: IDL.Null,
|
|
1033
|
+
RegistrationAlreadyInProgress: IDL.Null,
|
|
1034
|
+
InvalidMetadata: IDL.Text
|
|
1035
|
+
});
|
|
1036
|
+
const AuthnMethodReplaceError = IDL.Variant({
|
|
1037
|
+
AuthnMethodNotFound: IDL.Null,
|
|
1038
|
+
InvalidMetadata: IDL.Text
|
|
1039
|
+
});
|
|
1040
|
+
const AuthnMethodSecuritySettingsReplaceError = IDL.Variant({
|
|
1041
|
+
AuthnMethodNotFound: IDL.Null
|
|
1042
|
+
});
|
|
1043
|
+
const CheckCaptchaArg = IDL.Record({ solution: IDL.Text });
|
|
1044
|
+
const RegistrationFlowNextStep = IDL.Variant({
|
|
1045
|
+
CheckCaptcha: IDL.Record({ captcha_png_base64: IDL.Text }),
|
|
1046
|
+
Finish: IDL.Null
|
|
1047
|
+
});
|
|
1048
|
+
const IdRegNextStepResult = IDL.Record({
|
|
1049
|
+
next_step: RegistrationFlowNextStep
|
|
1050
|
+
});
|
|
1051
|
+
const CheckCaptchaError = IDL.Variant({
|
|
1052
|
+
NoRegistrationFlow: IDL.Null,
|
|
1053
|
+
UnexpectedCall: IDL.Record({ next_step: RegistrationFlowNextStep }),
|
|
1054
|
+
WrongSolution: IDL.Record({ new_captcha_png_base64: IDL.Text })
|
|
1055
|
+
});
|
|
1056
|
+
const ChallengeKey = IDL.Text;
|
|
1057
|
+
const Challenge = IDL.Record({
|
|
1058
|
+
png_base64: IDL.Text,
|
|
1059
|
+
challenge_key: ChallengeKey
|
|
1060
|
+
});
|
|
1061
|
+
const DeployArchiveResult = IDL.Variant({
|
|
1062
|
+
creation_in_progress: IDL.Null,
|
|
1063
|
+
success: IDL.Principal,
|
|
1064
|
+
failed: IDL.Text
|
|
1065
|
+
});
|
|
1066
|
+
const BufferedArchiveEntry = IDL.Record({
|
|
1067
|
+
sequence_number: IDL.Nat64,
|
|
1068
|
+
entry: IDL.Vec(IDL.Nat8),
|
|
1069
|
+
anchor_number: UserNumber,
|
|
1070
|
+
timestamp: Timestamp
|
|
1071
|
+
});
|
|
1072
|
+
const WebAuthnCredential = IDL.Record({
|
|
1073
|
+
pubkey: PublicKey,
|
|
1074
|
+
credential_id: CredentialId
|
|
1075
|
+
});
|
|
1076
|
+
const AnchorCredentials = IDL.Record({
|
|
1077
|
+
recovery_phrases: IDL.Vec(PublicKey),
|
|
1078
|
+
credentials: IDL.Vec(WebAuthnCredential),
|
|
1079
|
+
recovery_credentials: IDL.Vec(WebAuthnCredential)
|
|
1080
|
+
});
|
|
1081
|
+
const DeviceWithUsage = IDL.Record({
|
|
1082
|
+
alias: IDL.Text,
|
|
1083
|
+
last_usage: IDL.Opt(Timestamp),
|
|
1084
|
+
metadata: IDL.Opt(MetadataMap),
|
|
1085
|
+
origin: IDL.Opt(IDL.Text),
|
|
1086
|
+
protection: DeviceProtection,
|
|
1087
|
+
pubkey: DeviceKey,
|
|
1088
|
+
key_type: KeyType,
|
|
1089
|
+
purpose: Purpose,
|
|
1090
|
+
credential_id: IDL.Opt(CredentialId)
|
|
1091
|
+
});
|
|
1092
|
+
const Aud = IDL.Text;
|
|
1093
|
+
const Iss = IDL.Text;
|
|
1094
|
+
const Sub = IDL.Text;
|
|
1095
|
+
const OpenIdCredential = IDL.Record({
|
|
1096
|
+
aud: Aud,
|
|
1097
|
+
iss: Iss,
|
|
1098
|
+
sub: Sub,
|
|
1099
|
+
metadata: MetadataMapV2,
|
|
1100
|
+
last_usage_timestamp: Timestamp
|
|
1101
|
+
});
|
|
1102
|
+
const DeviceRegistrationInfo = IDL.Record({
|
|
1103
|
+
tentative_device: IDL.Opt(DeviceData),
|
|
1104
|
+
expiration: Timestamp
|
|
1105
|
+
});
|
|
1106
|
+
const IdentityAnchorInfo = IDL.Record({
|
|
1107
|
+
devices: IDL.Vec(DeviceWithUsage),
|
|
1108
|
+
openid_credentials: IDL.Opt(IDL.Vec(OpenIdCredential)),
|
|
1109
|
+
device_registration: IDL.Opt(DeviceRegistrationInfo)
|
|
1110
|
+
});
|
|
1111
|
+
const FrontendHostname = IDL.Text;
|
|
1112
|
+
const SessionKey = PublicKey;
|
|
1113
|
+
const Delegation = IDL.Record({
|
|
1114
|
+
pubkey: PublicKey,
|
|
1115
|
+
targets: IDL.Opt(IDL.Vec(IDL.Principal)),
|
|
1116
|
+
expiration: Timestamp
|
|
1117
|
+
});
|
|
1118
|
+
const SignedDelegation = IDL.Record({
|
|
1119
|
+
signature: IDL.Vec(IDL.Nat8),
|
|
1120
|
+
delegation: Delegation
|
|
1121
|
+
});
|
|
1122
|
+
const GetDelegationResponse = IDL.Variant({
|
|
1123
|
+
no_such_delegation: IDL.Null,
|
|
1124
|
+
signed_delegation: SignedDelegation
|
|
1125
|
+
});
|
|
1126
|
+
const GetIdAliasRequest = IDL.Record({
|
|
1127
|
+
rp_id_alias_jwt: IDL.Text,
|
|
1128
|
+
issuer: FrontendHostname,
|
|
1129
|
+
issuer_id_alias_jwt: IDL.Text,
|
|
1130
|
+
relying_party: FrontendHostname,
|
|
1131
|
+
identity_number: IdentityNumber
|
|
1132
|
+
});
|
|
1133
|
+
const SignedIdAlias = IDL.Record({
|
|
1134
|
+
credential_jws: IDL.Text,
|
|
1135
|
+
id_alias: IDL.Principal,
|
|
1136
|
+
id_dapp: IDL.Principal
|
|
1137
|
+
});
|
|
1138
|
+
const IdAliasCredentials = IDL.Record({
|
|
1139
|
+
rp_id_alias_credential: SignedIdAlias,
|
|
1140
|
+
issuer_id_alias_credential: SignedIdAlias
|
|
1141
|
+
});
|
|
1142
|
+
const GetIdAliasError = IDL.Variant({
|
|
1143
|
+
InternalCanisterError: IDL.Text,
|
|
1144
|
+
Unauthorized: IDL.Principal,
|
|
1145
|
+
NoSuchCredentials: IDL.Text
|
|
1146
|
+
});
|
|
1147
|
+
const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
|
|
1148
|
+
const HttpRequest = IDL.Record({
|
|
1149
|
+
url: IDL.Text,
|
|
1150
|
+
method: IDL.Text,
|
|
1151
|
+
body: IDL.Vec(IDL.Nat8),
|
|
1152
|
+
headers: IDL.Vec(HeaderField),
|
|
1153
|
+
certificate_version: IDL.Opt(IDL.Nat16)
|
|
1154
|
+
});
|
|
1155
|
+
const Token = IDL.Record({});
|
|
1156
|
+
const StreamingCallbackHttpResponse = IDL.Record({
|
|
1157
|
+
token: IDL.Opt(Token),
|
|
1158
|
+
body: IDL.Vec(IDL.Nat8)
|
|
1159
|
+
});
|
|
1160
|
+
const StreamingStrategy = IDL.Variant({
|
|
1161
|
+
Callback: IDL.Record({
|
|
1162
|
+
token: Token,
|
|
1163
|
+
callback: IDL.Func(
|
|
1164
|
+
[Token],
|
|
1165
|
+
[StreamingCallbackHttpResponse],
|
|
1166
|
+
['query']
|
|
1167
|
+
)
|
|
1168
|
+
})
|
|
1169
|
+
});
|
|
1170
|
+
const HttpResponse = IDL.Record({
|
|
1171
|
+
body: IDL.Vec(IDL.Nat8),
|
|
1172
|
+
headers: IDL.Vec(HeaderField),
|
|
1173
|
+
upgrade: IDL.Opt(IDL.Bool),
|
|
1174
|
+
streaming_strategy: IDL.Opt(StreamingStrategy),
|
|
1175
|
+
status_code: IDL.Nat16
|
|
1176
|
+
});
|
|
1177
|
+
const IdentityAuthnInfo = IDL.Record({
|
|
1178
|
+
authn_methods: IDL.Vec(AuthnMethod),
|
|
1179
|
+
recovery_authn_methods: IDL.Vec(AuthnMethod)
|
|
1180
|
+
});
|
|
1181
|
+
const AuthnMethodRegistrationInfo = IDL.Record({
|
|
1182
|
+
expiration: Timestamp,
|
|
1183
|
+
authn_method: IDL.Opt(AuthnMethodData)
|
|
1184
|
+
});
|
|
1185
|
+
const IdentityInfo = IDL.Record({
|
|
1186
|
+
authn_methods: IDL.Vec(AuthnMethodData),
|
|
1187
|
+
metadata: MetadataMapV2,
|
|
1188
|
+
authn_method_registration: IDL.Opt(AuthnMethodRegistrationInfo),
|
|
1189
|
+
openid_credentials: IDL.Opt(IDL.Vec(OpenIdCredential))
|
|
1190
|
+
});
|
|
1191
|
+
const IdentityInfoError = IDL.Variant({
|
|
1192
|
+
InternalCanisterError: IDL.Text,
|
|
1193
|
+
Unauthorized: IDL.Principal
|
|
1194
|
+
});
|
|
1195
|
+
const IdentityMetadataReplaceError = IDL.Variant({
|
|
1196
|
+
InternalCanisterError: IDL.Text,
|
|
1197
|
+
Unauthorized: IDL.Principal,
|
|
1198
|
+
StorageSpaceExceeded: IDL.Record({
|
|
1199
|
+
space_required: IDL.Nat64,
|
|
1200
|
+
space_available: IDL.Nat64
|
|
1201
|
+
})
|
|
1202
|
+
});
|
|
1203
|
+
const IdRegFinishArg = IDL.Record({ authn_method: AuthnMethodData });
|
|
1204
|
+
const IdRegFinishResult = IDL.Record({ identity_number: IDL.Nat64 });
|
|
1205
|
+
const IdRegFinishError = IDL.Variant({
|
|
1206
|
+
NoRegistrationFlow: IDL.Null,
|
|
1207
|
+
UnexpectedCall: IDL.Record({ next_step: RegistrationFlowNextStep }),
|
|
1208
|
+
InvalidAuthnMethod: IDL.Text,
|
|
1209
|
+
IdentityLimitReached: IDL.Null,
|
|
1210
|
+
StorageError: IDL.Text
|
|
1211
|
+
});
|
|
1212
|
+
const IdRegStartError = IDL.Variant({
|
|
1213
|
+
InvalidCaller: IDL.Null,
|
|
1214
|
+
AlreadyInProgress: IDL.Null,
|
|
1215
|
+
RateLimitExceeded: IDL.Null
|
|
1216
|
+
});
|
|
1217
|
+
const JWT = IDL.Text;
|
|
1218
|
+
const Salt = IDL.Vec(IDL.Nat8);
|
|
1219
|
+
const OpenIdCredentialAddError = IDL.Variant({
|
|
1220
|
+
OpenIdCredentialAlreadyRegistered: IDL.Null,
|
|
1221
|
+
InternalCanisterError: IDL.Text,
|
|
1222
|
+
Unauthorized: IDL.Principal,
|
|
1223
|
+
JwtVerificationFailed: IDL.Null
|
|
1224
|
+
});
|
|
1225
|
+
const OpenIdCredentialKey = IDL.Tuple(Iss, Sub);
|
|
1226
|
+
const OpenIdCredentialRemoveError = IDL.Variant({
|
|
1227
|
+
InternalCanisterError: IDL.Text,
|
|
1228
|
+
OpenIdCredentialNotFound: IDL.Null,
|
|
1229
|
+
Unauthorized: IDL.Principal
|
|
1230
|
+
});
|
|
1231
|
+
const UserKey = PublicKey;
|
|
1232
|
+
const PrepareIdAliasRequest = IDL.Record({
|
|
1233
|
+
issuer: FrontendHostname,
|
|
1234
|
+
relying_party: FrontendHostname,
|
|
1235
|
+
identity_number: IdentityNumber
|
|
1236
|
+
});
|
|
1237
|
+
const PreparedIdAlias = IDL.Record({
|
|
1238
|
+
rp_id_alias_jwt: IDL.Text,
|
|
1239
|
+
issuer_id_alias_jwt: IDL.Text,
|
|
1240
|
+
canister_sig_pk_der: PublicKey
|
|
1241
|
+
});
|
|
1242
|
+
const PrepareIdAliasError = IDL.Variant({
|
|
1243
|
+
InternalCanisterError: IDL.Text,
|
|
1244
|
+
Unauthorized: IDL.Principal
|
|
1245
|
+
});
|
|
1246
|
+
const ChallengeResult = IDL.Record({
|
|
1247
|
+
key: ChallengeKey,
|
|
1248
|
+
chars: IDL.Text
|
|
1249
|
+
});
|
|
1250
|
+
const RegisterResponse = IDL.Variant({
|
|
1251
|
+
bad_challenge: IDL.Null,
|
|
1252
|
+
canister_full: IDL.Null,
|
|
1253
|
+
registered: IDL.Record({ user_number: UserNumber })
|
|
1254
|
+
});
|
|
1255
|
+
const ArchiveInfo = IDL.Record({
|
|
1256
|
+
archive_config: IDL.Opt(ArchiveConfig),
|
|
1257
|
+
archive_canister: IDL.Opt(IDL.Principal)
|
|
1258
|
+
});
|
|
1259
|
+
const InternetIdentityStats = IDL.Record({
|
|
1260
|
+
storage_layout_version: IDL.Nat8,
|
|
1261
|
+
users_registered: IDL.Nat64,
|
|
1262
|
+
assigned_user_number_range: IDL.Tuple(IDL.Nat64, IDL.Nat64),
|
|
1263
|
+
archive_info: ArchiveInfo,
|
|
1264
|
+
canister_creation_cycles_cost: IDL.Nat64,
|
|
1265
|
+
event_aggregations: IDL.Vec(
|
|
1266
|
+
IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat64)))
|
|
1267
|
+
)
|
|
1268
|
+
});
|
|
1269
|
+
const VerifyTentativeDeviceResponse = IDL.Variant({
|
|
1270
|
+
device_registration_mode_off: IDL.Null,
|
|
1271
|
+
verified: IDL.Null,
|
|
1272
|
+
wrong_code: IDL.Record({ retries_left: IDL.Nat8 }),
|
|
1273
|
+
no_device_to_verify: IDL.Null
|
|
1274
|
+
});
|
|
1275
|
+
return IDL.Service({
|
|
1276
|
+
acknowledge_entries: IDL.Func([IDL.Nat64], [], []),
|
|
1277
|
+
add: IDL.Func([UserNumber, DeviceData], [], []),
|
|
1278
|
+
add_tentative_device: IDL.Func(
|
|
1279
|
+
[UserNumber, DeviceData],
|
|
1280
|
+
[AddTentativeDeviceResponse],
|
|
1281
|
+
[]
|
|
1282
|
+
),
|
|
1283
|
+
authn_method_add: IDL.Func(
|
|
1284
|
+
[IdentityNumber, AuthnMethodData],
|
|
1285
|
+
[IDL.Variant({ Ok: IDL.Null, Err: AuthnMethodAddError })],
|
|
1286
|
+
[]
|
|
1287
|
+
),
|
|
1288
|
+
authn_method_confirm: IDL.Func(
|
|
1289
|
+
[IdentityNumber, IDL.Text],
|
|
1290
|
+
[
|
|
1291
|
+
IDL.Variant({
|
|
1292
|
+
Ok: IDL.Null,
|
|
1293
|
+
Err: AuthnMethodConfirmationError
|
|
1294
|
+
})
|
|
1295
|
+
],
|
|
1296
|
+
[]
|
|
1297
|
+
),
|
|
1298
|
+
authn_method_metadata_replace: IDL.Func(
|
|
1299
|
+
[IdentityNumber, PublicKey, MetadataMapV2],
|
|
1300
|
+
[
|
|
1301
|
+
IDL.Variant({
|
|
1302
|
+
Ok: IDL.Null,
|
|
1303
|
+
Err: AuthnMethodMetadataReplaceError
|
|
1304
|
+
})
|
|
1305
|
+
],
|
|
1306
|
+
[]
|
|
1307
|
+
),
|
|
1308
|
+
authn_method_register: IDL.Func(
|
|
1309
|
+
[IdentityNumber, AuthnMethodData],
|
|
1310
|
+
[
|
|
1311
|
+
IDL.Variant({
|
|
1312
|
+
Ok: AuthnMethodConfirmationCode,
|
|
1313
|
+
Err: AuthnMethodRegisterError
|
|
1314
|
+
})
|
|
1315
|
+
],
|
|
1316
|
+
[]
|
|
1317
|
+
),
|
|
1318
|
+
authn_method_registration_mode_enter: IDL.Func(
|
|
1319
|
+
[IdentityNumber],
|
|
1320
|
+
[
|
|
1321
|
+
IDL.Variant({
|
|
1322
|
+
Ok: IDL.Record({ expiration: Timestamp }),
|
|
1323
|
+
Err: IDL.Null
|
|
1324
|
+
})
|
|
1325
|
+
],
|
|
1326
|
+
[]
|
|
1327
|
+
),
|
|
1328
|
+
authn_method_registration_mode_exit: IDL.Func(
|
|
1329
|
+
[IdentityNumber],
|
|
1330
|
+
[IDL.Variant({ Ok: IDL.Null, Err: IDL.Null })],
|
|
1331
|
+
[]
|
|
1332
|
+
),
|
|
1333
|
+
authn_method_remove: IDL.Func(
|
|
1334
|
+
[IdentityNumber, PublicKey],
|
|
1335
|
+
[IDL.Variant({ Ok: IDL.Null, Err: IDL.Null })],
|
|
1336
|
+
[]
|
|
1337
|
+
),
|
|
1338
|
+
authn_method_replace: IDL.Func(
|
|
1339
|
+
[IdentityNumber, PublicKey, AuthnMethodData],
|
|
1340
|
+
[IDL.Variant({ Ok: IDL.Null, Err: AuthnMethodReplaceError })],
|
|
1341
|
+
[]
|
|
1342
|
+
),
|
|
1343
|
+
authn_method_security_settings_replace: IDL.Func(
|
|
1344
|
+
[IdentityNumber, PublicKey, AuthnMethodSecuritySettings],
|
|
1345
|
+
[
|
|
1346
|
+
IDL.Variant({
|
|
1347
|
+
Ok: IDL.Null,
|
|
1348
|
+
Err: AuthnMethodSecuritySettingsReplaceError
|
|
1349
|
+
})
|
|
1350
|
+
],
|
|
1351
|
+
[]
|
|
1352
|
+
),
|
|
1353
|
+
check_captcha: IDL.Func(
|
|
1354
|
+
[CheckCaptchaArg],
|
|
1355
|
+
[
|
|
1356
|
+
IDL.Variant({
|
|
1357
|
+
Ok: IdRegNextStepResult,
|
|
1358
|
+
Err: CheckCaptchaError
|
|
1359
|
+
})
|
|
1360
|
+
],
|
|
1361
|
+
[]
|
|
1362
|
+
),
|
|
1363
|
+
config: IDL.Func([], [InternetIdentityInit], ['query']),
|
|
1364
|
+
create_challenge: IDL.Func([], [Challenge], []),
|
|
1365
|
+
deploy_archive: IDL.Func(
|
|
1366
|
+
[IDL.Vec(IDL.Nat8)],
|
|
1367
|
+
[DeployArchiveResult],
|
|
1368
|
+
[]
|
|
1369
|
+
),
|
|
1370
|
+
enter_device_registration_mode: IDL.Func([UserNumber], [Timestamp], []),
|
|
1371
|
+
exit_device_registration_mode: IDL.Func([UserNumber], [], []),
|
|
1372
|
+
fetch_entries: IDL.Func([], [IDL.Vec(BufferedArchiveEntry)], []),
|
|
1373
|
+
get_anchor_credentials: IDL.Func(
|
|
1374
|
+
[UserNumber],
|
|
1375
|
+
[AnchorCredentials],
|
|
1376
|
+
['query']
|
|
1377
|
+
),
|
|
1378
|
+
get_anchor_info: IDL.Func([UserNumber], [IdentityAnchorInfo], []),
|
|
1379
|
+
get_delegation: IDL.Func(
|
|
1380
|
+
[UserNumber, FrontendHostname, SessionKey, Timestamp],
|
|
1381
|
+
[GetDelegationResponse],
|
|
1382
|
+
['query']
|
|
1383
|
+
),
|
|
1384
|
+
get_id_alias: IDL.Func(
|
|
1385
|
+
[GetIdAliasRequest],
|
|
1386
|
+
[IDL.Variant({ Ok: IdAliasCredentials, Err: GetIdAliasError })],
|
|
1387
|
+
['query']
|
|
1388
|
+
),
|
|
1389
|
+
get_principal: IDL.Func(
|
|
1390
|
+
[UserNumber, FrontendHostname],
|
|
1391
|
+
[IDL.Principal],
|
|
1392
|
+
['query']
|
|
1393
|
+
),
|
|
1394
|
+
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
1395
|
+
http_request_update: IDL.Func([HttpRequest], [HttpResponse], []),
|
|
1396
|
+
identity_authn_info: IDL.Func(
|
|
1397
|
+
[IdentityNumber],
|
|
1398
|
+
[IDL.Variant({ Ok: IdentityAuthnInfo, Err: IDL.Null })],
|
|
1399
|
+
['query']
|
|
1400
|
+
),
|
|
1401
|
+
identity_info: IDL.Func(
|
|
1402
|
+
[IdentityNumber],
|
|
1403
|
+
[IDL.Variant({ Ok: IdentityInfo, Err: IdentityInfoError })],
|
|
1404
|
+
[]
|
|
1405
|
+
),
|
|
1406
|
+
identity_metadata_replace: IDL.Func(
|
|
1407
|
+
[IdentityNumber, MetadataMapV2],
|
|
1408
|
+
[
|
|
1409
|
+
IDL.Variant({
|
|
1410
|
+
Ok: IDL.Null,
|
|
1411
|
+
Err: IdentityMetadataReplaceError
|
|
1412
|
+
})
|
|
1413
|
+
],
|
|
1414
|
+
[]
|
|
1415
|
+
),
|
|
1416
|
+
identity_registration_finish: IDL.Func(
|
|
1417
|
+
[IdRegFinishArg],
|
|
1418
|
+
[IDL.Variant({ Ok: IdRegFinishResult, Err: IdRegFinishError })],
|
|
1419
|
+
[]
|
|
1420
|
+
),
|
|
1421
|
+
identity_registration_start: IDL.Func(
|
|
1422
|
+
[],
|
|
1423
|
+
[IDL.Variant({ Ok: IdRegNextStepResult, Err: IdRegStartError })],
|
|
1424
|
+
[]
|
|
1425
|
+
),
|
|
1426
|
+
init_salt: IDL.Func([], [], []),
|
|
1427
|
+
lookup: IDL.Func([UserNumber], [IDL.Vec(DeviceData)], ['query']),
|
|
1428
|
+
openid_credential_add: IDL.Func(
|
|
1429
|
+
[IdentityNumber, JWT, Salt],
|
|
1430
|
+
[IDL.Variant({ Ok: IDL.Null, Err: OpenIdCredentialAddError })],
|
|
1431
|
+
[]
|
|
1432
|
+
),
|
|
1433
|
+
openid_credential_remove: IDL.Func(
|
|
1434
|
+
[IdentityNumber, OpenIdCredentialKey],
|
|
1435
|
+
[IDL.Variant({ Ok: IDL.Null, Err: OpenIdCredentialRemoveError })],
|
|
1436
|
+
[]
|
|
1437
|
+
),
|
|
1438
|
+
prepare_delegation: IDL.Func(
|
|
1439
|
+
[UserNumber, FrontendHostname, SessionKey, IDL.Opt(IDL.Nat64)],
|
|
1440
|
+
[UserKey, Timestamp],
|
|
1441
|
+
[]
|
|
1442
|
+
),
|
|
1443
|
+
prepare_id_alias: IDL.Func(
|
|
1444
|
+
[PrepareIdAliasRequest],
|
|
1445
|
+
[IDL.Variant({ Ok: PreparedIdAlias, Err: PrepareIdAliasError })],
|
|
1446
|
+
[]
|
|
1447
|
+
),
|
|
1448
|
+
register: IDL.Func(
|
|
1449
|
+
[DeviceData, ChallengeResult, IDL.Opt(IDL.Principal)],
|
|
1450
|
+
[RegisterResponse],
|
|
1451
|
+
[]
|
|
1452
|
+
),
|
|
1453
|
+
remove: IDL.Func([UserNumber, DeviceKey], [], []),
|
|
1454
|
+
replace: IDL.Func([UserNumber, DeviceKey, DeviceData], [], []),
|
|
1455
|
+
stats: IDL.Func([], [InternetIdentityStats], ['query']),
|
|
1456
|
+
update: IDL.Func([UserNumber, DeviceKey, DeviceData], [], []),
|
|
1457
|
+
verify_tentative_device: IDL.Func(
|
|
1458
|
+
[UserNumber, IDL.Text],
|
|
1459
|
+
[VerifyTentativeDeviceResponse],
|
|
1460
|
+
[]
|
|
1461
|
+
)
|
|
1462
|
+
});
|
|
1463
|
+
};
|
|
1464
|
+
export const init: init = ({ IDL }) => {
|
|
1465
|
+
const OpenIdConfig = IDL.Record({ client_id: IDL.Text });
|
|
1466
|
+
const ArchiveConfig = IDL.Record({
|
|
1467
|
+
polling_interval_ns: IDL.Nat64,
|
|
1468
|
+
entries_buffer_limit: IDL.Nat64,
|
|
1469
|
+
module_hash: IDL.Vec(IDL.Nat8),
|
|
1470
|
+
entries_fetch_limit: IDL.Nat16
|
|
1471
|
+
});
|
|
1472
|
+
const AnalyticsConfig = IDL.Variant({
|
|
1473
|
+
Plausible: IDL.Record({
|
|
1474
|
+
domain: IDL.Opt(IDL.Text),
|
|
1475
|
+
track_localhost: IDL.Opt(IDL.Bool),
|
|
1476
|
+
hash_mode: IDL.Opt(IDL.Bool),
|
|
1477
|
+
api_host: IDL.Opt(IDL.Text)
|
|
1478
|
+
})
|
|
1479
|
+
});
|
|
1480
|
+
const CaptchaConfig = IDL.Record({
|
|
1481
|
+
max_unsolved_captchas: IDL.Nat64,
|
|
1482
|
+
captcha_trigger: IDL.Variant({
|
|
1483
|
+
Dynamic: IDL.Record({
|
|
1484
|
+
reference_rate_sampling_interval_s: IDL.Nat64,
|
|
1485
|
+
threshold_pct: IDL.Nat16,
|
|
1486
|
+
current_rate_sampling_interval_s: IDL.Nat64
|
|
1487
|
+
}),
|
|
1488
|
+
Static: IDL.Variant({
|
|
1489
|
+
CaptchaDisabled: IDL.Null,
|
|
1490
|
+
CaptchaEnabled: IDL.Null
|
|
1491
|
+
})
|
|
1492
|
+
})
|
|
1493
|
+
});
|
|
1494
|
+
const RateLimitConfig = IDL.Record({
|
|
1495
|
+
max_tokens: IDL.Nat64,
|
|
1496
|
+
time_per_token_ns: IDL.Nat64
|
|
1497
|
+
});
|
|
1498
|
+
const InternetIdentityInit = IDL.Record({
|
|
1499
|
+
openid_google: IDL.Opt(IDL.Opt(OpenIdConfig)),
|
|
1500
|
+
assigned_user_number_range: IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
|
|
1501
|
+
archive_config: IDL.Opt(ArchiveConfig),
|
|
1502
|
+
canister_creation_cycles_cost: IDL.Opt(IDL.Nat64),
|
|
1503
|
+
analytics_config: IDL.Opt(IDL.Opt(AnalyticsConfig)),
|
|
1504
|
+
related_origins: IDL.Opt(IDL.Vec(IDL.Text)),
|
|
1505
|
+
captcha_config: IDL.Opt(CaptchaConfig),
|
|
1506
|
+
register_rate_limit: IDL.Opt(RateLimitConfig)
|
|
1507
|
+
});
|
|
1508
|
+
return [IDL.Opt(InternetIdentityInit)];
|
|
1509
|
+
};
|