@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,887 @@
|
|
|
1
|
+
import { ActorMethod } from '@dfinity/agent';
|
|
2
|
+
import { IDL } from '@dfinity/candid';
|
|
3
|
+
import { Principal } from '@dfinity/principal';
|
|
4
|
+
|
|
5
|
+
export interface AddWasmRequest {
|
|
6
|
+
hash: Uint8Array | number[];
|
|
7
|
+
wasm: [] | [SnsWasm];
|
|
8
|
+
}
|
|
9
|
+
export interface AddWasmResponse {
|
|
10
|
+
result: [] | [Result];
|
|
11
|
+
}
|
|
12
|
+
export interface AirdropDistribution {
|
|
13
|
+
airdrop_neurons: Array<NeuronDistribution>;
|
|
14
|
+
}
|
|
15
|
+
export interface Canister {
|
|
16
|
+
id: [] | [Principal];
|
|
17
|
+
}
|
|
18
|
+
export interface Countries {
|
|
19
|
+
iso_codes: Array<string>;
|
|
20
|
+
}
|
|
21
|
+
export interface DappCanisters {
|
|
22
|
+
canisters: Array<Canister>;
|
|
23
|
+
}
|
|
24
|
+
export interface DappCanistersTransferResult {
|
|
25
|
+
restored_dapp_canisters: Array<Canister>;
|
|
26
|
+
nns_controlled_dapp_canisters: Array<Canister>;
|
|
27
|
+
sns_controlled_dapp_canisters: Array<Canister>;
|
|
28
|
+
}
|
|
29
|
+
export interface DeployNewSnsRequest {
|
|
30
|
+
sns_init_payload: [] | [SnsInitPayload];
|
|
31
|
+
}
|
|
32
|
+
export interface DeployNewSnsResponse {
|
|
33
|
+
dapp_canisters_transfer_result: [] | [DappCanistersTransferResult];
|
|
34
|
+
subnet_id: [] | [Principal];
|
|
35
|
+
error: [] | [SnsWasmError];
|
|
36
|
+
canisters: [] | [SnsCanisterIds];
|
|
37
|
+
}
|
|
38
|
+
export interface DeployedSns {
|
|
39
|
+
root_canister_id: [] | [Principal];
|
|
40
|
+
governance_canister_id: [] | [Principal];
|
|
41
|
+
index_canister_id: [] | [Principal];
|
|
42
|
+
swap_canister_id: [] | [Principal];
|
|
43
|
+
ledger_canister_id: [] | [Principal];
|
|
44
|
+
}
|
|
45
|
+
export interface DeveloperDistribution {
|
|
46
|
+
developer_neurons: Array<NeuronDistribution>;
|
|
47
|
+
}
|
|
48
|
+
export interface FractionalDeveloperVotingPower {
|
|
49
|
+
treasury_distribution: [] | [TreasuryDistribution];
|
|
50
|
+
developer_distribution: [] | [DeveloperDistribution];
|
|
51
|
+
airdrop_distribution: [] | [AirdropDistribution];
|
|
52
|
+
swap_distribution: [] | [SwapDistribution];
|
|
53
|
+
}
|
|
54
|
+
export interface GetAllowedPrincipalsResponse {
|
|
55
|
+
allowed_principals: Array<Principal>;
|
|
56
|
+
}
|
|
57
|
+
export interface GetDeployedSnsByProposalIdRequest {
|
|
58
|
+
proposal_id: bigint;
|
|
59
|
+
}
|
|
60
|
+
export interface GetDeployedSnsByProposalIdResponse {
|
|
61
|
+
get_deployed_sns_by_proposal_id_result:
|
|
62
|
+
| []
|
|
63
|
+
| [GetDeployedSnsByProposalIdResult];
|
|
64
|
+
}
|
|
65
|
+
export type GetDeployedSnsByProposalIdResult =
|
|
66
|
+
| { Error: SnsWasmError }
|
|
67
|
+
| { DeployedSns: DeployedSns };
|
|
68
|
+
export interface GetNextSnsVersionRequest {
|
|
69
|
+
governance_canister_id: [] | [Principal];
|
|
70
|
+
current_version: [] | [SnsVersion];
|
|
71
|
+
}
|
|
72
|
+
export interface GetNextSnsVersionResponse {
|
|
73
|
+
next_version: [] | [SnsVersion];
|
|
74
|
+
}
|
|
75
|
+
export interface GetProposalIdThatAddedWasmRequest {
|
|
76
|
+
hash: Uint8Array | number[];
|
|
77
|
+
}
|
|
78
|
+
export interface GetProposalIdThatAddedWasmResponse {
|
|
79
|
+
proposal_id: [] | [bigint];
|
|
80
|
+
}
|
|
81
|
+
export interface GetSnsSubnetIdsResponse {
|
|
82
|
+
sns_subnet_ids: Array<Principal>;
|
|
83
|
+
}
|
|
84
|
+
export interface GetWasmMetadataRequest {
|
|
85
|
+
hash: [] | [Uint8Array | number[]];
|
|
86
|
+
}
|
|
87
|
+
export interface GetWasmMetadataResponse {
|
|
88
|
+
result: [] | [Result_1];
|
|
89
|
+
}
|
|
90
|
+
export interface GetWasmRequest {
|
|
91
|
+
hash: Uint8Array | number[];
|
|
92
|
+
}
|
|
93
|
+
export interface GetWasmResponse {
|
|
94
|
+
wasm: [] | [SnsWasm];
|
|
95
|
+
}
|
|
96
|
+
export interface IdealMatchedParticipationFunction {
|
|
97
|
+
serialized_representation: [] | [string];
|
|
98
|
+
}
|
|
99
|
+
export type InitialTokenDistribution = {
|
|
100
|
+
FractionalDeveloperVotingPower: FractionalDeveloperVotingPower;
|
|
101
|
+
};
|
|
102
|
+
export interface InsertUpgradePathEntriesRequest {
|
|
103
|
+
upgrade_path: Array<SnsUpgrade>;
|
|
104
|
+
sns_governance_canister_id: [] | [Principal];
|
|
105
|
+
}
|
|
106
|
+
export interface InsertUpgradePathEntriesResponse {
|
|
107
|
+
error: [] | [SnsWasmError];
|
|
108
|
+
}
|
|
109
|
+
export interface LinearScalingCoefficient {
|
|
110
|
+
slope_numerator: [] | [bigint];
|
|
111
|
+
intercept_icp_e8s: [] | [bigint];
|
|
112
|
+
from_direct_participation_icp_e8s: [] | [bigint];
|
|
113
|
+
slope_denominator: [] | [bigint];
|
|
114
|
+
to_direct_participation_icp_e8s: [] | [bigint];
|
|
115
|
+
}
|
|
116
|
+
export interface ListDeployedSnsesResponse {
|
|
117
|
+
instances: Array<DeployedSns>;
|
|
118
|
+
}
|
|
119
|
+
export interface ListUpgradeStep {
|
|
120
|
+
pretty_version: [] | [PrettySnsVersion];
|
|
121
|
+
version: [] | [SnsVersion];
|
|
122
|
+
}
|
|
123
|
+
export interface ListUpgradeStepsRequest {
|
|
124
|
+
limit: number;
|
|
125
|
+
starting_at: [] | [SnsVersion];
|
|
126
|
+
sns_governance_canister_id: [] | [Principal];
|
|
127
|
+
}
|
|
128
|
+
export interface ListUpgradeStepsResponse {
|
|
129
|
+
steps: Array<ListUpgradeStep>;
|
|
130
|
+
}
|
|
131
|
+
export interface MetadataSection {
|
|
132
|
+
contents: [] | [Uint8Array | number[]];
|
|
133
|
+
name: [] | [string];
|
|
134
|
+
visibility: [] | [string];
|
|
135
|
+
}
|
|
136
|
+
export interface NeuronBasketConstructionParameters {
|
|
137
|
+
dissolve_delay_interval_seconds: bigint;
|
|
138
|
+
count: bigint;
|
|
139
|
+
}
|
|
140
|
+
export interface NeuronDistribution {
|
|
141
|
+
controller: [] | [Principal];
|
|
142
|
+
dissolve_delay_seconds: bigint;
|
|
143
|
+
memo: bigint;
|
|
144
|
+
stake_e8s: bigint;
|
|
145
|
+
vesting_period_seconds: [] | [bigint];
|
|
146
|
+
}
|
|
147
|
+
export interface NeuronsFundParticipationConstraints {
|
|
148
|
+
coefficient_intervals: Array<LinearScalingCoefficient>;
|
|
149
|
+
max_neurons_fund_participation_icp_e8s: [] | [bigint];
|
|
150
|
+
min_direct_participation_threshold_icp_e8s: [] | [bigint];
|
|
151
|
+
ideal_matched_participation_function:
|
|
152
|
+
| []
|
|
153
|
+
| [IdealMatchedParticipationFunction];
|
|
154
|
+
}
|
|
155
|
+
export interface Ok {
|
|
156
|
+
sections: Array<MetadataSection>;
|
|
157
|
+
}
|
|
158
|
+
export interface PrettySnsVersion {
|
|
159
|
+
archive_wasm_hash: string;
|
|
160
|
+
root_wasm_hash: string;
|
|
161
|
+
swap_wasm_hash: string;
|
|
162
|
+
ledger_wasm_hash: string;
|
|
163
|
+
governance_wasm_hash: string;
|
|
164
|
+
index_wasm_hash: string;
|
|
165
|
+
}
|
|
166
|
+
export type Result = { Error: SnsWasmError } | { Hash: Uint8Array | number[] };
|
|
167
|
+
export type Result_1 = { Ok: Ok } | { Error: SnsWasmError };
|
|
168
|
+
export interface SnsCanisterIds {
|
|
169
|
+
root: [] | [Principal];
|
|
170
|
+
swap: [] | [Principal];
|
|
171
|
+
ledger: [] | [Principal];
|
|
172
|
+
index: [] | [Principal];
|
|
173
|
+
governance: [] | [Principal];
|
|
174
|
+
}
|
|
175
|
+
export interface SnsInitPayload {
|
|
176
|
+
url: [] | [string];
|
|
177
|
+
max_dissolve_delay_seconds: [] | [bigint];
|
|
178
|
+
max_dissolve_delay_bonus_percentage: [] | [bigint];
|
|
179
|
+
nns_proposal_id: [] | [bigint];
|
|
180
|
+
neurons_fund_participation: [] | [boolean];
|
|
181
|
+
min_participant_icp_e8s: [] | [bigint];
|
|
182
|
+
neuron_basket_construction_parameters:
|
|
183
|
+
| []
|
|
184
|
+
| [NeuronBasketConstructionParameters];
|
|
185
|
+
fallback_controller_principal_ids: Array<string>;
|
|
186
|
+
token_symbol: [] | [string];
|
|
187
|
+
final_reward_rate_basis_points: [] | [bigint];
|
|
188
|
+
max_icp_e8s: [] | [bigint];
|
|
189
|
+
neuron_minimum_stake_e8s: [] | [bigint];
|
|
190
|
+
confirmation_text: [] | [string];
|
|
191
|
+
logo: [] | [string];
|
|
192
|
+
name: [] | [string];
|
|
193
|
+
swap_start_timestamp_seconds: [] | [bigint];
|
|
194
|
+
swap_due_timestamp_seconds: [] | [bigint];
|
|
195
|
+
initial_voting_period_seconds: [] | [bigint];
|
|
196
|
+
neuron_minimum_dissolve_delay_to_vote_seconds: [] | [bigint];
|
|
197
|
+
description: [] | [string];
|
|
198
|
+
max_neuron_age_seconds_for_age_bonus: [] | [bigint];
|
|
199
|
+
min_participants: [] | [bigint];
|
|
200
|
+
initial_reward_rate_basis_points: [] | [bigint];
|
|
201
|
+
wait_for_quiet_deadline_increase_seconds: [] | [bigint];
|
|
202
|
+
transaction_fee_e8s: [] | [bigint];
|
|
203
|
+
dapp_canisters: [] | [DappCanisters];
|
|
204
|
+
neurons_fund_participation_constraints:
|
|
205
|
+
| []
|
|
206
|
+
| [NeuronsFundParticipationConstraints];
|
|
207
|
+
max_age_bonus_percentage: [] | [bigint];
|
|
208
|
+
initial_token_distribution: [] | [InitialTokenDistribution];
|
|
209
|
+
reward_rate_transition_duration_seconds: [] | [bigint];
|
|
210
|
+
token_logo: [] | [string];
|
|
211
|
+
token_name: [] | [string];
|
|
212
|
+
max_participant_icp_e8s: [] | [bigint];
|
|
213
|
+
min_direct_participation_icp_e8s: [] | [bigint];
|
|
214
|
+
proposal_reject_cost_e8s: [] | [bigint];
|
|
215
|
+
restricted_countries: [] | [Countries];
|
|
216
|
+
min_icp_e8s: [] | [bigint];
|
|
217
|
+
max_direct_participation_icp_e8s: [] | [bigint];
|
|
218
|
+
}
|
|
219
|
+
export interface SnsUpgrade {
|
|
220
|
+
next_version: [] | [SnsVersion];
|
|
221
|
+
current_version: [] | [SnsVersion];
|
|
222
|
+
}
|
|
223
|
+
export interface SnsVersion {
|
|
224
|
+
archive_wasm_hash: Uint8Array | number[];
|
|
225
|
+
root_wasm_hash: Uint8Array | number[];
|
|
226
|
+
swap_wasm_hash: Uint8Array | number[];
|
|
227
|
+
ledger_wasm_hash: Uint8Array | number[];
|
|
228
|
+
governance_wasm_hash: Uint8Array | number[];
|
|
229
|
+
index_wasm_hash: Uint8Array | number[];
|
|
230
|
+
}
|
|
231
|
+
export interface SnsWasm {
|
|
232
|
+
wasm: Uint8Array | number[];
|
|
233
|
+
proposal_id: [] | [bigint];
|
|
234
|
+
canister_type: number;
|
|
235
|
+
}
|
|
236
|
+
export interface SnsWasmCanisterInitPayload {
|
|
237
|
+
allowed_principals: Array<Principal>;
|
|
238
|
+
access_controls_enabled: boolean;
|
|
239
|
+
sns_subnet_ids: Array<Principal>;
|
|
240
|
+
}
|
|
241
|
+
export interface SnsWasmError {
|
|
242
|
+
message: string;
|
|
243
|
+
}
|
|
244
|
+
export interface SwapDistribution {
|
|
245
|
+
total_e8s: bigint;
|
|
246
|
+
initial_swap_amount_e8s: bigint;
|
|
247
|
+
}
|
|
248
|
+
export interface TreasuryDistribution {
|
|
249
|
+
total_e8s: bigint;
|
|
250
|
+
}
|
|
251
|
+
export interface UpdateAllowedPrincipalsRequest {
|
|
252
|
+
added_principals: Array<Principal>;
|
|
253
|
+
removed_principals: Array<Principal>;
|
|
254
|
+
}
|
|
255
|
+
export interface UpdateAllowedPrincipalsResponse {
|
|
256
|
+
update_allowed_principals_result: [] | [UpdateAllowedPrincipalsResult];
|
|
257
|
+
}
|
|
258
|
+
export type UpdateAllowedPrincipalsResult =
|
|
259
|
+
| { Error: SnsWasmError }
|
|
260
|
+
| { AllowedPrincipals: GetAllowedPrincipalsResponse };
|
|
261
|
+
export interface UpdateSnsSubnetListRequest {
|
|
262
|
+
sns_subnet_ids_to_add: Array<Principal>;
|
|
263
|
+
sns_subnet_ids_to_remove: Array<Principal>;
|
|
264
|
+
}
|
|
265
|
+
export interface UpdateSnsSubnetListResponse {
|
|
266
|
+
error: [] | [SnsWasmError];
|
|
267
|
+
}
|
|
268
|
+
export interface _SERVICE {
|
|
269
|
+
add_wasm: ActorMethod<[AddWasmRequest], AddWasmResponse>;
|
|
270
|
+
deploy_new_sns: ActorMethod<[DeployNewSnsRequest], DeployNewSnsResponse>;
|
|
271
|
+
get_allowed_principals: ActorMethod<[{}], GetAllowedPrincipalsResponse>;
|
|
272
|
+
get_deployed_sns_by_proposal_id: ActorMethod<
|
|
273
|
+
[GetDeployedSnsByProposalIdRequest],
|
|
274
|
+
GetDeployedSnsByProposalIdResponse
|
|
275
|
+
>;
|
|
276
|
+
get_latest_sns_version_pretty: ActorMethod<[null], Array<[string, string]>>;
|
|
277
|
+
get_next_sns_version: ActorMethod<
|
|
278
|
+
[GetNextSnsVersionRequest],
|
|
279
|
+
GetNextSnsVersionResponse
|
|
280
|
+
>;
|
|
281
|
+
get_proposal_id_that_added_wasm: ActorMethod<
|
|
282
|
+
[GetProposalIdThatAddedWasmRequest],
|
|
283
|
+
GetProposalIdThatAddedWasmResponse
|
|
284
|
+
>;
|
|
285
|
+
get_sns_subnet_ids: ActorMethod<[{}], GetSnsSubnetIdsResponse>;
|
|
286
|
+
get_wasm: ActorMethod<[GetWasmRequest], GetWasmResponse>;
|
|
287
|
+
get_wasm_metadata: ActorMethod<
|
|
288
|
+
[GetWasmMetadataRequest],
|
|
289
|
+
GetWasmMetadataResponse
|
|
290
|
+
>;
|
|
291
|
+
insert_upgrade_path_entries: ActorMethod<
|
|
292
|
+
[InsertUpgradePathEntriesRequest],
|
|
293
|
+
InsertUpgradePathEntriesResponse
|
|
294
|
+
>;
|
|
295
|
+
list_deployed_snses: ActorMethod<[{}], ListDeployedSnsesResponse>;
|
|
296
|
+
list_upgrade_steps: ActorMethod<
|
|
297
|
+
[ListUpgradeStepsRequest],
|
|
298
|
+
ListUpgradeStepsResponse
|
|
299
|
+
>;
|
|
300
|
+
update_allowed_principals: ActorMethod<
|
|
301
|
+
[UpdateAllowedPrincipalsRequest],
|
|
302
|
+
UpdateAllowedPrincipalsResponse
|
|
303
|
+
>;
|
|
304
|
+
update_sns_subnet_list: ActorMethod<
|
|
305
|
+
[UpdateSnsSubnetListRequest],
|
|
306
|
+
UpdateSnsSubnetListResponse
|
|
307
|
+
>;
|
|
308
|
+
}
|
|
309
|
+
export type idlFactory = IDL.InterfaceFactory;
|
|
310
|
+
export type init = (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
311
|
+
export const SnsWasmCanisterInitPayload = IDL.Record({
|
|
312
|
+
allowed_principals: IDL.Vec(IDL.Principal),
|
|
313
|
+
access_controls_enabled: IDL.Bool,
|
|
314
|
+
sns_subnet_ids: IDL.Vec(IDL.Principal)
|
|
315
|
+
});
|
|
316
|
+
export const SnsWasm = IDL.Record({
|
|
317
|
+
wasm: IDL.Vec(IDL.Nat8),
|
|
318
|
+
proposal_id: IDL.Opt(IDL.Nat64),
|
|
319
|
+
canister_type: IDL.Int32
|
|
320
|
+
});
|
|
321
|
+
export const AddWasmRequest = IDL.Record({
|
|
322
|
+
hash: IDL.Vec(IDL.Nat8),
|
|
323
|
+
wasm: IDL.Opt(SnsWasm)
|
|
324
|
+
});
|
|
325
|
+
export const SnsWasmError = IDL.Record({ message: IDL.Text });
|
|
326
|
+
export const Result = IDL.Variant({
|
|
327
|
+
Error: SnsWasmError,
|
|
328
|
+
Hash: IDL.Vec(IDL.Nat8)
|
|
329
|
+
});
|
|
330
|
+
export const AddWasmResponse = IDL.Record({ result: IDL.Opt(Result) });
|
|
331
|
+
export const NeuronBasketConstructionParameters = IDL.Record({
|
|
332
|
+
dissolve_delay_interval_seconds: IDL.Nat64,
|
|
333
|
+
count: IDL.Nat64
|
|
334
|
+
});
|
|
335
|
+
export const Canister = IDL.Record({ id: IDL.Opt(IDL.Principal) });
|
|
336
|
+
export const DappCanisters = IDL.Record({ canisters: IDL.Vec(Canister) });
|
|
337
|
+
export const LinearScalingCoefficient = IDL.Record({
|
|
338
|
+
slope_numerator: IDL.Opt(IDL.Nat64),
|
|
339
|
+
intercept_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
340
|
+
from_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
341
|
+
slope_denominator: IDL.Opt(IDL.Nat64),
|
|
342
|
+
to_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
|
|
343
|
+
});
|
|
344
|
+
export const IdealMatchedParticipationFunction = IDL.Record({
|
|
345
|
+
serialized_representation: IDL.Opt(IDL.Text)
|
|
346
|
+
});
|
|
347
|
+
export const NeuronsFundParticipationConstraints = IDL.Record({
|
|
348
|
+
coefficient_intervals: IDL.Vec(LinearScalingCoefficient),
|
|
349
|
+
max_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
350
|
+
min_direct_participation_threshold_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
351
|
+
ideal_matched_participation_function: IDL.Opt(
|
|
352
|
+
IdealMatchedParticipationFunction
|
|
353
|
+
)
|
|
354
|
+
});
|
|
355
|
+
export const TreasuryDistribution = IDL.Record({ total_e8s: IDL.Nat64 });
|
|
356
|
+
export const NeuronDistribution = IDL.Record({
|
|
357
|
+
controller: IDL.Opt(IDL.Principal),
|
|
358
|
+
dissolve_delay_seconds: IDL.Nat64,
|
|
359
|
+
memo: IDL.Nat64,
|
|
360
|
+
stake_e8s: IDL.Nat64,
|
|
361
|
+
vesting_period_seconds: IDL.Opt(IDL.Nat64)
|
|
362
|
+
});
|
|
363
|
+
export const DeveloperDistribution = IDL.Record({
|
|
364
|
+
developer_neurons: IDL.Vec(NeuronDistribution)
|
|
365
|
+
});
|
|
366
|
+
export const AirdropDistribution = IDL.Record({
|
|
367
|
+
airdrop_neurons: IDL.Vec(NeuronDistribution)
|
|
368
|
+
});
|
|
369
|
+
export const SwapDistribution = IDL.Record({
|
|
370
|
+
total_e8s: IDL.Nat64,
|
|
371
|
+
initial_swap_amount_e8s: IDL.Nat64
|
|
372
|
+
});
|
|
373
|
+
export const FractionalDeveloperVotingPower = IDL.Record({
|
|
374
|
+
treasury_distribution: IDL.Opt(TreasuryDistribution),
|
|
375
|
+
developer_distribution: IDL.Opt(DeveloperDistribution),
|
|
376
|
+
airdrop_distribution: IDL.Opt(AirdropDistribution),
|
|
377
|
+
swap_distribution: IDL.Opt(SwapDistribution)
|
|
378
|
+
});
|
|
379
|
+
export const InitialTokenDistribution = IDL.Variant({
|
|
380
|
+
FractionalDeveloperVotingPower: FractionalDeveloperVotingPower
|
|
381
|
+
});
|
|
382
|
+
export const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
|
|
383
|
+
export const SnsInitPayload = IDL.Record({
|
|
384
|
+
url: IDL.Opt(IDL.Text),
|
|
385
|
+
max_dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
|
|
386
|
+
max_dissolve_delay_bonus_percentage: IDL.Opt(IDL.Nat64),
|
|
387
|
+
nns_proposal_id: IDL.Opt(IDL.Nat64),
|
|
388
|
+
neurons_fund_participation: IDL.Opt(IDL.Bool),
|
|
389
|
+
min_participant_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
390
|
+
neuron_basket_construction_parameters: IDL.Opt(
|
|
391
|
+
NeuronBasketConstructionParameters
|
|
392
|
+
),
|
|
393
|
+
fallback_controller_principal_ids: IDL.Vec(IDL.Text),
|
|
394
|
+
token_symbol: IDL.Opt(IDL.Text),
|
|
395
|
+
final_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
|
|
396
|
+
max_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
397
|
+
neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
|
|
398
|
+
confirmation_text: IDL.Opt(IDL.Text),
|
|
399
|
+
logo: IDL.Opt(IDL.Text),
|
|
400
|
+
name: IDL.Opt(IDL.Text),
|
|
401
|
+
swap_start_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
402
|
+
swap_due_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
403
|
+
initial_voting_period_seconds: IDL.Opt(IDL.Nat64),
|
|
404
|
+
neuron_minimum_dissolve_delay_to_vote_seconds: IDL.Opt(IDL.Nat64),
|
|
405
|
+
description: IDL.Opt(IDL.Text),
|
|
406
|
+
max_neuron_age_seconds_for_age_bonus: IDL.Opt(IDL.Nat64),
|
|
407
|
+
min_participants: IDL.Opt(IDL.Nat64),
|
|
408
|
+
initial_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
|
|
409
|
+
wait_for_quiet_deadline_increase_seconds: IDL.Opt(IDL.Nat64),
|
|
410
|
+
transaction_fee_e8s: IDL.Opt(IDL.Nat64),
|
|
411
|
+
dapp_canisters: IDL.Opt(DappCanisters),
|
|
412
|
+
neurons_fund_participation_constraints: IDL.Opt(
|
|
413
|
+
NeuronsFundParticipationConstraints
|
|
414
|
+
),
|
|
415
|
+
max_age_bonus_percentage: IDL.Opt(IDL.Nat64),
|
|
416
|
+
initial_token_distribution: IDL.Opt(InitialTokenDistribution),
|
|
417
|
+
reward_rate_transition_duration_seconds: IDL.Opt(IDL.Nat64),
|
|
418
|
+
token_logo: IDL.Opt(IDL.Text),
|
|
419
|
+
token_name: IDL.Opt(IDL.Text),
|
|
420
|
+
max_participant_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
421
|
+
min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
422
|
+
proposal_reject_cost_e8s: IDL.Opt(IDL.Nat64),
|
|
423
|
+
restricted_countries: IDL.Opt(Countries),
|
|
424
|
+
min_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
425
|
+
max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
|
|
426
|
+
});
|
|
427
|
+
export const DeployNewSnsRequest = IDL.Record({
|
|
428
|
+
sns_init_payload: IDL.Opt(SnsInitPayload)
|
|
429
|
+
});
|
|
430
|
+
export const DappCanistersTransferResult = IDL.Record({
|
|
431
|
+
restored_dapp_canisters: IDL.Vec(Canister),
|
|
432
|
+
nns_controlled_dapp_canisters: IDL.Vec(Canister),
|
|
433
|
+
sns_controlled_dapp_canisters: IDL.Vec(Canister)
|
|
434
|
+
});
|
|
435
|
+
export const SnsCanisterIds = IDL.Record({
|
|
436
|
+
root: IDL.Opt(IDL.Principal),
|
|
437
|
+
swap: IDL.Opt(IDL.Principal),
|
|
438
|
+
ledger: IDL.Opt(IDL.Principal),
|
|
439
|
+
index: IDL.Opt(IDL.Principal),
|
|
440
|
+
governance: IDL.Opt(IDL.Principal)
|
|
441
|
+
});
|
|
442
|
+
export const DeployNewSnsResponse = IDL.Record({
|
|
443
|
+
dapp_canisters_transfer_result: IDL.Opt(DappCanistersTransferResult),
|
|
444
|
+
subnet_id: IDL.Opt(IDL.Principal),
|
|
445
|
+
error: IDL.Opt(SnsWasmError),
|
|
446
|
+
canisters: IDL.Opt(SnsCanisterIds)
|
|
447
|
+
});
|
|
448
|
+
export const GetAllowedPrincipalsResponse = IDL.Record({
|
|
449
|
+
allowed_principals: IDL.Vec(IDL.Principal)
|
|
450
|
+
});
|
|
451
|
+
export const GetDeployedSnsByProposalIdRequest = IDL.Record({
|
|
452
|
+
proposal_id: IDL.Nat64
|
|
453
|
+
});
|
|
454
|
+
export const DeployedSns = IDL.Record({
|
|
455
|
+
root_canister_id: IDL.Opt(IDL.Principal),
|
|
456
|
+
governance_canister_id: IDL.Opt(IDL.Principal),
|
|
457
|
+
index_canister_id: IDL.Opt(IDL.Principal),
|
|
458
|
+
swap_canister_id: IDL.Opt(IDL.Principal),
|
|
459
|
+
ledger_canister_id: IDL.Opt(IDL.Principal)
|
|
460
|
+
});
|
|
461
|
+
export const GetDeployedSnsByProposalIdResult = IDL.Variant({
|
|
462
|
+
Error: SnsWasmError,
|
|
463
|
+
DeployedSns: DeployedSns
|
|
464
|
+
});
|
|
465
|
+
export const GetDeployedSnsByProposalIdResponse = IDL.Record({
|
|
466
|
+
get_deployed_sns_by_proposal_id_result: IDL.Opt(
|
|
467
|
+
GetDeployedSnsByProposalIdResult
|
|
468
|
+
)
|
|
469
|
+
});
|
|
470
|
+
export const SnsVersion = IDL.Record({
|
|
471
|
+
archive_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
472
|
+
root_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
473
|
+
swap_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
474
|
+
ledger_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
475
|
+
governance_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
476
|
+
index_wasm_hash: IDL.Vec(IDL.Nat8)
|
|
477
|
+
});
|
|
478
|
+
export const GetNextSnsVersionRequest = IDL.Record({
|
|
479
|
+
governance_canister_id: IDL.Opt(IDL.Principal),
|
|
480
|
+
current_version: IDL.Opt(SnsVersion)
|
|
481
|
+
});
|
|
482
|
+
export const GetNextSnsVersionResponse = IDL.Record({
|
|
483
|
+
next_version: IDL.Opt(SnsVersion)
|
|
484
|
+
});
|
|
485
|
+
export const GetProposalIdThatAddedWasmRequest = IDL.Record({
|
|
486
|
+
hash: IDL.Vec(IDL.Nat8)
|
|
487
|
+
});
|
|
488
|
+
export const GetProposalIdThatAddedWasmResponse = IDL.Record({
|
|
489
|
+
proposal_id: IDL.Opt(IDL.Nat64)
|
|
490
|
+
});
|
|
491
|
+
export const GetSnsSubnetIdsResponse = IDL.Record({
|
|
492
|
+
sns_subnet_ids: IDL.Vec(IDL.Principal)
|
|
493
|
+
});
|
|
494
|
+
export const GetWasmRequest = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
|
|
495
|
+
export const GetWasmResponse = IDL.Record({ wasm: IDL.Opt(SnsWasm) });
|
|
496
|
+
export const GetWasmMetadataRequest = IDL.Record({
|
|
497
|
+
hash: IDL.Opt(IDL.Vec(IDL.Nat8))
|
|
498
|
+
});
|
|
499
|
+
export const MetadataSection = IDL.Record({
|
|
500
|
+
contents: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
501
|
+
name: IDL.Opt(IDL.Text),
|
|
502
|
+
visibility: IDL.Opt(IDL.Text)
|
|
503
|
+
});
|
|
504
|
+
export const Ok = IDL.Record({ sections: IDL.Vec(MetadataSection) });
|
|
505
|
+
export const Result_1 = IDL.Variant({ Ok: Ok, Error: SnsWasmError });
|
|
506
|
+
export const GetWasmMetadataResponse = IDL.Record({
|
|
507
|
+
result: IDL.Opt(Result_1)
|
|
508
|
+
});
|
|
509
|
+
export const SnsUpgrade = IDL.Record({
|
|
510
|
+
next_version: IDL.Opt(SnsVersion),
|
|
511
|
+
current_version: IDL.Opt(SnsVersion)
|
|
512
|
+
});
|
|
513
|
+
export const InsertUpgradePathEntriesRequest = IDL.Record({
|
|
514
|
+
upgrade_path: IDL.Vec(SnsUpgrade),
|
|
515
|
+
sns_governance_canister_id: IDL.Opt(IDL.Principal)
|
|
516
|
+
});
|
|
517
|
+
export const InsertUpgradePathEntriesResponse = IDL.Record({
|
|
518
|
+
error: IDL.Opt(SnsWasmError)
|
|
519
|
+
});
|
|
520
|
+
export const ListDeployedSnsesResponse = IDL.Record({
|
|
521
|
+
instances: IDL.Vec(DeployedSns)
|
|
522
|
+
});
|
|
523
|
+
export const ListUpgradeStepsRequest = IDL.Record({
|
|
524
|
+
limit: IDL.Nat32,
|
|
525
|
+
starting_at: IDL.Opt(SnsVersion),
|
|
526
|
+
sns_governance_canister_id: IDL.Opt(IDL.Principal)
|
|
527
|
+
});
|
|
528
|
+
export const PrettySnsVersion = IDL.Record({
|
|
529
|
+
archive_wasm_hash: IDL.Text,
|
|
530
|
+
root_wasm_hash: IDL.Text,
|
|
531
|
+
swap_wasm_hash: IDL.Text,
|
|
532
|
+
ledger_wasm_hash: IDL.Text,
|
|
533
|
+
governance_wasm_hash: IDL.Text,
|
|
534
|
+
index_wasm_hash: IDL.Text
|
|
535
|
+
});
|
|
536
|
+
export const ListUpgradeStep = IDL.Record({
|
|
537
|
+
pretty_version: IDL.Opt(PrettySnsVersion),
|
|
538
|
+
version: IDL.Opt(SnsVersion)
|
|
539
|
+
});
|
|
540
|
+
export const ListUpgradeStepsResponse = IDL.Record({
|
|
541
|
+
steps: IDL.Vec(ListUpgradeStep)
|
|
542
|
+
});
|
|
543
|
+
export const UpdateAllowedPrincipalsRequest = IDL.Record({
|
|
544
|
+
added_principals: IDL.Vec(IDL.Principal),
|
|
545
|
+
removed_principals: IDL.Vec(IDL.Principal)
|
|
546
|
+
});
|
|
547
|
+
export const UpdateAllowedPrincipalsResult = IDL.Variant({
|
|
548
|
+
Error: SnsWasmError,
|
|
549
|
+
AllowedPrincipals: GetAllowedPrincipalsResponse
|
|
550
|
+
});
|
|
551
|
+
export const UpdateAllowedPrincipalsResponse = IDL.Record({
|
|
552
|
+
update_allowed_principals_result: IDL.Opt(UpdateAllowedPrincipalsResult)
|
|
553
|
+
});
|
|
554
|
+
export const UpdateSnsSubnetListRequest = IDL.Record({
|
|
555
|
+
sns_subnet_ids_to_add: IDL.Vec(IDL.Principal),
|
|
556
|
+
sns_subnet_ids_to_remove: IDL.Vec(IDL.Principal)
|
|
557
|
+
});
|
|
558
|
+
export const UpdateSnsSubnetListResponse = IDL.Record({
|
|
559
|
+
error: IDL.Opt(SnsWasmError)
|
|
560
|
+
});
|
|
561
|
+
export const idlFactory: idlFactory = ({ IDL }) => {
|
|
562
|
+
const SnsWasmCanisterInitPayload = IDL.Record({
|
|
563
|
+
allowed_principals: IDL.Vec(IDL.Principal),
|
|
564
|
+
access_controls_enabled: IDL.Bool,
|
|
565
|
+
sns_subnet_ids: IDL.Vec(IDL.Principal)
|
|
566
|
+
});
|
|
567
|
+
const SnsWasm = IDL.Record({
|
|
568
|
+
wasm: IDL.Vec(IDL.Nat8),
|
|
569
|
+
proposal_id: IDL.Opt(IDL.Nat64),
|
|
570
|
+
canister_type: IDL.Int32
|
|
571
|
+
});
|
|
572
|
+
const AddWasmRequest = IDL.Record({
|
|
573
|
+
hash: IDL.Vec(IDL.Nat8),
|
|
574
|
+
wasm: IDL.Opt(SnsWasm)
|
|
575
|
+
});
|
|
576
|
+
const SnsWasmError = IDL.Record({ message: IDL.Text });
|
|
577
|
+
const Result = IDL.Variant({
|
|
578
|
+
Error: SnsWasmError,
|
|
579
|
+
Hash: IDL.Vec(IDL.Nat8)
|
|
580
|
+
});
|
|
581
|
+
const AddWasmResponse = IDL.Record({ result: IDL.Opt(Result) });
|
|
582
|
+
const NeuronBasketConstructionParameters = IDL.Record({
|
|
583
|
+
dissolve_delay_interval_seconds: IDL.Nat64,
|
|
584
|
+
count: IDL.Nat64
|
|
585
|
+
});
|
|
586
|
+
const Canister = IDL.Record({ id: IDL.Opt(IDL.Principal) });
|
|
587
|
+
const DappCanisters = IDL.Record({ canisters: IDL.Vec(Canister) });
|
|
588
|
+
const LinearScalingCoefficient = IDL.Record({
|
|
589
|
+
slope_numerator: IDL.Opt(IDL.Nat64),
|
|
590
|
+
intercept_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
591
|
+
from_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
592
|
+
slope_denominator: IDL.Opt(IDL.Nat64),
|
|
593
|
+
to_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
|
|
594
|
+
});
|
|
595
|
+
const IdealMatchedParticipationFunction = IDL.Record({
|
|
596
|
+
serialized_representation: IDL.Opt(IDL.Text)
|
|
597
|
+
});
|
|
598
|
+
const NeuronsFundParticipationConstraints = IDL.Record({
|
|
599
|
+
coefficient_intervals: IDL.Vec(LinearScalingCoefficient),
|
|
600
|
+
max_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
601
|
+
min_direct_participation_threshold_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
602
|
+
ideal_matched_participation_function: IDL.Opt(
|
|
603
|
+
IdealMatchedParticipationFunction
|
|
604
|
+
)
|
|
605
|
+
});
|
|
606
|
+
const TreasuryDistribution = IDL.Record({ total_e8s: IDL.Nat64 });
|
|
607
|
+
const NeuronDistribution = IDL.Record({
|
|
608
|
+
controller: IDL.Opt(IDL.Principal),
|
|
609
|
+
dissolve_delay_seconds: IDL.Nat64,
|
|
610
|
+
memo: IDL.Nat64,
|
|
611
|
+
stake_e8s: IDL.Nat64,
|
|
612
|
+
vesting_period_seconds: IDL.Opt(IDL.Nat64)
|
|
613
|
+
});
|
|
614
|
+
const DeveloperDistribution = IDL.Record({
|
|
615
|
+
developer_neurons: IDL.Vec(NeuronDistribution)
|
|
616
|
+
});
|
|
617
|
+
const AirdropDistribution = IDL.Record({
|
|
618
|
+
airdrop_neurons: IDL.Vec(NeuronDistribution)
|
|
619
|
+
});
|
|
620
|
+
const SwapDistribution = IDL.Record({
|
|
621
|
+
total_e8s: IDL.Nat64,
|
|
622
|
+
initial_swap_amount_e8s: IDL.Nat64
|
|
623
|
+
});
|
|
624
|
+
const FractionalDeveloperVotingPower = IDL.Record({
|
|
625
|
+
treasury_distribution: IDL.Opt(TreasuryDistribution),
|
|
626
|
+
developer_distribution: IDL.Opt(DeveloperDistribution),
|
|
627
|
+
airdrop_distribution: IDL.Opt(AirdropDistribution),
|
|
628
|
+
swap_distribution: IDL.Opt(SwapDistribution)
|
|
629
|
+
});
|
|
630
|
+
const InitialTokenDistribution = IDL.Variant({
|
|
631
|
+
FractionalDeveloperVotingPower: FractionalDeveloperVotingPower
|
|
632
|
+
});
|
|
633
|
+
const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
|
|
634
|
+
const SnsInitPayload = IDL.Record({
|
|
635
|
+
url: IDL.Opt(IDL.Text),
|
|
636
|
+
max_dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
|
|
637
|
+
max_dissolve_delay_bonus_percentage: IDL.Opt(IDL.Nat64),
|
|
638
|
+
nns_proposal_id: IDL.Opt(IDL.Nat64),
|
|
639
|
+
neurons_fund_participation: IDL.Opt(IDL.Bool),
|
|
640
|
+
min_participant_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
641
|
+
neuron_basket_construction_parameters: IDL.Opt(
|
|
642
|
+
NeuronBasketConstructionParameters
|
|
643
|
+
),
|
|
644
|
+
fallback_controller_principal_ids: IDL.Vec(IDL.Text),
|
|
645
|
+
token_symbol: IDL.Opt(IDL.Text),
|
|
646
|
+
final_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
|
|
647
|
+
max_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
648
|
+
neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
|
|
649
|
+
confirmation_text: IDL.Opt(IDL.Text),
|
|
650
|
+
logo: IDL.Opt(IDL.Text),
|
|
651
|
+
name: IDL.Opt(IDL.Text),
|
|
652
|
+
swap_start_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
653
|
+
swap_due_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
654
|
+
initial_voting_period_seconds: IDL.Opt(IDL.Nat64),
|
|
655
|
+
neuron_minimum_dissolve_delay_to_vote_seconds: IDL.Opt(IDL.Nat64),
|
|
656
|
+
description: IDL.Opt(IDL.Text),
|
|
657
|
+
max_neuron_age_seconds_for_age_bonus: IDL.Opt(IDL.Nat64),
|
|
658
|
+
min_participants: IDL.Opt(IDL.Nat64),
|
|
659
|
+
initial_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
|
|
660
|
+
wait_for_quiet_deadline_increase_seconds: IDL.Opt(IDL.Nat64),
|
|
661
|
+
transaction_fee_e8s: IDL.Opt(IDL.Nat64),
|
|
662
|
+
dapp_canisters: IDL.Opt(DappCanisters),
|
|
663
|
+
neurons_fund_participation_constraints: IDL.Opt(
|
|
664
|
+
NeuronsFundParticipationConstraints
|
|
665
|
+
),
|
|
666
|
+
max_age_bonus_percentage: IDL.Opt(IDL.Nat64),
|
|
667
|
+
initial_token_distribution: IDL.Opt(InitialTokenDistribution),
|
|
668
|
+
reward_rate_transition_duration_seconds: IDL.Opt(IDL.Nat64),
|
|
669
|
+
token_logo: IDL.Opt(IDL.Text),
|
|
670
|
+
token_name: IDL.Opt(IDL.Text),
|
|
671
|
+
max_participant_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
672
|
+
min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
673
|
+
proposal_reject_cost_e8s: IDL.Opt(IDL.Nat64),
|
|
674
|
+
restricted_countries: IDL.Opt(Countries),
|
|
675
|
+
min_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
676
|
+
max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
|
|
677
|
+
});
|
|
678
|
+
const DeployNewSnsRequest = IDL.Record({
|
|
679
|
+
sns_init_payload: IDL.Opt(SnsInitPayload)
|
|
680
|
+
});
|
|
681
|
+
const DappCanistersTransferResult = IDL.Record({
|
|
682
|
+
restored_dapp_canisters: IDL.Vec(Canister),
|
|
683
|
+
nns_controlled_dapp_canisters: IDL.Vec(Canister),
|
|
684
|
+
sns_controlled_dapp_canisters: IDL.Vec(Canister)
|
|
685
|
+
});
|
|
686
|
+
const SnsCanisterIds = IDL.Record({
|
|
687
|
+
root: IDL.Opt(IDL.Principal),
|
|
688
|
+
swap: IDL.Opt(IDL.Principal),
|
|
689
|
+
ledger: IDL.Opt(IDL.Principal),
|
|
690
|
+
index: IDL.Opt(IDL.Principal),
|
|
691
|
+
governance: IDL.Opt(IDL.Principal)
|
|
692
|
+
});
|
|
693
|
+
const DeployNewSnsResponse = IDL.Record({
|
|
694
|
+
dapp_canisters_transfer_result: IDL.Opt(DappCanistersTransferResult),
|
|
695
|
+
subnet_id: IDL.Opt(IDL.Principal),
|
|
696
|
+
error: IDL.Opt(SnsWasmError),
|
|
697
|
+
canisters: IDL.Opt(SnsCanisterIds)
|
|
698
|
+
});
|
|
699
|
+
const GetAllowedPrincipalsResponse = IDL.Record({
|
|
700
|
+
allowed_principals: IDL.Vec(IDL.Principal)
|
|
701
|
+
});
|
|
702
|
+
const GetDeployedSnsByProposalIdRequest = IDL.Record({
|
|
703
|
+
proposal_id: IDL.Nat64
|
|
704
|
+
});
|
|
705
|
+
const DeployedSns = IDL.Record({
|
|
706
|
+
root_canister_id: IDL.Opt(IDL.Principal),
|
|
707
|
+
governance_canister_id: IDL.Opt(IDL.Principal),
|
|
708
|
+
index_canister_id: IDL.Opt(IDL.Principal),
|
|
709
|
+
swap_canister_id: IDL.Opt(IDL.Principal),
|
|
710
|
+
ledger_canister_id: IDL.Opt(IDL.Principal)
|
|
711
|
+
});
|
|
712
|
+
const GetDeployedSnsByProposalIdResult = IDL.Variant({
|
|
713
|
+
Error: SnsWasmError,
|
|
714
|
+
DeployedSns: DeployedSns
|
|
715
|
+
});
|
|
716
|
+
const GetDeployedSnsByProposalIdResponse = IDL.Record({
|
|
717
|
+
get_deployed_sns_by_proposal_id_result: IDL.Opt(
|
|
718
|
+
GetDeployedSnsByProposalIdResult
|
|
719
|
+
)
|
|
720
|
+
});
|
|
721
|
+
const SnsVersion = IDL.Record({
|
|
722
|
+
archive_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
723
|
+
root_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
724
|
+
swap_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
725
|
+
ledger_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
726
|
+
governance_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
727
|
+
index_wasm_hash: IDL.Vec(IDL.Nat8)
|
|
728
|
+
});
|
|
729
|
+
const GetNextSnsVersionRequest = IDL.Record({
|
|
730
|
+
governance_canister_id: IDL.Opt(IDL.Principal),
|
|
731
|
+
current_version: IDL.Opt(SnsVersion)
|
|
732
|
+
});
|
|
733
|
+
const GetNextSnsVersionResponse = IDL.Record({
|
|
734
|
+
next_version: IDL.Opt(SnsVersion)
|
|
735
|
+
});
|
|
736
|
+
const GetProposalIdThatAddedWasmRequest = IDL.Record({
|
|
737
|
+
hash: IDL.Vec(IDL.Nat8)
|
|
738
|
+
});
|
|
739
|
+
const GetProposalIdThatAddedWasmResponse = IDL.Record({
|
|
740
|
+
proposal_id: IDL.Opt(IDL.Nat64)
|
|
741
|
+
});
|
|
742
|
+
const GetSnsSubnetIdsResponse = IDL.Record({
|
|
743
|
+
sns_subnet_ids: IDL.Vec(IDL.Principal)
|
|
744
|
+
});
|
|
745
|
+
const GetWasmRequest = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
|
|
746
|
+
const GetWasmResponse = IDL.Record({ wasm: IDL.Opt(SnsWasm) });
|
|
747
|
+
const GetWasmMetadataRequest = IDL.Record({
|
|
748
|
+
hash: IDL.Opt(IDL.Vec(IDL.Nat8))
|
|
749
|
+
});
|
|
750
|
+
const MetadataSection = IDL.Record({
|
|
751
|
+
contents: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
752
|
+
name: IDL.Opt(IDL.Text),
|
|
753
|
+
visibility: IDL.Opt(IDL.Text)
|
|
754
|
+
});
|
|
755
|
+
const Ok = IDL.Record({ sections: IDL.Vec(MetadataSection) });
|
|
756
|
+
const Result_1 = IDL.Variant({ Ok: Ok, Error: SnsWasmError });
|
|
757
|
+
const GetWasmMetadataResponse = IDL.Record({ result: IDL.Opt(Result_1) });
|
|
758
|
+
const SnsUpgrade = IDL.Record({
|
|
759
|
+
next_version: IDL.Opt(SnsVersion),
|
|
760
|
+
current_version: IDL.Opt(SnsVersion)
|
|
761
|
+
});
|
|
762
|
+
const InsertUpgradePathEntriesRequest = IDL.Record({
|
|
763
|
+
upgrade_path: IDL.Vec(SnsUpgrade),
|
|
764
|
+
sns_governance_canister_id: IDL.Opt(IDL.Principal)
|
|
765
|
+
});
|
|
766
|
+
const InsertUpgradePathEntriesResponse = IDL.Record({
|
|
767
|
+
error: IDL.Opt(SnsWasmError)
|
|
768
|
+
});
|
|
769
|
+
const ListDeployedSnsesResponse = IDL.Record({
|
|
770
|
+
instances: IDL.Vec(DeployedSns)
|
|
771
|
+
});
|
|
772
|
+
const ListUpgradeStepsRequest = IDL.Record({
|
|
773
|
+
limit: IDL.Nat32,
|
|
774
|
+
starting_at: IDL.Opt(SnsVersion),
|
|
775
|
+
sns_governance_canister_id: IDL.Opt(IDL.Principal)
|
|
776
|
+
});
|
|
777
|
+
const PrettySnsVersion = IDL.Record({
|
|
778
|
+
archive_wasm_hash: IDL.Text,
|
|
779
|
+
root_wasm_hash: IDL.Text,
|
|
780
|
+
swap_wasm_hash: IDL.Text,
|
|
781
|
+
ledger_wasm_hash: IDL.Text,
|
|
782
|
+
governance_wasm_hash: IDL.Text,
|
|
783
|
+
index_wasm_hash: IDL.Text
|
|
784
|
+
});
|
|
785
|
+
const ListUpgradeStep = IDL.Record({
|
|
786
|
+
pretty_version: IDL.Opt(PrettySnsVersion),
|
|
787
|
+
version: IDL.Opt(SnsVersion)
|
|
788
|
+
});
|
|
789
|
+
const ListUpgradeStepsResponse = IDL.Record({
|
|
790
|
+
steps: IDL.Vec(ListUpgradeStep)
|
|
791
|
+
});
|
|
792
|
+
const UpdateAllowedPrincipalsRequest = IDL.Record({
|
|
793
|
+
added_principals: IDL.Vec(IDL.Principal),
|
|
794
|
+
removed_principals: IDL.Vec(IDL.Principal)
|
|
795
|
+
});
|
|
796
|
+
const UpdateAllowedPrincipalsResult = IDL.Variant({
|
|
797
|
+
Error: SnsWasmError,
|
|
798
|
+
AllowedPrincipals: GetAllowedPrincipalsResponse
|
|
799
|
+
});
|
|
800
|
+
const UpdateAllowedPrincipalsResponse = IDL.Record({
|
|
801
|
+
update_allowed_principals_result: IDL.Opt(UpdateAllowedPrincipalsResult)
|
|
802
|
+
});
|
|
803
|
+
const UpdateSnsSubnetListRequest = IDL.Record({
|
|
804
|
+
sns_subnet_ids_to_add: IDL.Vec(IDL.Principal),
|
|
805
|
+
sns_subnet_ids_to_remove: IDL.Vec(IDL.Principal)
|
|
806
|
+
});
|
|
807
|
+
const UpdateSnsSubnetListResponse = IDL.Record({
|
|
808
|
+
error: IDL.Opt(SnsWasmError)
|
|
809
|
+
});
|
|
810
|
+
return IDL.Service({
|
|
811
|
+
add_wasm: IDL.Func([AddWasmRequest], [AddWasmResponse], []),
|
|
812
|
+
deploy_new_sns: IDL.Func(
|
|
813
|
+
[DeployNewSnsRequest],
|
|
814
|
+
[DeployNewSnsResponse],
|
|
815
|
+
[]
|
|
816
|
+
),
|
|
817
|
+
get_allowed_principals: IDL.Func(
|
|
818
|
+
[IDL.Record({})],
|
|
819
|
+
[GetAllowedPrincipalsResponse],
|
|
820
|
+
['query']
|
|
821
|
+
),
|
|
822
|
+
get_deployed_sns_by_proposal_id: IDL.Func(
|
|
823
|
+
[GetDeployedSnsByProposalIdRequest],
|
|
824
|
+
[GetDeployedSnsByProposalIdResponse],
|
|
825
|
+
['query']
|
|
826
|
+
),
|
|
827
|
+
get_latest_sns_version_pretty: IDL.Func(
|
|
828
|
+
[IDL.Null],
|
|
829
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
830
|
+
['query']
|
|
831
|
+
),
|
|
832
|
+
get_next_sns_version: IDL.Func(
|
|
833
|
+
[GetNextSnsVersionRequest],
|
|
834
|
+
[GetNextSnsVersionResponse],
|
|
835
|
+
['query']
|
|
836
|
+
),
|
|
837
|
+
get_proposal_id_that_added_wasm: IDL.Func(
|
|
838
|
+
[GetProposalIdThatAddedWasmRequest],
|
|
839
|
+
[GetProposalIdThatAddedWasmResponse],
|
|
840
|
+
['query']
|
|
841
|
+
),
|
|
842
|
+
get_sns_subnet_ids: IDL.Func(
|
|
843
|
+
[IDL.Record({})],
|
|
844
|
+
[GetSnsSubnetIdsResponse],
|
|
845
|
+
['query']
|
|
846
|
+
),
|
|
847
|
+
get_wasm: IDL.Func([GetWasmRequest], [GetWasmResponse], ['query']),
|
|
848
|
+
get_wasm_metadata: IDL.Func(
|
|
849
|
+
[GetWasmMetadataRequest],
|
|
850
|
+
[GetWasmMetadataResponse],
|
|
851
|
+
['query']
|
|
852
|
+
),
|
|
853
|
+
insert_upgrade_path_entries: IDL.Func(
|
|
854
|
+
[InsertUpgradePathEntriesRequest],
|
|
855
|
+
[InsertUpgradePathEntriesResponse],
|
|
856
|
+
[]
|
|
857
|
+
),
|
|
858
|
+
list_deployed_snses: IDL.Func(
|
|
859
|
+
[IDL.Record({})],
|
|
860
|
+
[ListDeployedSnsesResponse],
|
|
861
|
+
['query']
|
|
862
|
+
),
|
|
863
|
+
list_upgrade_steps: IDL.Func(
|
|
864
|
+
[ListUpgradeStepsRequest],
|
|
865
|
+
[ListUpgradeStepsResponse],
|
|
866
|
+
['query']
|
|
867
|
+
),
|
|
868
|
+
update_allowed_principals: IDL.Func(
|
|
869
|
+
[UpdateAllowedPrincipalsRequest],
|
|
870
|
+
[UpdateAllowedPrincipalsResponse],
|
|
871
|
+
[]
|
|
872
|
+
),
|
|
873
|
+
update_sns_subnet_list: IDL.Func(
|
|
874
|
+
[UpdateSnsSubnetListRequest],
|
|
875
|
+
[UpdateSnsSubnetListResponse],
|
|
876
|
+
[]
|
|
877
|
+
)
|
|
878
|
+
});
|
|
879
|
+
};
|
|
880
|
+
export const init: init = ({ IDL }) => {
|
|
881
|
+
const SnsWasmCanisterInitPayload = IDL.Record({
|
|
882
|
+
allowed_principals: IDL.Vec(IDL.Principal),
|
|
883
|
+
access_controls_enabled: IDL.Bool,
|
|
884
|
+
sns_subnet_ids: IDL.Vec(IDL.Principal)
|
|
885
|
+
});
|
|
886
|
+
return [SnsWasmCanisterInitPayload];
|
|
887
|
+
};
|