@ohos-ports/azle 0.33.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (629) hide show
  1. package/.scripts/add_metadata_to_dfx_json.js +54 -0
  2. package/.scripts/cargo_expand.sh +17 -0
  3. package/.scripts/class_migration/add_example_dependency.js +54 -0
  4. package/.scripts/class_migration/change_to_custom_candid_gen.js +76 -0
  5. package/.scripts/class_migration/clean_package.js +27 -0
  6. package/.scripts/class_migration/copy_generated_candid_from_example.js +90 -0
  7. package/.scripts/class_migration/delete_tests_file.js +22 -0
  8. package/.scripts/class_migration/do_all_packages.js +61 -0
  9. package/.scripts/class_migration/modify_pretest.js +57 -0
  10. package/.scripts/class_migration/name_package.js +62 -0
  11. package/.scripts/class_migration/update_test.js +38 -0
  12. package/.scripts/class_migration/update_ts_config.js +48 -0
  13. package/.scripts/class_migration/update_typescript.js +99 -0
  14. package/.scripts/clean_all_projects.ts +91 -0
  15. package/.scripts/delete_git_branches.sh +20 -0
  16. package/.scripts/dev_dependencies/add_dev_dependencies.js +53 -0
  17. package/.scripts/dev_dependencies/remove_dev_dependencies.js +44 -0
  18. package/.scripts/examples-survey.json +5651 -0
  19. package/.scripts/file_generator/bin.js +4 -0
  20. package/.scripts/file_generator/index.ts +59 -0
  21. package/.scripts/file_generator/main.ts +55 -0
  22. package/.scripts/find_multiline_files.ts +101 -0
  23. package/.scripts/hash_file.ts +9 -0
  24. package/.scripts/hash_file_by_parts/bin.js +4 -0
  25. package/.scripts/hash_file_by_parts/index.ts +48 -0
  26. package/.scripts/hash_file_by_parts/main.ts +10 -0
  27. package/.scripts/jest_isolate_modules.js +29 -0
  28. package/.scripts/jest_migration.sh +31 -0
  29. package/.scripts/reorder_dfx_json.js +72 -0
  30. package/.scripts/setup_release_branch.sh +34 -0
  31. package/.scripts/simplify_tsconfig.js +37 -0
  32. package/.scripts/survey_examples.ts +396 -0
  33. package/.scripts/tsx_migration/ts_node_to_tsx.js +76 -0
  34. package/.scripts/update_candid.sh +40 -0
  35. package/.scripts/update_dfx_json_main.js +66 -0
  36. package/.scripts/update_dfx_json_with_optimize.py +22 -0
  37. package/.scripts/update_jest_configs.ts +248 -0
  38. package/LICENSE +21 -0
  39. package/LICENSE_EXTENSION.md +42 -0
  40. package/NOTICE +222 -0
  41. package/README.md +78 -0
  42. package/dist/canister_templates/experimental.wasm +0 -0
  43. package/dist/canister_templates/licenses.yml +29186 -0
  44. package/dist/canister_templates/stable.wasm +0 -0
  45. package/examples/README.md +22 -0
  46. package/examples/experimental/demo/hello_world_http_server/README.md +120 -0
  47. package/examples/experimental/demo/hello_world_http_server/benchmarks.json +42 -0
  48. package/examples/experimental/demo/hello_world_http_server/benchmarks.md +28 -0
  49. package/examples/experimental/demo/hello_world_http_server/dfx.json +13 -0
  50. package/examples/experimental/demo/hello_world_http_server/env.d.ts +9 -0
  51. package/examples/experimental/demo/hello_world_http_server/jest.config.js +10 -0
  52. package/examples/experimental/demo/hello_world_http_server/package-lock.json +8409 -0
  53. package/examples/experimental/demo/hello_world_http_server/package.json +20 -0
  54. package/examples/experimental/demo/hello_world_http_server/src/backend/index.ts +23 -0
  55. package/examples/experimental/demo/hello_world_http_server/src/frontend/index.html +16 -0
  56. package/examples/experimental/demo/hello_world_http_server/src/frontend/index.ts +62 -0
  57. package/examples/experimental/demo/hello_world_http_server/test/pretest.ts +13 -0
  58. package/examples/experimental/demo/hello_world_http_server/test/test.ts +9 -0
  59. package/examples/experimental/demo/hello_world_http_server/test/tests.ts +27 -0
  60. package/examples/experimental/demo/hello_world_http_server/tsconfig.json +13 -0
  61. package/examples/package-lock.json +8746 -0
  62. package/examples/package.json +17 -0
  63. package/examples/stable/demo/hello_world/README.md +97 -0
  64. package/examples/stable/demo/hello_world/benchmarks.json +28 -0
  65. package/examples/stable/demo/hello_world/benchmarks.md +26 -0
  66. package/examples/stable/demo/hello_world/dfx.json +12 -0
  67. package/examples/stable/demo/hello_world/jest.config.js +10 -0
  68. package/examples/stable/demo/hello_world/package-lock.json +5524 -0
  69. package/examples/stable/demo/hello_world/package.json +14 -0
  70. package/examples/stable/demo/hello_world/src/index.ts +15 -0
  71. package/examples/stable/demo/hello_world/test/pretest.ts +17 -0
  72. package/examples/stable/demo/hello_world/test/test.ts +15 -0
  73. package/examples/stable/demo/hello_world/test/tests.ts +27 -0
  74. package/examples/stable/demo/hello_world/tsconfig.json +10 -0
  75. package/jest.config.dev.js +10 -0
  76. package/package.json +102 -0
  77. package/src/build.ts +98 -0
  78. package/src/experimental/build/assert_experimental.ts +5 -0
  79. package/src/experimental/build/commands/build/candid_and_method_meta.ts +30 -0
  80. package/src/experimental/build/commands/build/custom_js_modules/acorn/acorn.ts +6 -0
  81. package/src/experimental/build/commands/build/custom_js_modules/acorn/walk.ts +6 -0
  82. package/src/experimental/build/commands/build/custom_js_modules/async_hooks.ts +11 -0
  83. package/src/experimental/build/commands/build/custom_js_modules/https.ts +6 -0
  84. package/src/experimental/build/commands/build/custom_js_modules/perf_hooks.ts +12 -0
  85. package/src/experimental/build/commands/build/file_watcher/file_watcher.ts +152 -0
  86. package/src/experimental/build/commands/build/file_watcher/file_watcher_loader.js +9 -0
  87. package/src/experimental/build/commands/build/file_watcher/setup_file_watcher.ts +61 -0
  88. package/src/experimental/build/commands/build/get_context.ts +61 -0
  89. package/src/experimental/build/commands/build/index.ts +87 -0
  90. package/src/experimental/build/commands/build/javascript.ts +194 -0
  91. package/src/experimental/build/commands/build/wasm_binary/index.ts +32 -0
  92. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/Cargo.toml +26 -0
  93. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/autoreload.rs +46 -0
  94. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/benchmarking.rs +35 -0
  95. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/candid.rs +106 -0
  96. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/chunk.rs +11 -0
  97. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/execute_method_js.rs +46 -0
  98. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/guards.rs +9 -0
  99. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/accept_message.rs +10 -0
  100. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/call_raw.rs +265 -0
  101. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/candid_compiler.rs +19 -0
  102. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/candid_decode.rs +17 -0
  103. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/candid_encode.rs +17 -0
  104. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/canister_cycle_balance.rs +12 -0
  105. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/canister_self.rs +10 -0
  106. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/canister_version.rs +10 -0
  107. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/certified_data_set.rs +17 -0
  108. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/clear_timer.rs +18 -0
  109. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/cycles_burn.rs +17 -0
  110. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/data_certificate.rs +13 -0
  111. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/debug_print.rs +17 -0
  112. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/drain_microtasks.rs +23 -0
  113. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/in_replicated_execution.rs +8 -0
  114. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/is_controller.rs +16 -0
  115. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/mod.rs +351 -0
  116. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_arg_data.rs +10 -0
  117. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_caller.rs +10 -0
  118. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_cycles_accept.rs +17 -0
  119. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_cycles_available.rs +10 -0
  120. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_cycles_refunded.rs +10 -0
  121. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_method_name.rs +8 -0
  122. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reject.rs +16 -0
  123. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reject_code.rs +8 -0
  124. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reject_msg.rs +8 -0
  125. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/msg_reply.rs +19 -0
  126. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/notify_raw.rs +65 -0
  127. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/performance_counter.rs +19 -0
  128. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/rand_bytes.rs +25 -0
  129. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/rand_seed.rs +30 -0
  130. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/set_timer.rs +83 -0
  131. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/set_timer_interval.rs +66 -0
  132. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_contains_key.rs +32 -0
  133. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_get.rs +36 -0
  134. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_init.rs +29 -0
  135. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_insert.rs +46 -0
  136. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_is_empty.rs +23 -0
  137. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_items.rs +59 -0
  138. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_keys.rs +54 -0
  139. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_len.rs +23 -0
  140. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_remove.rs +36 -0
  141. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/stable_b_tree_map_values.rs +54 -0
  142. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/time.rs +8 -0
  143. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/ic/trap.rs +14 -0
  144. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/init_and_post_upgrade.rs +212 -0
  145. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/internal_canister_methods.rs +142 -0
  146. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/lib.rs +35 -0
  147. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/stable_b_tree_map.rs +50 -0
  148. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/bytes_to_human_readable.rs +20 -0
  149. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/file_info.rs +60 -0
  150. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/hash.rs +111 -0
  151. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/mod.rs +20 -0
  152. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/reset.rs +15 -0
  153. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/upload_file/upload_file_chunk.rs +88 -0
  154. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/wasm_binary_manipulation.rs +276 -0
  155. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/web_assembly/instantiate.rs +195 -0
  156. package/src/experimental/build/commands/build/wasm_binary/rust/experimental_canister_template/src/web_assembly/mod.rs +24 -0
  157. package/src/experimental/build/commands/upload_assets/file_uploader/bytes_to_human_readable.ts +27 -0
  158. package/src/experimental/build/commands/upload_assets/file_uploader/expand_paths.ts +50 -0
  159. package/src/experimental/build/commands/upload_assets/file_uploader/get_files_to_upload.ts +21 -0
  160. package/src/experimental/build/commands/upload_assets/file_uploader/incomplete_files.ts +28 -0
  161. package/src/experimental/build/commands/upload_assets/file_uploader/index.ts +43 -0
  162. package/src/experimental/build/commands/upload_assets/file_uploader/on_before_exit.ts +34 -0
  163. package/src/experimental/build/commands/upload_assets/file_uploader/upload_file.ts +91 -0
  164. package/src/experimental/build/commands/upload_assets/file_uploader/uploader_actor.ts +51 -0
  165. package/src/experimental/build/commands/upload_assets/index.ts +16 -0
  166. package/src/experimental/build/commands/upload_assets/uploader_identity.ts +23 -0
  167. package/src/experimental/build/index.ts +61 -0
  168. package/src/experimental/build/utils/dfx.ts +212 -0
  169. package/src/experimental/build/utils/filter_async.ts +14 -0
  170. package/src/experimental/build/utils/find_project_root.ts +67 -0
  171. package/src/experimental/build/utils/global_paths.ts +8 -0
  172. package/src/experimental/build/utils/log_success.ts +18 -0
  173. package/src/experimental/build/utils/types.ts +34 -0
  174. package/src/experimental/lib/assert_experimental.ts +19 -0
  175. package/src/experimental/lib/fetch/file.ts +15 -0
  176. package/src/experimental/lib/fetch/headers.ts +85 -0
  177. package/src/experimental/lib/fetch/http.ts +293 -0
  178. package/src/experimental/lib/fetch/icp.ts +98 -0
  179. package/src/experimental/lib/fetch/index.ts +97 -0
  180. package/src/experimental/lib/fetch/response.ts +171 -0
  181. package/src/experimental/lib/fetch/url.ts +15 -0
  182. package/src/experimental/lib/globals.ts +146 -0
  183. package/src/experimental/lib/http_client/fetch_ic/actor.ts +131 -0
  184. package/src/experimental/lib/http_client/fetch_ic/agent.ts +20 -0
  185. package/src/experimental/lib/http_client/fetch_ic/call.ts +257 -0
  186. package/src/experimental/lib/http_client/fetch_ic/get_canister_id.ts +25 -0
  187. package/src/experimental/lib/http_client/fetch_ic/host.ts +30 -0
  188. package/src/experimental/lib/http_client/fetch_ic/identity.ts +52 -0
  189. package/src/experimental/lib/http_client/fetch_ic/index.ts +95 -0
  190. package/src/experimental/lib/http_client/fetch_ic/response.ts +8 -0
  191. package/src/experimental/lib/http_client/index.ts +6 -0
  192. package/src/experimental/lib/http_client/to_jwt.ts +6 -0
  193. package/src/experimental/lib/ic/azle_ic_experimental.ts +92 -0
  194. package/src/experimental/lib/ic/candid_compiler.ts +14 -0
  195. package/src/experimental/lib/ic/index.ts +10 -0
  196. package/src/experimental/lib/ic/set_outgoing_http_options.ts +18 -0
  197. package/src/experimental/lib/index.ts +7 -0
  198. package/src/experimental/lib/server.ts +279 -0
  199. package/src/experimental/lib/threshold_wallet/calculate_rsv_for_tecdsa.ts +45 -0
  200. package/src/experimental/lib/threshold_wallet/ecdsa_public_key.ts +33 -0
  201. package/src/experimental/lib/threshold_wallet/index.ts +7 -0
  202. package/src/experimental/lib/threshold_wallet/register_get_url.ts +36 -0
  203. package/src/experimental/lib/threshold_wallet/sign_with_ecdsa.ts +28 -0
  204. package/src/experimental/lib/threshold_wallet/wallet.ts +99 -0
  205. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/complex_candid_definition_memo.ts +113 -0
  206. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/index.ts +73 -0
  207. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/recursive_candid_definition_memo.ts +28 -0
  208. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/simple_candid_definition_arb.ts +116 -0
  209. package/src/experimental/test/property/arbitraries/candid/candid_definition_arb/types.ts +117 -0
  210. package/src/experimental/test/property/arbitraries/candid/candid_return_type_arb.ts +22 -0
  211. package/src/experimental/test/property/arbitraries/candid/candid_type.ts +83 -0
  212. package/src/experimental/test/property/arbitraries/candid/candid_value_and_meta_arb.ts +84 -0
  213. package/src/experimental/test/property/arbitraries/candid/candid_value_and_meta_arb_generator.ts +63 -0
  214. package/src/experimental/test/property/arbitraries/candid/candid_values_arb.ts +173 -0
  215. package/src/experimental/test/property/arbitraries/candid/constructed/blob_arb/definition_arb.ts +11 -0
  216. package/src/experimental/test/property/arbitraries/candid/constructed/blob_arb/index.ts +19 -0
  217. package/src/experimental/test/property/arbitraries/candid/constructed/blob_arb/values_arb.ts +11 -0
  218. package/src/experimental/test/property/arbitraries/candid/constructed/opt_arb/definition_arb.ts +172 -0
  219. package/src/experimental/test/property/arbitraries/candid/constructed/opt_arb/index.ts +29 -0
  220. package/src/experimental/test/property/arbitraries/candid/constructed/opt_arb/values_arb.ts +88 -0
  221. package/src/experimental/test/property/arbitraries/candid/constructed/record_arb/definition_arb.ts +184 -0
  222. package/src/experimental/test/property/arbitraries/candid/constructed/record_arb/index.ts +34 -0
  223. package/src/experimental/test/property/arbitraries/candid/constructed/record_arb/values_arb.ts +95 -0
  224. package/src/experimental/test/property/arbitraries/candid/constructed/tuple_arb/definition_arb.ts +159 -0
  225. package/src/experimental/test/property/arbitraries/candid/constructed/tuple_arb/index.ts +31 -0
  226. package/src/experimental/test/property/arbitraries/candid/constructed/tuple_arb/values_arbs.ts +76 -0
  227. package/src/experimental/test/property/arbitraries/candid/constructed/variant_arb/definition_arbs.ts +257 -0
  228. package/src/experimental/test/property/arbitraries/candid/constructed/variant_arb/index.ts +37 -0
  229. package/src/experimental/test/property/arbitraries/candid/constructed/variant_arb/values_arb.ts +92 -0
  230. package/src/experimental/test/property/arbitraries/candid/constructed/vec_arb/definition_arb.ts +203 -0
  231. package/src/experimental/test/property/arbitraries/candid/constructed/vec_arb/index.ts +39 -0
  232. package/src/experimental/test/property/arbitraries/candid/constructed/vec_arb/values_arb.ts +257 -0
  233. package/src/experimental/test/property/arbitraries/candid/corresponding_js_type.ts +34 -0
  234. package/src/experimental/test/property/arbitraries/candid/primitive/bool_arb.ts +28 -0
  235. package/src/experimental/test/property/arbitraries/candid/primitive/floats/float32_arb.ts +56 -0
  236. package/src/experimental/test/property/arbitraries/candid/primitive/floats/float64_arb.ts +56 -0
  237. package/src/experimental/test/property/arbitraries/candid/primitive/ints/index.ts +11 -0
  238. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int16_arb.ts +34 -0
  239. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int32_arb.ts +34 -0
  240. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int64_arb.ts +41 -0
  241. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int8_arb.ts +34 -0
  242. package/src/experimental/test/property/arbitraries/candid/primitive/ints/int_arb.ts +39 -0
  243. package/src/experimental/test/property/arbitraries/candid/primitive/nats/index.ts +11 -0
  244. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat16_arb.ts +34 -0
  245. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat32_arb.ts +34 -0
  246. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat64_arb.ts +41 -0
  247. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat8_arb.ts +34 -0
  248. package/src/experimental/test/property/arbitraries/candid/primitive/nats/nat_arb.ts +39 -0
  249. package/src/experimental/test/property/arbitraries/candid/primitive/null_arb.ts +33 -0
  250. package/src/experimental/test/property/arbitraries/candid/primitive/text_arb.ts +47 -0
  251. package/src/experimental/test/property/arbitraries/candid/primitive/void_arb.ts +33 -0
  252. package/src/experimental/test/property/arbitraries/candid/recursive/definition_arb.ts +125 -0
  253. package/src/experimental/test/property/arbitraries/candid/recursive/index.ts +35 -0
  254. package/src/experimental/test/property/arbitraries/candid/recursive/values_arb.ts +43 -0
  255. package/src/experimental/test/property/arbitraries/candid/reference/func_arb/definition_arb.ts +198 -0
  256. package/src/experimental/test/property/arbitraries/candid/reference/func_arb/index.ts +23 -0
  257. package/src/experimental/test/property/arbitraries/candid/reference/func_arb/values_arb.ts +70 -0
  258. package/src/experimental/test/property/arbitraries/candid/reference/principal_arb.ts +43 -0
  259. package/src/experimental/test/property/arbitraries/candid/reference/service_arb/definition_arb.ts +163 -0
  260. package/src/experimental/test/property/arbitraries/candid/reference/service_arb/index.ts +41 -0
  261. package/src/experimental/test/property/arbitraries/candid/reference/service_arb/service_method_arb.ts +110 -0
  262. package/src/experimental/test/property/arbitraries/candid/reference/service_arb/values_arb.ts +20 -0
  263. package/src/experimental/test/property/arbitraries/candid/simple_type_arbs/candid_type_to_azle_candid_type.ts +66 -0
  264. package/src/experimental/test/property/arbitraries/candid/simple_type_arbs/definition_arb.ts +95 -0
  265. package/src/experimental/test/property/arbitraries/candid/simple_type_arbs/values_arb.ts +19 -0
  266. package/src/experimental/test/property/arbitraries/candid/to_src_literal/bigint.ts +5 -0
  267. package/src/experimental/test/property/arbitraries/candid/to_src_literal/blob.ts +5 -0
  268. package/src/experimental/test/property/arbitraries/candid/to_src_literal/boolean.ts +5 -0
  269. package/src/experimental/test/property/arbitraries/candid/to_src_literal/float.ts +18 -0
  270. package/src/experimental/test/property/arbitraries/candid/to_src_literal/null.ts +5 -0
  271. package/src/experimental/test/property/arbitraries/candid/to_src_literal/number.ts +5 -0
  272. package/src/experimental/test/property/arbitraries/candid/to_src_literal/principal.ts +7 -0
  273. package/src/experimental/test/property/arbitraries/candid/to_src_literal/string.ts +12 -0
  274. package/src/experimental/test/property/arbitraries/candid/to_src_literal/void.ts +5 -0
  275. package/src/experimental/test/property/arbitraries/canister_arb.ts +195 -0
  276. package/src/experimental/test/property/arbitraries/canister_methods/index.ts +79 -0
  277. package/src/experimental/test/property/arbitraries/canister_methods/init_method_arb.ts +127 -0
  278. package/src/experimental/test/property/arbitraries/canister_methods/inspect_message_method_arb.ts +55 -0
  279. package/src/experimental/test/property/arbitraries/canister_methods/post_upgrade_method_arb.ts +133 -0
  280. package/src/experimental/test/property/arbitraries/canister_methods/pre_upgrade_method_arb.ts +57 -0
  281. package/src/experimental/test/property/arbitraries/canister_methods/query_method_arb.ts +141 -0
  282. package/src/experimental/test/property/arbitraries/canister_methods/update_method_arb.ts +158 -0
  283. package/src/experimental/test/property/arbitraries/config.ts +4 -0
  284. package/src/experimental/test/property/arbitraries/http/body_arb.ts +7 -0
  285. package/src/experimental/test/property/arbitraries/http/headers_arb.ts +22 -0
  286. package/src/experimental/test/property/arbitraries/http/request_arb.ts +158 -0
  287. package/src/experimental/test/property/arbitraries/http/response_arb.ts +192 -0
  288. package/src/experimental/test/property/arbitraries/js_name_arb.ts +144 -0
  289. package/src/experimental/test/property/arbitraries/stable_b_tree_map_arb.ts +55 -0
  290. package/src/experimental/test/property/arbitraries/types.ts +24 -0
  291. package/src/experimental/test/property/arbitraries/unique_identifier_arb.ts +38 -0
  292. package/src/experimental/test/property/arbitraries/unique_primitive_arb.ts +22 -0
  293. package/src/experimental/test/property/are_params_correctly_ordered.ts +19 -0
  294. package/src/experimental/test/property/get_actor.ts +39 -0
  295. package/src/experimental/test/property/index.ts +141 -0
  296. package/src/experimental/test/property/test/index.ts +226 -0
  297. package/src/experimental/test/property/visitors/LICENCE +201 -0
  298. package/src/experimental/test/property/visitors/cli-string-visitor.ts +138 -0
  299. package/src/experimental/test/set_experimental.ts +1 -0
  300. package/src/exports/_internal/dfx.ts +1 -0
  301. package/src/exports/_internal/globals.ts +1 -0
  302. package/src/exports/_internal/test/candid_deep_equal.ts +1 -0
  303. package/src/exports/_internal/test.ts +1 -0
  304. package/src/exports/_internal/type_tests/assert_type.ts +1 -0
  305. package/src/exports/_internal.ts +1 -0
  306. package/src/exports/canisters/ck_btc_ledger/idl.ts +1 -0
  307. package/src/exports/canisters/ck_eth_ledger/idl.ts +1 -0
  308. package/src/exports/canisters/cycles_ledger/idl.ts +1 -0
  309. package/src/exports/canisters/evm_rpc/idl.ts +1 -0
  310. package/src/exports/canisters/exchange_rate/idl.ts +1 -0
  311. package/src/exports/canisters/http_gateway/idl.ts +1 -0
  312. package/src/exports/canisters/icrc_1/idl.ts +1 -0
  313. package/src/exports/canisters/icrc_10/idl.ts +1 -0
  314. package/src/exports/canisters/icrc_2/idl.ts +1 -0
  315. package/src/exports/canisters/icrc_3/idl.ts +1 -0
  316. package/src/exports/canisters/icrc_37/idl.ts +1 -0
  317. package/src/exports/canisters/icrc_7/idl.ts +1 -0
  318. package/src/exports/canisters/llm/idl.ts +1 -0
  319. package/src/exports/canisters/management/idl.ts +1 -0
  320. package/src/exports/canisters/nns_cycles_minting/idl.ts +1 -0
  321. package/src/exports/canisters/nns_governance/idl.ts +1 -0
  322. package/src/exports/canisters/nns_icp_ledger/idl.ts +1 -0
  323. package/src/exports/canisters/nns_internet_identity/idl.ts +1 -0
  324. package/src/exports/canisters/nns_registry/idl.ts +1 -0
  325. package/src/exports/canisters/nns_sns_w/idl.ts +1 -0
  326. package/src/exports/experimental/_internal/dfx.ts +1 -0
  327. package/src/exports/experimental/_internal/globals.ts +1 -0
  328. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_definition_arb/types.ts +1 -0
  329. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_definition_arb.ts +1 -0
  330. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_return_type_arb.ts +1 -0
  331. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_value_and_meta_arb.ts +1 -0
  332. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_value_and_meta_arb_generator.ts +1 -0
  333. package/src/exports/experimental/_internal/test/property/arbitraries/candid/candid_values_arb.ts +1 -0
  334. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/blob_arb.ts +1 -0
  335. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/opt_arb.ts +1 -0
  336. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/record_arb.ts +1 -0
  337. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/tuple_arb.ts +1 -0
  338. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/variant_arb.ts +1 -0
  339. package/src/exports/experimental/_internal/test/property/arbitraries/candid/constructed/vec_arb.ts +1 -0
  340. package/src/exports/experimental/_internal/test/property/arbitraries/candid/corresponding_js_type.ts +1 -0
  341. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/bool_arb.ts +1 -0
  342. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/floats/float32_arb.ts +1 -0
  343. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/floats/float64_arb.ts +1 -0
  344. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int16_arb.ts +1 -0
  345. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int32_arb.ts +1 -0
  346. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int64_arb.ts +1 -0
  347. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int8_arb.ts +1 -0
  348. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/ints/int_arb.ts +1 -0
  349. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat16_arb.ts +1 -0
  350. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat32_arb.ts +1 -0
  351. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat64_arb.ts +1 -0
  352. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat8_arb.ts +1 -0
  353. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/nats/nat_arb.ts +1 -0
  354. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/null_arb.ts +1 -0
  355. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/text_arb.ts +1 -0
  356. package/src/exports/experimental/_internal/test/property/arbitraries/candid/primitive/void_arb.ts +1 -0
  357. package/src/exports/experimental/_internal/test/property/arbitraries/candid/recursive.ts +1 -0
  358. package/src/exports/experimental/_internal/test/property/arbitraries/candid/reference/func_arb.ts +1 -0
  359. package/src/exports/experimental/_internal/test/property/arbitraries/candid/reference/principal_arb.ts +1 -0
  360. package/src/exports/experimental/_internal/test/property/arbitraries/candid/reference/service_arb.ts +1 -0
  361. package/src/exports/experimental/_internal/test/property/arbitraries/canister_arb.ts +1 -0
  362. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/init_method_arb.ts +1 -0
  363. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/inspect_message_method_arb.ts +1 -0
  364. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/post_upgrade_method_arb.ts +1 -0
  365. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/pre_upgrade_method_arb.ts +1 -0
  366. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/query_method_arb.ts +1 -0
  367. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods/update_method_arb.ts +1 -0
  368. package/src/exports/experimental/_internal/test/property/arbitraries/canister_methods.ts +1 -0
  369. package/src/exports/experimental/_internal/test/property/arbitraries/config.ts +1 -0
  370. package/src/exports/experimental/_internal/test/property/arbitraries/http/body_arb.ts +1 -0
  371. package/src/exports/experimental/_internal/test/property/arbitraries/http/headers_arb.ts +1 -0
  372. package/src/exports/experimental/_internal/test/property/arbitraries/http/request_arb.ts +1 -0
  373. package/src/exports/experimental/_internal/test/property/arbitraries/http/response_arb.ts +1 -0
  374. package/src/exports/experimental/_internal/test/property/arbitraries/stable_b_tree_map_arb.ts +1 -0
  375. package/src/exports/experimental/_internal/test/property/arbitraries/types.ts +1 -0
  376. package/src/exports/experimental/_internal/test/property/arbitraries/unique_identifier_arb.ts +1 -0
  377. package/src/exports/experimental/_internal/test/property/are_params_correctly_ordered.ts +1 -0
  378. package/src/exports/experimental/_internal/test/property/test.ts +1 -0
  379. package/src/exports/experimental/_internal/test/property.ts +1 -0
  380. package/src/exports/experimental/_internal/test/set_experimental.ts +1 -0
  381. package/src/exports/experimental/_internal.ts +8 -0
  382. package/src/exports/experimental/http_client.ts +1 -0
  383. package/src/exports/experimental.ts +3 -0
  384. package/src/stable/build/commands/build/candid_and_method_meta/execute.ts +134 -0
  385. package/src/stable/build/commands/build/candid_and_method_meta/index.ts +27 -0
  386. package/src/stable/build/commands/build/get_context.ts +79 -0
  387. package/src/stable/build/commands/build/index.ts +48 -0
  388. package/src/stable/build/commands/build/javascript.ts +259 -0
  389. package/src/stable/build/commands/build/wasm_binary/compile.ts +27 -0
  390. package/src/stable/build/commands/build/wasm_binary/index.ts +30 -0
  391. package/src/stable/build/commands/build/wasm_binary/manipulate.ts +268 -0
  392. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/Cargo.toml +23 -0
  393. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/benchmarking.rs +45 -0
  394. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/candid_and_method_meta.rs +49 -0
  395. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/execute_method_js.rs +65 -0
  396. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/guards.rs +11 -0
  397. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/accept_message.rs +6 -0
  398. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/call_raw.rs +362 -0
  399. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/candid_decode.rs +18 -0
  400. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/candid_encode.rs +19 -0
  401. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/canister_cycle_balance.rs +8 -0
  402. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/canister_self.rs +8 -0
  403. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/canister_version.rs +8 -0
  404. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/certified_data_set.rs +8 -0
  405. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/clear_timer.rs +15 -0
  406. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/cycles_burn.rs +17 -0
  407. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/data_certificate.rs +13 -0
  408. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/debug_print.rs +8 -0
  409. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/drain_microtasks.rs +22 -0
  410. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/in_replicated_execution.rs +6 -0
  411. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/is_controller.rs +11 -0
  412. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/mod.rs +219 -0
  413. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_arg_data.rs +8 -0
  414. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_caller.rs +8 -0
  415. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_cycles_accept.rs +17 -0
  416. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_cycles_available.rs +8 -0
  417. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_cycles_refunded.rs +8 -0
  418. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_method_name.rs +6 -0
  419. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reject.rs +6 -0
  420. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reject_code.rs +6 -0
  421. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reject_msg.rs +6 -0
  422. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/msg_reply.rs +8 -0
  423. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/notify_raw.rs +62 -0
  424. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/performance_counter.rs +17 -0
  425. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/rand_bytes.rs +21 -0
  426. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/rand_seed.rs +26 -0
  427. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/set_timer.rs +92 -0
  428. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/set_timer_interval.rs +62 -0
  429. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_contains_key.rs +18 -0
  430. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_get.rs +21 -0
  431. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_init.rs +19 -0
  432. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_insert.rs +44 -0
  433. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_is_empty.rs +11 -0
  434. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_items.rs +48 -0
  435. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_keys.rs +43 -0
  436. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_len.rs +16 -0
  437. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_remove.rs +21 -0
  438. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/stable_b_tree_map_values.rs +43 -0
  439. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/time.rs +8 -0
  440. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/ic/trap.rs +22 -0
  441. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/init_and_post_upgrade.rs +98 -0
  442. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/initialize_context.rs +102 -0
  443. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/internal_canister_methods.rs +122 -0
  444. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/lib.rs +39 -0
  445. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/call_with_error_handling.rs +26 -0
  446. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/error.rs +27 -0
  447. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/mod.rs +7 -0
  448. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/rquickjs_utils/with_ctx.rs +24 -0
  449. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/stable_b_tree_map.rs +84 -0
  450. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/state.rs +55 -0
  451. package/src/stable/build/commands/build/wasm_binary/rust/stable_canister_template/src/wasm_binary_manipulation.rs +296 -0
  452. package/src/stable/build/commands/clean.ts +15 -0
  453. package/src/stable/build/commands/dev/audit.ts +39 -0
  454. package/src/stable/build/commands/dev/setup/index.ts +41 -0
  455. package/src/stable/build/commands/dev/setup/install_cargo-audit.sh +11 -0
  456. package/src/stable/build/commands/dev/setup/install_cargo-auditable.sh +16 -0
  457. package/src/stable/build/commands/dev/setup/install_cargo-bundle-licenses.sh +11 -0
  458. package/src/stable/build/commands/dev/setup/install_cargo-deny.sh +11 -0
  459. package/src/stable/build/commands/dev/setup/install_dfx.sh +36 -0
  460. package/src/stable/build/commands/dev/setup/install_node.sh +25 -0
  461. package/src/stable/build/commands/dev/setup/install_rust.sh +24 -0
  462. package/src/stable/build/commands/dev/setup/install_wasi2ic.sh +11 -0
  463. package/src/stable/build/commands/dev/template/experimental.ts +28 -0
  464. package/src/stable/build/commands/dev/template/generate_licenses.ts +28 -0
  465. package/src/stable/build/commands/dev/template/stable.ts +27 -0
  466. package/src/stable/build/commands/extension/install.ts +25 -0
  467. package/src/stable/build/commands/generate/index.ts +21 -0
  468. package/src/stable/build/commands/generate/rust/candid_to_ts_js/Cargo.toml +12 -0
  469. package/src/stable/build/commands/generate/rust/candid_to_ts_js/build.sh +9 -0
  470. package/src/stable/build/commands/generate/rust/candid_to_ts_js/licenses.md +1 -0
  471. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js.d.ts +18 -0
  472. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js.js +144 -0
  473. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js_bg.wasm +0 -0
  474. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/candid_to_ts_js_bg.wasm.d.ts +9 -0
  475. package/src/stable/build/commands/generate/rust/candid_to_ts_js/pkg/package.json +11 -0
  476. package/src/stable/build/commands/generate/rust/candid_to_ts_js/src/lib.rs +31 -0
  477. package/src/stable/build/commands/new.ts +165 -0
  478. package/src/stable/build/commands/version.ts +5 -0
  479. package/src/stable/build/dfx_extension/extension.json +36 -0
  480. package/src/stable/build/dfx_extension/install.sh +10 -0
  481. package/src/stable/build/index.ts +282 -0
  482. package/src/stable/build/utils/dfx.ts +10 -0
  483. package/src/stable/build/utils/dfx_root.ts +34 -0
  484. package/src/stable/build/utils/exec_sync_pretty.ts +17 -0
  485. package/src/stable/build/utils/experimental_message.ts +19 -0
  486. package/src/stable/build/utils/get_canister_config.ts +52 -0
  487. package/src/stable/build/utils/global_paths.ts +26 -0
  488. package/src/stable/build/utils/types.ts +87 -0
  489. package/src/stable/lib/canister_methods/heartbeat.ts +29 -0
  490. package/src/stable/lib/canister_methods/index.ts +405 -0
  491. package/src/stable/lib/canister_methods/init.ts +71 -0
  492. package/src/stable/lib/canister_methods/inspect_message.ts +79 -0
  493. package/src/stable/lib/canister_methods/on_low_wasm_memory.ts +27 -0
  494. package/src/stable/lib/canister_methods/post_upgrade.ts +73 -0
  495. package/src/stable/lib/canister_methods/pre_upgrade.ts +27 -0
  496. package/src/stable/lib/canister_methods/query.ts +69 -0
  497. package/src/stable/lib/canister_methods/update.ts +66 -0
  498. package/src/stable/lib/canisters/NOTICE +15 -0
  499. package/src/stable/lib/canisters/ck_btc_ledger/idl/README.md +9 -0
  500. package/src/stable/lib/canisters/ck_btc_ledger/idl/index.did +289 -0
  501. package/src/stable/lib/canisters/ck_btc_ledger/idl/index.ts +1143 -0
  502. package/src/stable/lib/canisters/ck_eth_ledger/idl/README.md +9 -0
  503. package/src/stable/lib/canisters/ck_eth_ledger/idl/index.did +289 -0
  504. package/src/stable/lib/canisters/ck_eth_ledger/idl/index.ts +1143 -0
  505. package/src/stable/lib/canisters/cycles_ledger/idl/README.md +9 -0
  506. package/src/stable/lib/canisters/cycles_ledger/idl/index.did +272 -0
  507. package/src/stable/lib/canisters/cycles_ledger/idl/index.ts +978 -0
  508. package/src/stable/lib/canisters/evm_rpc/idl/README.md +9 -0
  509. package/src/stable/lib/canisters/evm_rpc/idl/index.did +311 -0
  510. package/src/stable/lib/canisters/evm_rpc/idl/index.ts +1028 -0
  511. package/src/stable/lib/canisters/exchange_rate/idl/README.md +9 -0
  512. package/src/stable/lib/canisters/exchange_rate/idl/index.did +83 -0
  513. package/src/stable/lib/canisters/exchange_rate/idl/index.ts +165 -0
  514. package/src/stable/lib/canisters/http_gateway/idl/README.md +9 -0
  515. package/src/stable/lib/canisters/http_gateway/idl/http-gateway.did +49 -0
  516. package/src/stable/lib/canisters/http_gateway/idl/index.ts +120 -0
  517. package/src/stable/lib/canisters/icrc_1/idl/ICRC-1.did +63 -0
  518. package/src/stable/lib/canisters/icrc_1/idl/LICENSE +202 -0
  519. package/src/stable/lib/canisters/icrc_1/idl/index.ts +151 -0
  520. package/src/stable/lib/canisters/icrc_10/idl/ICRC-10.did +8 -0
  521. package/src/stable/lib/canisters/icrc_10/idl/LICENSE +202 -0
  522. package/src/stable/lib/canisters/icrc_10/idl/index.ts +32 -0
  523. package/src/stable/lib/canisters/icrc_2/idl/ICRC-2.did +76 -0
  524. package/src/stable/lib/canisters/icrc_2/idl/LICENSE +202 -0
  525. package/src/stable/lib/canisters/icrc_2/idl/index.ts +226 -0
  526. package/src/stable/lib/canisters/icrc_3/idl/ICRC-3.did +59 -0
  527. package/src/stable/lib/canisters/icrc_3/idl/LICENSE +202 -0
  528. package/src/stable/lib/canisters/icrc_3/idl/index.ts +156 -0
  529. package/src/stable/lib/canisters/icrc_37/idl/ICRC-37.did +152 -0
  530. package/src/stable/lib/canisters/icrc_37/idl/LICENSE +202 -0
  531. package/src/stable/lib/canisters/icrc_37/idl/index.ts +466 -0
  532. package/src/stable/lib/canisters/icrc_7/idl/ICRC-7.did +67 -0
  533. package/src/stable/lib/canisters/icrc_7/idl/LICENSE +202 -0
  534. package/src/stable/lib/canisters/icrc_7/idl/index.ts +213 -0
  535. package/src/stable/lib/canisters/llm/idl/README.md +9 -0
  536. package/src/stable/lib/canisters/llm/idl/index.did +21 -0
  537. package/src/stable/lib/canisters/llm/idl/index.ts +43 -0
  538. package/src/stable/lib/canisters/management/idl/README.md +10 -0
  539. package/src/stable/lib/canisters/management/idl/ic.did +502 -0
  540. package/src/stable/lib/canisters/management/idl/index.ts +1257 -0
  541. package/src/stable/lib/canisters/nns_cycles_minting/idl/README.md +9 -0
  542. package/src/stable/lib/canisters/nns_cycles_minting/idl/index.did +241 -0
  543. package/src/stable/lib/canisters/nns_cycles_minting/idl/index.ts +394 -0
  544. package/src/stable/lib/canisters/nns_governance/idl/README.md +9 -0
  545. package/src/stable/lib/canisters/nns_governance/idl/index.did +1316 -0
  546. package/src/stable/lib/canisters/nns_governance/idl/index.ts +3599 -0
  547. package/src/stable/lib/canisters/nns_icp_ledger/idl/LICENSE +202 -0
  548. package/src/stable/lib/canisters/nns_icp_ledger/idl/NOTICE +14 -0
  549. package/src/stable/lib/canisters/nns_icp_ledger/idl/README.md +18 -0
  550. package/src/stable/lib/canisters/nns_icp_ledger/idl/address/index.ts +82 -0
  551. package/src/stable/lib/canisters/nns_icp_ledger/idl/index.did +264 -0
  552. package/src/stable/lib/canisters/nns_icp_ledger/idl/index.ts +1020 -0
  553. package/src/stable/lib/canisters/nns_internet_identity/idl/README.md +9 -0
  554. package/src/stable/lib/canisters/nns_internet_identity/idl/index.did +779 -0
  555. package/src/stable/lib/canisters/nns_internet_identity/idl/index.ts +1509 -0
  556. package/src/stable/lib/canisters/nns_registry/idl/README.md +9 -0
  557. package/src/stable/lib/canisters/nns_registry/idl/index.did +493 -0
  558. package/src/stable/lib/canisters/nns_registry/idl/index.ts +1421 -0
  559. package/src/stable/lib/canisters/nns_sns_w/idl/README.md +9 -0
  560. package/src/stable/lib/canisters/nns_sns_w/idl/index.did +352 -0
  561. package/src/stable/lib/canisters/nns_sns_w/idl/index.ts +887 -0
  562. package/src/stable/lib/did_file/idl_to_string.ts +79 -0
  563. package/src/stable/lib/did_file/index.ts +2 -0
  564. package/src/stable/lib/did_file/visitor/did_visitor.ts +135 -0
  565. package/src/stable/lib/did_file/visitor/escape_candid_name.ts +100 -0
  566. package/src/stable/lib/did_file/visitor/extract_candid.ts +31 -0
  567. package/src/stable/lib/did_file/visitor/index.ts +1 -0
  568. package/src/stable/lib/did_file/visitor/visit/func.ts +31 -0
  569. package/src/stable/lib/did_file/visitor/visit/opt.ts +16 -0
  570. package/src/stable/lib/did_file/visitor/visit/primitive.ts +11 -0
  571. package/src/stable/lib/did_file/visitor/visit/record.ts +24 -0
  572. package/src/stable/lib/did_file/visitor/visit/recursive.ts +32 -0
  573. package/src/stable/lib/did_file/visitor/visit/service.ts +107 -0
  574. package/src/stable/lib/did_file/visitor/visit/tuple.ts +20 -0
  575. package/src/stable/lib/did_file/visitor/visit/variant.ts +26 -0
  576. package/src/stable/lib/did_file/visitor/visit/vec.ts +16 -0
  577. package/src/stable/lib/error.ts +55 -0
  578. package/src/stable/lib/execute_and_reply_with_candid_serde.ts +245 -0
  579. package/src/stable/lib/func.ts +7 -0
  580. package/src/stable/lib/globals.ts +250 -0
  581. package/src/stable/lib/ic_apis/NOTICE +203 -0
  582. package/src/stable/lib/ic_apis/azle_ic_stable.ts +86 -0
  583. package/src/stable/lib/ic_apis/call.ts +397 -0
  584. package/src/stable/lib/ic_apis/candid_decode.ts +26 -0
  585. package/src/stable/lib/ic_apis/candid_encode.ts +27 -0
  586. package/src/stable/lib/ic_apis/canister_cycle_balance.ts +28 -0
  587. package/src/stable/lib/ic_apis/canister_self.ts +25 -0
  588. package/src/stable/lib/ic_apis/canister_version.ts +33 -0
  589. package/src/stable/lib/ic_apis/certified_data_set.ts +35 -0
  590. package/src/stable/lib/ic_apis/chunk.ts +42 -0
  591. package/src/stable/lib/ic_apis/clear_timer.ts +53 -0
  592. package/src/stable/lib/ic_apis/cycles_burn.ts +32 -0
  593. package/src/stable/lib/ic_apis/data_certificate.ts +30 -0
  594. package/src/stable/lib/ic_apis/in_replicated_execution.ts +20 -0
  595. package/src/stable/lib/ic_apis/index.ts +37 -0
  596. package/src/stable/lib/ic_apis/is_controller.ts +31 -0
  597. package/src/stable/lib/ic_apis/msg_arg_data.ts +28 -0
  598. package/src/stable/lib/ic_apis/msg_caller.ts +32 -0
  599. package/src/stable/lib/ic_apis/msg_cycles_accept.ts +27 -0
  600. package/src/stable/lib/ic_apis/msg_cycles_available.ts +25 -0
  601. package/src/stable/lib/ic_apis/msg_cycles_refunded.ts +25 -0
  602. package/src/stable/lib/ic_apis/msg_method_name.ts +21 -0
  603. package/src/stable/lib/ic_apis/msg_reject.ts +28 -0
  604. package/src/stable/lib/ic_apis/msg_reject_code.ts +40 -0
  605. package/src/stable/lib/ic_apis/msg_reject_msg.ts +24 -0
  606. package/src/stable/lib/ic_apis/msg_reply.ts +34 -0
  607. package/src/stable/lib/ic_apis/performance_counter.ts +31 -0
  608. package/src/stable/lib/ic_apis/rand_seed.ts +40 -0
  609. package/src/stable/lib/ic_apis/set_timer.ts +80 -0
  610. package/src/stable/lib/ic_apis/set_timer_interval.ts +87 -0
  611. package/src/stable/lib/ic_apis/time.ts +26 -0
  612. package/src/stable/lib/ic_apis/trap.ts +29 -0
  613. package/src/stable/lib/index.ts +16 -0
  614. package/src/stable/lib/json.ts +39 -0
  615. package/src/stable/lib/stable_structures/stable_b_tree_map.ts +488 -0
  616. package/src/stable/lib/stable_structures/stable_json.ts +254 -0
  617. package/src/stable/lib/state.ts +322 -0
  618. package/src/stable/test/benchmarks/_azle_get_benchmarks.did +9 -0
  619. package/src/stable/test/benchmarks/index.ts +273 -0
  620. package/src/stable/test/candid_deep_equal.ts +99 -0
  621. package/src/stable/test/canister_names.ts +36 -0
  622. package/src/stable/test/fuzz.ts +102 -0
  623. package/src/stable/test/get_canister_actor.ts +45 -0
  624. package/src/stable/test/global_state.ts +202 -0
  625. package/src/stable/test/index.ts +274 -0
  626. package/src/stable/test/memory_state.ts +187 -0
  627. package/src/stable/test/property/default_prop_test_params.ts +36 -0
  628. package/src/stable/test/type/assert_type.ts +9 -0
  629. package/tsconfig.dev.json +10 -0
@@ -0,0 +1,3599 @@
1
+ import { ActorMethod } from '@dfinity/agent';
2
+ import { IDL } from '@dfinity/candid';
3
+ import { Principal } from '@dfinity/principal';
4
+
5
+ export interface AccountIdentifier {
6
+ hash: Uint8Array | number[];
7
+ }
8
+ export type Action =
9
+ | { RegisterKnownNeuron: KnownNeuron }
10
+ | { ManageNeuron: ManageNeuron }
11
+ | { UpdateCanisterSettings: UpdateCanisterSettings }
12
+ | { InstallCode: InstallCode }
13
+ | { StopOrStartCanister: StopOrStartCanister }
14
+ | { CreateServiceNervousSystem: CreateServiceNervousSystem }
15
+ | { ExecuteNnsFunction: ExecuteNnsFunction }
16
+ | { RewardNodeProvider: RewardNodeProvider }
17
+ | { OpenSnsTokenSwap: OpenSnsTokenSwap }
18
+ | { SetSnsTokenSwapOpenTimeWindow: SetSnsTokenSwapOpenTimeWindow }
19
+ | { SetDefaultFollowees: SetDefaultFollowees }
20
+ | { RewardNodeProviders: RewardNodeProviders }
21
+ | { ManageNetworkEconomics: NetworkEconomics }
22
+ | { ApproveGenesisKyc: Principals }
23
+ | { AddOrRemoveNodeProvider: AddOrRemoveNodeProvider }
24
+ | { Motion: Motion };
25
+ export interface AddHotKey {
26
+ new_hot_key: [] | [Principal];
27
+ }
28
+ export interface AddOrRemoveNodeProvider {
29
+ change: [] | [Change];
30
+ }
31
+ export interface Amount {
32
+ e8s: bigint;
33
+ }
34
+ export interface ApproveGenesisKyc {
35
+ principals: Array<Principal>;
36
+ }
37
+ export interface Ballot {
38
+ vote: number;
39
+ voting_power: bigint;
40
+ }
41
+ export interface BallotInfo {
42
+ vote: number;
43
+ proposal_id: [] | [ProposalId];
44
+ }
45
+ export type By =
46
+ | { NeuronIdOrSubaccount: {} }
47
+ | { MemoAndController: ClaimOrRefreshNeuronFromAccount }
48
+ | { Memo: bigint };
49
+ export interface Canister {
50
+ id: [] | [Principal];
51
+ }
52
+ export interface CanisterSettings {
53
+ freezing_threshold: [] | [bigint];
54
+ wasm_memory_threshold: [] | [bigint];
55
+ controllers: [] | [Controllers];
56
+ log_visibility: [] | [number];
57
+ wasm_memory_limit: [] | [bigint];
58
+ memory_allocation: [] | [bigint];
59
+ compute_allocation: [] | [bigint];
60
+ }
61
+ export interface CanisterStatusResultV2 {
62
+ status: [] | [number];
63
+ freezing_threshold: [] | [bigint];
64
+ controllers: Array<Principal>;
65
+ memory_size: [] | [bigint];
66
+ cycles: [] | [bigint];
67
+ idle_cycles_burned_per_day: [] | [bigint];
68
+ module_hash: Uint8Array | number[];
69
+ }
70
+ export interface CanisterSummary {
71
+ status: [] | [CanisterStatusResultV2];
72
+ canister_id: [] | [Principal];
73
+ }
74
+ export type Change = { ToRemove: NodeProvider } | { ToAdd: NodeProvider };
75
+ export interface ChangeAutoStakeMaturity {
76
+ requested_setting_for_auto_stake_maturity: boolean;
77
+ }
78
+ export interface ClaimOrRefresh {
79
+ by: [] | [By];
80
+ }
81
+ export interface ClaimOrRefreshNeuronFromAccount {
82
+ controller: [] | [Principal];
83
+ memo: bigint;
84
+ }
85
+ export interface ClaimOrRefreshNeuronFromAccountResponse {
86
+ result: [] | [Result_1];
87
+ }
88
+ export interface ClaimOrRefreshResponse {
89
+ refreshed_neuron_id: [] | [NeuronId];
90
+ }
91
+ export type Command =
92
+ | { Spawn: Spawn }
93
+ | { Split: Split }
94
+ | { Follow: Follow }
95
+ | { RefreshVotingPower: RefreshVotingPower }
96
+ | { ClaimOrRefresh: ClaimOrRefresh }
97
+ | { Configure: Configure }
98
+ | { RegisterVote: RegisterVote }
99
+ | { Merge: Merge }
100
+ | { DisburseToNeuron: DisburseToNeuron }
101
+ | { MakeProposal: Proposal }
102
+ | { StakeMaturity: StakeMaturity }
103
+ | { MergeMaturity: MergeMaturity }
104
+ | { Disburse: Disburse };
105
+ export type Command_1 =
106
+ | { Error: GovernanceError }
107
+ | { Spawn: SpawnResponse }
108
+ | { Split: SpawnResponse }
109
+ | { Follow: {} }
110
+ | { RefreshVotingPower: RefreshVotingPowerResponse }
111
+ | { ClaimOrRefresh: ClaimOrRefreshResponse }
112
+ | { Configure: {} }
113
+ | { RegisterVote: {} }
114
+ | { Merge: MergeResponse }
115
+ | { DisburseToNeuron: SpawnResponse }
116
+ | { MakeProposal: MakeProposalResponse }
117
+ | { StakeMaturity: StakeMaturityResponse }
118
+ | { MergeMaturity: MergeMaturityResponse }
119
+ | { Disburse: DisburseResponse };
120
+ export type Command_2 =
121
+ | { Spawn: NeuronId }
122
+ | { Split: Split }
123
+ | { Configure: Configure }
124
+ | { Merge: Merge }
125
+ | { DisburseToNeuron: DisburseToNeuron }
126
+ | { SyncCommand: {} }
127
+ | { ClaimOrRefreshNeuron: ClaimOrRefresh }
128
+ | { MergeMaturity: MergeMaturity }
129
+ | { Disburse: Disburse };
130
+ export interface Committed {
131
+ total_direct_contribution_icp_e8s: [] | [bigint];
132
+ total_neurons_fund_contribution_icp_e8s: [] | [bigint];
133
+ sns_governance_canister_id: [] | [Principal];
134
+ }
135
+ export interface Committed_1 {
136
+ total_direct_participation_icp_e8s: [] | [bigint];
137
+ total_neurons_fund_participation_icp_e8s: [] | [bigint];
138
+ sns_governance_canister_id: [] | [Principal];
139
+ }
140
+ export interface Configure {
141
+ operation: [] | [Operation];
142
+ }
143
+ export interface Controllers {
144
+ controllers: Array<Principal>;
145
+ }
146
+ export interface Countries {
147
+ iso_codes: Array<string>;
148
+ }
149
+ export interface CreateServiceNervousSystem {
150
+ url: [] | [string];
151
+ governance_parameters: [] | [GovernanceParameters];
152
+ fallback_controller_principal_ids: Array<Principal>;
153
+ logo: [] | [Image];
154
+ name: [] | [string];
155
+ ledger_parameters: [] | [LedgerParameters];
156
+ description: [] | [string];
157
+ dapp_canisters: Array<Canister>;
158
+ swap_parameters: [] | [SwapParameters];
159
+ initial_token_distribution: [] | [InitialTokenDistribution];
160
+ }
161
+ export interface DateRangeFilter {
162
+ start_timestamp_seconds: [] | [bigint];
163
+ end_timestamp_seconds: [] | [bigint];
164
+ }
165
+ export interface Decimal {
166
+ human_readable: [] | [string];
167
+ }
168
+ export interface DerivedProposalInformation {
169
+ swap_background_information: [] | [SwapBackgroundInformation];
170
+ }
171
+ export interface DeveloperDistribution {
172
+ developer_neurons: Array<NeuronDistribution>;
173
+ }
174
+ export interface Disburse {
175
+ to_account: [] | [AccountIdentifier];
176
+ amount: [] | [Amount];
177
+ }
178
+ export interface DisburseResponse {
179
+ transfer_block_height: bigint;
180
+ }
181
+ export interface DisburseToNeuron {
182
+ dissolve_delay_seconds: bigint;
183
+ kyc_verified: boolean;
184
+ amount_e8s: bigint;
185
+ new_controller: [] | [Principal];
186
+ nonce: bigint;
187
+ }
188
+ export type DissolveState =
189
+ | { DissolveDelaySeconds: bigint }
190
+ | { WhenDissolvedTimestampSeconds: bigint };
191
+ export interface Duration {
192
+ seconds: [] | [bigint];
193
+ }
194
+ export interface ExecuteNnsFunction {
195
+ nns_function: number;
196
+ payload: Uint8Array | number[];
197
+ }
198
+ export interface Follow {
199
+ topic: number;
200
+ followees: Array<NeuronId>;
201
+ }
202
+ export interface Followees {
203
+ followees: Array<NeuronId>;
204
+ }
205
+ export interface Followers {
206
+ followers: Array<NeuronId>;
207
+ }
208
+ export interface FollowersMap {
209
+ followers_map: Array<[bigint, Followers]>;
210
+ }
211
+ export interface GetNeuronsFundAuditInfoRequest {
212
+ nns_proposal_id: [] | [ProposalId];
213
+ }
214
+ export interface GetNeuronsFundAuditInfoResponse {
215
+ result: [] | [Result_6];
216
+ }
217
+ export interface GlobalTimeOfDay {
218
+ seconds_after_utc_midnight: [] | [bigint];
219
+ }
220
+ export interface Governance {
221
+ default_followees: Array<[number, Followees]>;
222
+ making_sns_proposal: [] | [MakingSnsProposal];
223
+ most_recent_monthly_node_provider_rewards:
224
+ | []
225
+ | [MonthlyNodeProviderRewards];
226
+ maturity_modulation_last_updated_at_timestamp_seconds: [] | [bigint];
227
+ wait_for_quiet_threshold_seconds: bigint;
228
+ metrics: [] | [GovernanceCachedMetrics];
229
+ neuron_management_voting_period_seconds: [] | [bigint];
230
+ node_providers: Array<NodeProvider>;
231
+ cached_daily_maturity_modulation_basis_points: [] | [number];
232
+ economics: [] | [NetworkEconomics];
233
+ restore_aging_summary: [] | [RestoreAgingSummary];
234
+ spawning_neurons: [] | [boolean];
235
+ latest_reward_event: [] | [RewardEvent];
236
+ to_claim_transfers: Array<NeuronStakeTransfer>;
237
+ short_voting_period_seconds: bigint;
238
+ topic_followee_index: Array<[number, FollowersMap]>;
239
+ migrations: [] | [Migrations];
240
+ proposals: Array<[bigint, ProposalData]>;
241
+ xdr_conversion_rate: [] | [XdrConversionRate];
242
+ in_flight_commands: Array<[bigint, NeuronInFlightCommand]>;
243
+ neurons: Array<[bigint, Neuron]>;
244
+ genesis_timestamp_seconds: bigint;
245
+ }
246
+ export interface GovernanceCachedMetrics {
247
+ total_maturity_e8s_equivalent: bigint;
248
+ not_dissolving_neurons_e8s_buckets: Array<[bigint, number]>;
249
+ dissolving_neurons_staked_maturity_e8s_equivalent_sum: bigint;
250
+ garbage_collectable_neurons_count: bigint;
251
+ dissolving_neurons_staked_maturity_e8s_equivalent_buckets: Array<
252
+ [bigint, number]
253
+ >;
254
+ neurons_with_invalid_stake_count: bigint;
255
+ not_dissolving_neurons_count_buckets: Array<[bigint, bigint]>;
256
+ ect_neuron_count: bigint;
257
+ total_supply_icp: bigint;
258
+ neurons_with_less_than_6_months_dissolve_delay_count: bigint;
259
+ dissolved_neurons_count: bigint;
260
+ community_fund_total_maturity_e8s_equivalent: bigint;
261
+ total_staked_e8s_seed: bigint;
262
+ total_staked_maturity_e8s_equivalent_ect: bigint;
263
+ total_staked_e8s: bigint;
264
+ fully_lost_voting_power_neuron_subset_metrics: [] | [NeuronSubsetMetrics];
265
+ not_dissolving_neurons_count: bigint;
266
+ total_locked_e8s: bigint;
267
+ neurons_fund_total_active_neurons: bigint;
268
+ total_voting_power_non_self_authenticating_controller: [] | [bigint];
269
+ total_staked_maturity_e8s_equivalent: bigint;
270
+ not_dissolving_neurons_e8s_buckets_ect: Array<[bigint, number]>;
271
+ declining_voting_power_neuron_subset_metrics: [] | [NeuronSubsetMetrics];
272
+ total_staked_e8s_ect: bigint;
273
+ not_dissolving_neurons_staked_maturity_e8s_equivalent_sum: bigint;
274
+ dissolved_neurons_e8s: bigint;
275
+ total_staked_e8s_non_self_authenticating_controller: [] | [bigint];
276
+ dissolving_neurons_e8s_buckets_seed: Array<[bigint, number]>;
277
+ neurons_with_less_than_6_months_dissolve_delay_e8s: bigint;
278
+ not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets: Array<
279
+ [bigint, number]
280
+ >;
281
+ dissolving_neurons_count_buckets: Array<[bigint, bigint]>;
282
+ dissolving_neurons_e8s_buckets_ect: Array<[bigint, number]>;
283
+ non_self_authenticating_controller_neuron_subset_metrics:
284
+ | []
285
+ | [NeuronSubsetMetrics];
286
+ dissolving_neurons_count: bigint;
287
+ dissolving_neurons_e8s_buckets: Array<[bigint, number]>;
288
+ total_staked_maturity_e8s_equivalent_seed: bigint;
289
+ community_fund_total_staked_e8s: bigint;
290
+ not_dissolving_neurons_e8s_buckets_seed: Array<[bigint, number]>;
291
+ public_neuron_subset_metrics: [] | [NeuronSubsetMetrics];
292
+ timestamp_seconds: bigint;
293
+ seed_neuron_count: bigint;
294
+ }
295
+ export interface GovernanceError {
296
+ error_message: string;
297
+ error_type: number;
298
+ }
299
+ export interface GovernanceParameters {
300
+ neuron_maximum_dissolve_delay_bonus: [] | [Percentage];
301
+ neuron_maximum_age_for_age_bonus: [] | [Duration];
302
+ neuron_maximum_dissolve_delay: [] | [Duration];
303
+ neuron_minimum_dissolve_delay_to_vote: [] | [Duration];
304
+ neuron_maximum_age_bonus: [] | [Percentage];
305
+ neuron_minimum_stake: [] | [Tokens];
306
+ proposal_wait_for_quiet_deadline_increase: [] | [Duration];
307
+ proposal_initial_voting_period: [] | [Duration];
308
+ proposal_rejection_fee: [] | [Tokens];
309
+ voting_reward_parameters: [] | [VotingRewardParameters];
310
+ }
311
+ export interface IdealMatchedParticipationFunction {
312
+ serialized_representation: [] | [string];
313
+ }
314
+ export interface Image {
315
+ base64_encoding: [] | [string];
316
+ }
317
+ export interface IncreaseDissolveDelay {
318
+ additional_dissolve_delay_seconds: number;
319
+ }
320
+ export interface InitialTokenDistribution {
321
+ treasury_distribution: [] | [SwapDistribution];
322
+ developer_distribution: [] | [DeveloperDistribution];
323
+ swap_distribution: [] | [SwapDistribution];
324
+ }
325
+ export interface InstallCode {
326
+ skip_stopping_before_installing: [] | [boolean];
327
+ wasm_module_hash: [] | [Uint8Array | number[]];
328
+ canister_id: [] | [Principal];
329
+ arg_hash: [] | [Uint8Array | number[]];
330
+ install_mode: [] | [number];
331
+ }
332
+ export interface InstallCodeRequest {
333
+ arg: [] | [Uint8Array | number[]];
334
+ wasm_module: [] | [Uint8Array | number[]];
335
+ skip_stopping_before_installing: [] | [boolean];
336
+ canister_id: [] | [Principal];
337
+ install_mode: [] | [number];
338
+ }
339
+ export interface KnownNeuron {
340
+ id: [] | [NeuronId];
341
+ known_neuron_data: [] | [KnownNeuronData];
342
+ }
343
+ export interface KnownNeuronData {
344
+ name: string;
345
+ description: [] | [string];
346
+ }
347
+ export interface LedgerParameters {
348
+ transaction_fee: [] | [Tokens];
349
+ token_symbol: [] | [string];
350
+ token_logo: [] | [Image];
351
+ token_name: [] | [string];
352
+ }
353
+ export interface ListKnownNeuronsResponse {
354
+ known_neurons: Array<KnownNeuron>;
355
+ }
356
+ export interface ListNeurons {
357
+ page_size: [] | [bigint];
358
+ include_public_neurons_in_full_neurons: [] | [boolean];
359
+ neuron_ids: BigUint64Array | bigint[];
360
+ page_number: [] | [bigint];
361
+ include_empty_neurons_readable_by_caller: [] | [boolean];
362
+ neuron_subaccounts: [] | [Array<NeuronSubaccount>];
363
+ include_neurons_readable_by_caller: boolean;
364
+ }
365
+ export interface ListNeuronsResponse {
366
+ neuron_infos: Array<[bigint, NeuronInfo]>;
367
+ full_neurons: Array<Neuron>;
368
+ total_pages_available: [] | [bigint];
369
+ }
370
+ export interface ListNodeProviderRewardsRequest {
371
+ date_filter: [] | [DateRangeFilter];
372
+ }
373
+ export interface ListNodeProviderRewardsResponse {
374
+ rewards: Array<MonthlyNodeProviderRewards>;
375
+ }
376
+ export interface ListNodeProvidersResponse {
377
+ node_providers: Array<NodeProvider>;
378
+ }
379
+ export interface ListProposalInfo {
380
+ include_reward_status: Int32Array | number[];
381
+ omit_large_fields: [] | [boolean];
382
+ before_proposal: [] | [ProposalId];
383
+ limit: number;
384
+ exclude_topic: Int32Array | number[];
385
+ include_all_manage_neuron_proposals: [] | [boolean];
386
+ include_status: Int32Array | number[];
387
+ }
388
+ export interface ListProposalInfoResponse {
389
+ proposal_info: Array<ProposalInfo>;
390
+ }
391
+ export interface MakeProposalRequest {
392
+ url: string;
393
+ title: [] | [string];
394
+ action: [] | [ProposalActionRequest];
395
+ summary: string;
396
+ }
397
+ export interface MakeProposalResponse {
398
+ message: [] | [string];
399
+ proposal_id: [] | [ProposalId];
400
+ }
401
+ export interface MakingSnsProposal {
402
+ proposal: [] | [Proposal];
403
+ caller: [] | [Principal];
404
+ proposer_id: [] | [NeuronId];
405
+ }
406
+ export interface ManageNeuron {
407
+ id: [] | [NeuronId];
408
+ command: [] | [Command];
409
+ neuron_id_or_subaccount: [] | [NeuronIdOrSubaccount];
410
+ }
411
+ export type ManageNeuronCommandRequest =
412
+ | { Spawn: Spawn }
413
+ | { Split: Split }
414
+ | { Follow: Follow }
415
+ | { RefreshVotingPower: RefreshVotingPower }
416
+ | { ClaimOrRefresh: ClaimOrRefresh }
417
+ | { Configure: Configure }
418
+ | { RegisterVote: RegisterVote }
419
+ | { Merge: Merge }
420
+ | { DisburseToNeuron: DisburseToNeuron }
421
+ | { MakeProposal: MakeProposalRequest }
422
+ | { StakeMaturity: StakeMaturity }
423
+ | { MergeMaturity: MergeMaturity }
424
+ | { Disburse: Disburse };
425
+ export interface ManageNeuronRequest {
426
+ id: [] | [NeuronId];
427
+ command: [] | [ManageNeuronCommandRequest];
428
+ neuron_id_or_subaccount: [] | [NeuronIdOrSubaccount];
429
+ }
430
+ export interface ManageNeuronResponse {
431
+ command: [] | [Command_1];
432
+ }
433
+ export interface Merge {
434
+ source_neuron_id: [] | [NeuronId];
435
+ }
436
+ export interface MergeMaturity {
437
+ percentage_to_merge: number;
438
+ }
439
+ export interface MergeMaturityResponse {
440
+ merged_maturity_e8s: bigint;
441
+ new_stake_e8s: bigint;
442
+ }
443
+ export interface MergeResponse {
444
+ target_neuron: [] | [Neuron];
445
+ source_neuron: [] | [Neuron];
446
+ target_neuron_info: [] | [NeuronInfo];
447
+ source_neuron_info: [] | [NeuronInfo];
448
+ }
449
+ export interface Migration {
450
+ status: [] | [number];
451
+ failure_reason: [] | [string];
452
+ progress: [] | [Progress];
453
+ }
454
+ export interface Migrations {
455
+ neuron_indexes_migration: [] | [Migration];
456
+ copy_inactive_neurons_to_stable_memory_migration: [] | [Migration];
457
+ }
458
+ export interface MonthlyNodeProviderRewards {
459
+ minimum_xdr_permyriad_per_icp: [] | [bigint];
460
+ registry_version: [] | [bigint];
461
+ node_providers: Array<NodeProvider>;
462
+ timestamp: bigint;
463
+ rewards: Array<RewardNodeProvider>;
464
+ xdr_conversion_rate: [] | [XdrConversionRate];
465
+ maximum_node_provider_rewards_e8s: [] | [bigint];
466
+ }
467
+ export interface Motion {
468
+ motion_text: string;
469
+ }
470
+ export interface NetworkEconomics {
471
+ neuron_minimum_stake_e8s: bigint;
472
+ voting_power_economics: [] | [VotingPowerEconomics];
473
+ max_proposals_to_keep_per_topic: number;
474
+ neuron_management_fee_per_proposal_e8s: bigint;
475
+ reject_cost_e8s: bigint;
476
+ transaction_fee_e8s: bigint;
477
+ neuron_spawn_dissolve_delay_seconds: bigint;
478
+ minimum_icp_xdr_rate: bigint;
479
+ maximum_node_provider_rewards_e8s: bigint;
480
+ neurons_fund_economics: [] | [NeuronsFundEconomics];
481
+ }
482
+ export interface Neuron {
483
+ id: [] | [NeuronId];
484
+ staked_maturity_e8s_equivalent: [] | [bigint];
485
+ controller: [] | [Principal];
486
+ recent_ballots: Array<BallotInfo>;
487
+ voting_power_refreshed_timestamp_seconds: [] | [bigint];
488
+ kyc_verified: boolean;
489
+ potential_voting_power: [] | [bigint];
490
+ neuron_type: [] | [number];
491
+ not_for_profit: boolean;
492
+ maturity_e8s_equivalent: bigint;
493
+ deciding_voting_power: [] | [bigint];
494
+ cached_neuron_stake_e8s: bigint;
495
+ created_timestamp_seconds: bigint;
496
+ auto_stake_maturity: [] | [boolean];
497
+ aging_since_timestamp_seconds: bigint;
498
+ hot_keys: Array<Principal>;
499
+ account: Uint8Array | number[];
500
+ joined_community_fund_timestamp_seconds: [] | [bigint];
501
+ dissolve_state: [] | [DissolveState];
502
+ followees: Array<[number, Followees]>;
503
+ neuron_fees_e8s: bigint;
504
+ visibility: [] | [number];
505
+ transfer: [] | [NeuronStakeTransfer];
506
+ known_neuron_data: [] | [KnownNeuronData];
507
+ spawn_at_timestamp_seconds: [] | [bigint];
508
+ }
509
+ export interface NeuronBasketConstructionParameters {
510
+ dissolve_delay_interval: [] | [Duration];
511
+ count: [] | [bigint];
512
+ }
513
+ export interface NeuronBasketConstructionParameters_1 {
514
+ dissolve_delay_interval_seconds: bigint;
515
+ count: bigint;
516
+ }
517
+ export interface NeuronDistribution {
518
+ controller: [] | [Principal];
519
+ dissolve_delay: [] | [Duration];
520
+ memo: [] | [bigint];
521
+ vesting_period: [] | [Duration];
522
+ stake: [] | [Tokens];
523
+ }
524
+ export interface NeuronId {
525
+ id: bigint;
526
+ }
527
+ export type NeuronIdOrSubaccount =
528
+ | { Subaccount: Uint8Array | number[] }
529
+ | { NeuronId: NeuronId };
530
+ export interface NeuronInFlightCommand {
531
+ command: [] | [Command_2];
532
+ timestamp: bigint;
533
+ }
534
+ export interface NeuronInfo {
535
+ dissolve_delay_seconds: bigint;
536
+ recent_ballots: Array<BallotInfo>;
537
+ voting_power_refreshed_timestamp_seconds: [] | [bigint];
538
+ potential_voting_power: [] | [bigint];
539
+ neuron_type: [] | [number];
540
+ deciding_voting_power: [] | [bigint];
541
+ created_timestamp_seconds: bigint;
542
+ state: number;
543
+ stake_e8s: bigint;
544
+ joined_community_fund_timestamp_seconds: [] | [bigint];
545
+ retrieved_at_timestamp_seconds: bigint;
546
+ visibility: [] | [number];
547
+ known_neuron_data: [] | [KnownNeuronData];
548
+ voting_power: bigint;
549
+ age_seconds: bigint;
550
+ }
551
+ export interface NeuronStakeTransfer {
552
+ to_subaccount: Uint8Array | number[];
553
+ neuron_stake_e8s: bigint;
554
+ from: [] | [Principal];
555
+ memo: bigint;
556
+ from_subaccount: Uint8Array | number[];
557
+ transfer_timestamp: bigint;
558
+ block_height: bigint;
559
+ }
560
+ export interface NeuronSubaccount {
561
+ subaccount: Uint8Array | number[];
562
+ }
563
+ export interface NeuronSubsetMetrics {
564
+ total_maturity_e8s_equivalent: [] | [bigint];
565
+ maturity_e8s_equivalent_buckets: Array<[bigint, bigint]>;
566
+ voting_power_buckets: Array<[bigint, bigint]>;
567
+ total_staked_e8s: [] | [bigint];
568
+ count: [] | [bigint];
569
+ deciding_voting_power_buckets: Array<[bigint, bigint]>;
570
+ total_staked_maturity_e8s_equivalent: [] | [bigint];
571
+ total_potential_voting_power: [] | [bigint];
572
+ total_deciding_voting_power: [] | [bigint];
573
+ staked_maturity_e8s_equivalent_buckets: Array<[bigint, bigint]>;
574
+ staked_e8s_buckets: Array<[bigint, bigint]>;
575
+ total_voting_power: [] | [bigint];
576
+ potential_voting_power_buckets: Array<[bigint, bigint]>;
577
+ count_buckets: Array<[bigint, bigint]>;
578
+ }
579
+ export interface NeuronsFundAuditInfo {
580
+ final_neurons_fund_participation: [] | [NeuronsFundParticipation];
581
+ initial_neurons_fund_participation: [] | [NeuronsFundParticipation];
582
+ neurons_fund_refunds: [] | [NeuronsFundSnapshot];
583
+ }
584
+ export interface NeuronsFundData {
585
+ final_neurons_fund_participation: [] | [NeuronsFundParticipation];
586
+ initial_neurons_fund_participation: [] | [NeuronsFundParticipation];
587
+ neurons_fund_refunds: [] | [NeuronsFundSnapshot];
588
+ }
589
+ export interface NeuronsFundEconomics {
590
+ maximum_icp_xdr_rate: [] | [Percentage];
591
+ neurons_fund_matched_funding_curve_coefficients:
592
+ | []
593
+ | [NeuronsFundMatchedFundingCurveCoefficients];
594
+ max_theoretical_neurons_fund_participation_amount_xdr: [] | [Decimal];
595
+ minimum_icp_xdr_rate: [] | [Percentage];
596
+ }
597
+ export interface NeuronsFundMatchedFundingCurveCoefficients {
598
+ contribution_threshold_xdr: [] | [Decimal];
599
+ one_third_participation_milestone_xdr: [] | [Decimal];
600
+ full_participation_milestone_xdr: [] | [Decimal];
601
+ }
602
+ export interface NeuronsFundNeuron {
603
+ controller: [] | [Principal];
604
+ hotkeys: [] | [Principals];
605
+ is_capped: [] | [boolean];
606
+ nns_neuron_id: [] | [bigint];
607
+ amount_icp_e8s: [] | [bigint];
608
+ }
609
+ export interface NeuronsFundNeuronPortion {
610
+ controller: [] | [Principal];
611
+ hotkeys: Array<Principal>;
612
+ is_capped: [] | [boolean];
613
+ maturity_equivalent_icp_e8s: [] | [bigint];
614
+ nns_neuron_id: [] | [NeuronId];
615
+ amount_icp_e8s: [] | [bigint];
616
+ }
617
+ export interface NeuronsFundParticipation {
618
+ total_maturity_equivalent_icp_e8s: [] | [bigint];
619
+ intended_neurons_fund_participation_icp_e8s: [] | [bigint];
620
+ direct_participation_icp_e8s: [] | [bigint];
621
+ swap_participation_limits: [] | [SwapParticipationLimits];
622
+ max_neurons_fund_swap_participation_icp_e8s: [] | [bigint];
623
+ neurons_fund_reserves: [] | [NeuronsFundSnapshot];
624
+ ideal_matched_participation_function:
625
+ | []
626
+ | [IdealMatchedParticipationFunction];
627
+ allocated_neurons_fund_participation_icp_e8s: [] | [bigint];
628
+ }
629
+ export interface NeuronsFundSnapshot {
630
+ neurons_fund_neuron_portions: Array<NeuronsFundNeuronPortion>;
631
+ }
632
+ export interface NodeProvider {
633
+ id: [] | [Principal];
634
+ reward_account: [] | [AccountIdentifier];
635
+ }
636
+ export interface Ok {
637
+ neurons_fund_audit_info: [] | [NeuronsFundAuditInfo];
638
+ }
639
+ export interface Ok_1 {
640
+ neurons_fund_neuron_portions: Array<NeuronsFundNeuron>;
641
+ }
642
+ export interface OpenSnsTokenSwap {
643
+ community_fund_investment_e8s: [] | [bigint];
644
+ target_swap_canister_id: [] | [Principal];
645
+ params: [] | [Params];
646
+ }
647
+ export type Operation =
648
+ | { RemoveHotKey: RemoveHotKey }
649
+ | { AddHotKey: AddHotKey }
650
+ | { ChangeAutoStakeMaturity: ChangeAutoStakeMaturity }
651
+ | { StopDissolving: {} }
652
+ | { StartDissolving: {} }
653
+ | { IncreaseDissolveDelay: IncreaseDissolveDelay }
654
+ | { SetVisibility: SetVisibility }
655
+ | { JoinCommunityFund: {} }
656
+ | { LeaveCommunityFund: {} }
657
+ | { SetDissolveTimestamp: SetDissolveTimestamp };
658
+ export interface Params {
659
+ min_participant_icp_e8s: bigint;
660
+ neuron_basket_construction_parameters:
661
+ | []
662
+ | [NeuronBasketConstructionParameters_1];
663
+ max_icp_e8s: bigint;
664
+ swap_due_timestamp_seconds: bigint;
665
+ min_participants: number;
666
+ sns_token_e8s: bigint;
667
+ sale_delay_seconds: [] | [bigint];
668
+ max_participant_icp_e8s: bigint;
669
+ min_direct_participation_icp_e8s: [] | [bigint];
670
+ min_icp_e8s: bigint;
671
+ max_direct_participation_icp_e8s: [] | [bigint];
672
+ }
673
+ export interface Percentage {
674
+ basis_points: [] | [bigint];
675
+ }
676
+ export interface Principals {
677
+ principals: Array<Principal>;
678
+ }
679
+ export type Progress = { LastNeuronId: NeuronId };
680
+ export interface Proposal {
681
+ url: string;
682
+ title: [] | [string];
683
+ action: [] | [Action];
684
+ summary: string;
685
+ }
686
+ export type ProposalActionRequest =
687
+ | { RegisterKnownNeuron: KnownNeuron }
688
+ | { ManageNeuron: ManageNeuronRequest }
689
+ | { UpdateCanisterSettings: UpdateCanisterSettings }
690
+ | { InstallCode: InstallCodeRequest }
691
+ | { StopOrStartCanister: StopOrStartCanister }
692
+ | { CreateServiceNervousSystem: CreateServiceNervousSystem }
693
+ | { ExecuteNnsFunction: ExecuteNnsFunction }
694
+ | { RewardNodeProvider: RewardNodeProvider }
695
+ | { RewardNodeProviders: RewardNodeProviders }
696
+ | { ManageNetworkEconomics: NetworkEconomics }
697
+ | { ApproveGenesisKyc: Principals }
698
+ | { AddOrRemoveNodeProvider: AddOrRemoveNodeProvider }
699
+ | { Motion: Motion };
700
+ export interface ProposalData {
701
+ id: [] | [ProposalId];
702
+ failure_reason: [] | [GovernanceError];
703
+ ballots: Array<[bigint, Ballot]>;
704
+ proposal_timestamp_seconds: bigint;
705
+ reward_event_round: bigint;
706
+ failed_timestamp_seconds: bigint;
707
+ neurons_fund_data: [] | [NeuronsFundData];
708
+ reject_cost_e8s: bigint;
709
+ derived_proposal_information: [] | [DerivedProposalInformation];
710
+ latest_tally: [] | [Tally];
711
+ total_potential_voting_power: [] | [bigint];
712
+ sns_token_swap_lifecycle: [] | [number];
713
+ decided_timestamp_seconds: bigint;
714
+ proposal: [] | [Proposal];
715
+ proposer: [] | [NeuronId];
716
+ wait_for_quiet_state: [] | [WaitForQuietState];
717
+ executed_timestamp_seconds: bigint;
718
+ original_total_community_fund_maturity_e8s_equivalent: [] | [bigint];
719
+ }
720
+ export interface ProposalId {
721
+ id: bigint;
722
+ }
723
+ export interface ProposalInfo {
724
+ id: [] | [ProposalId];
725
+ status: number;
726
+ topic: number;
727
+ failure_reason: [] | [GovernanceError];
728
+ ballots: Array<[bigint, Ballot]>;
729
+ proposal_timestamp_seconds: bigint;
730
+ reward_event_round: bigint;
731
+ deadline_timestamp_seconds: [] | [bigint];
732
+ failed_timestamp_seconds: bigint;
733
+ reject_cost_e8s: bigint;
734
+ derived_proposal_information: [] | [DerivedProposalInformation];
735
+ latest_tally: [] | [Tally];
736
+ total_potential_voting_power: [] | [bigint];
737
+ reward_status: number;
738
+ decided_timestamp_seconds: bigint;
739
+ proposal: [] | [Proposal];
740
+ proposer: [] | [NeuronId];
741
+ executed_timestamp_seconds: bigint;
742
+ }
743
+ export type RefreshVotingPower = {};
744
+ export type RefreshVotingPowerResponse = {};
745
+ export interface RegisterVote {
746
+ vote: number;
747
+ proposal: [] | [ProposalId];
748
+ }
749
+ export interface RemoveHotKey {
750
+ hot_key_to_remove: [] | [Principal];
751
+ }
752
+ export interface RestoreAgingNeuronGroup {
753
+ count: [] | [bigint];
754
+ previous_total_stake_e8s: [] | [bigint];
755
+ current_total_stake_e8s: [] | [bigint];
756
+ group_type: number;
757
+ }
758
+ export interface RestoreAgingSummary {
759
+ groups: Array<RestoreAgingNeuronGroup>;
760
+ timestamp_seconds: [] | [bigint];
761
+ }
762
+ export type Result = { Ok: null } | { Err: GovernanceError };
763
+ export type Result_1 = { Error: GovernanceError } | { NeuronId: NeuronId };
764
+ export type Result_10 = { Ok: Ok_1 } | { Err: GovernanceError };
765
+ export type Result_2 = { Ok: Neuron } | { Err: GovernanceError };
766
+ export type Result_3 =
767
+ | { Ok: GovernanceCachedMetrics }
768
+ | { Err: GovernanceError };
769
+ export type Result_4 =
770
+ | { Ok: MonthlyNodeProviderRewards }
771
+ | { Err: GovernanceError };
772
+ export type Result_5 = { Ok: NeuronInfo } | { Err: GovernanceError };
773
+ export type Result_6 = { Ok: Ok } | { Err: GovernanceError };
774
+ export type Result_7 = { Ok: NodeProvider } | { Err: GovernanceError };
775
+ export type Result_8 = { Committed: Committed } | { Aborted: {} };
776
+ export type Result_9 = { Committed: Committed_1 } | { Aborted: {} };
777
+ export interface RewardEvent {
778
+ rounds_since_last_distribution: [] | [bigint];
779
+ day_after_genesis: bigint;
780
+ actual_timestamp_seconds: bigint;
781
+ total_available_e8s_equivalent: bigint;
782
+ latest_round_available_e8s_equivalent: [] | [bigint];
783
+ distributed_e8s_equivalent: bigint;
784
+ settled_proposals: Array<ProposalId>;
785
+ }
786
+ export type RewardMode =
787
+ | { RewardToNeuron: RewardToNeuron }
788
+ | { RewardToAccount: RewardToAccount };
789
+ export interface RewardNodeProvider {
790
+ node_provider: [] | [NodeProvider];
791
+ reward_mode: [] | [RewardMode];
792
+ amount_e8s: bigint;
793
+ }
794
+ export interface RewardNodeProviders {
795
+ use_registry_derived_rewards: [] | [boolean];
796
+ rewards: Array<RewardNodeProvider>;
797
+ }
798
+ export interface RewardToAccount {
799
+ to_account: [] | [AccountIdentifier];
800
+ }
801
+ export interface RewardToNeuron {
802
+ dissolve_delay_seconds: bigint;
803
+ }
804
+ export interface SetDefaultFollowees {
805
+ default_followees: Array<[number, Followees]>;
806
+ }
807
+ export interface SetDissolveTimestamp {
808
+ dissolve_timestamp_seconds: bigint;
809
+ }
810
+ export interface SetOpenTimeWindowRequest {
811
+ open_time_window: [] | [TimeWindow];
812
+ }
813
+ export interface SetSnsTokenSwapOpenTimeWindow {
814
+ request: [] | [SetOpenTimeWindowRequest];
815
+ swap_canister_id: [] | [Principal];
816
+ }
817
+ export interface SetVisibility {
818
+ visibility: [] | [number];
819
+ }
820
+ export interface SettleCommunityFundParticipation {
821
+ result: [] | [Result_8];
822
+ open_sns_token_swap_proposal_id: [] | [bigint];
823
+ }
824
+ export interface SettleNeuronsFundParticipationRequest {
825
+ result: [] | [Result_9];
826
+ nns_proposal_id: [] | [bigint];
827
+ }
828
+ export interface SettleNeuronsFundParticipationResponse {
829
+ result: [] | [Result_10];
830
+ }
831
+ export interface Spawn {
832
+ percentage_to_spawn: [] | [number];
833
+ new_controller: [] | [Principal];
834
+ nonce: [] | [bigint];
835
+ }
836
+ export interface SpawnResponse {
837
+ created_neuron_id: [] | [NeuronId];
838
+ }
839
+ export interface Split {
840
+ amount_e8s: bigint;
841
+ }
842
+ export interface StakeMaturity {
843
+ percentage_to_stake: [] | [number];
844
+ }
845
+ export interface StakeMaturityResponse {
846
+ maturity_e8s: bigint;
847
+ staked_maturity_e8s: bigint;
848
+ }
849
+ export interface StopOrStartCanister {
850
+ action: [] | [number];
851
+ canister_id: [] | [Principal];
852
+ }
853
+ export interface SwapBackgroundInformation {
854
+ ledger_index_canister_summary: [] | [CanisterSummary];
855
+ fallback_controller_principal_ids: Array<Principal>;
856
+ ledger_archive_canister_summaries: Array<CanisterSummary>;
857
+ ledger_canister_summary: [] | [CanisterSummary];
858
+ swap_canister_summary: [] | [CanisterSummary];
859
+ governance_canister_summary: [] | [CanisterSummary];
860
+ root_canister_summary: [] | [CanisterSummary];
861
+ dapp_canister_summaries: Array<CanisterSummary>;
862
+ }
863
+ export interface SwapDistribution {
864
+ total: [] | [Tokens];
865
+ }
866
+ export interface SwapParameters {
867
+ minimum_participants: [] | [bigint];
868
+ neurons_fund_participation: [] | [boolean];
869
+ duration: [] | [Duration];
870
+ neuron_basket_construction_parameters:
871
+ | []
872
+ | [NeuronBasketConstructionParameters];
873
+ confirmation_text: [] | [string];
874
+ maximum_participant_icp: [] | [Tokens];
875
+ minimum_icp: [] | [Tokens];
876
+ minimum_direct_participation_icp: [] | [Tokens];
877
+ minimum_participant_icp: [] | [Tokens];
878
+ start_time: [] | [GlobalTimeOfDay];
879
+ maximum_direct_participation_icp: [] | [Tokens];
880
+ maximum_icp: [] | [Tokens];
881
+ neurons_fund_investment_icp: [] | [Tokens];
882
+ restricted_countries: [] | [Countries];
883
+ }
884
+ export interface SwapParticipationLimits {
885
+ min_participant_icp_e8s: [] | [bigint];
886
+ max_participant_icp_e8s: [] | [bigint];
887
+ min_direct_participation_icp_e8s: [] | [bigint];
888
+ max_direct_participation_icp_e8s: [] | [bigint];
889
+ }
890
+ export interface Tally {
891
+ no: bigint;
892
+ yes: bigint;
893
+ total: bigint;
894
+ timestamp_seconds: bigint;
895
+ }
896
+ export interface TimeWindow {
897
+ start_timestamp_seconds: bigint;
898
+ end_timestamp_seconds: bigint;
899
+ }
900
+ export interface Tokens {
901
+ e8s: [] | [bigint];
902
+ }
903
+ export interface UpdateCanisterSettings {
904
+ canister_id: [] | [Principal];
905
+ settings: [] | [CanisterSettings];
906
+ }
907
+ export interface UpdateNodeProvider {
908
+ reward_account: [] | [AccountIdentifier];
909
+ }
910
+ export interface VotingPowerEconomics {
911
+ start_reducing_voting_power_after_seconds: [] | [bigint];
912
+ clear_following_after_seconds: [] | [bigint];
913
+ }
914
+ export interface VotingRewardParameters {
915
+ reward_rate_transition_duration: [] | [Duration];
916
+ initial_reward_rate: [] | [Percentage];
917
+ final_reward_rate: [] | [Percentage];
918
+ }
919
+ export interface WaitForQuietState {
920
+ current_deadline_timestamp_seconds: bigint;
921
+ }
922
+ export interface XdrConversionRate {
923
+ xdr_permyriad_per_icp: [] | [bigint];
924
+ timestamp_seconds: [] | [bigint];
925
+ }
926
+ export interface _SERVICE {
927
+ claim_gtc_neurons: ActorMethod<[Principal, Array<NeuronId>], Result>;
928
+ claim_or_refresh_neuron_from_account: ActorMethod<
929
+ [ClaimOrRefreshNeuronFromAccount],
930
+ ClaimOrRefreshNeuronFromAccountResponse
931
+ >;
932
+ get_build_metadata: ActorMethod<[], string>;
933
+ get_full_neuron: ActorMethod<[bigint], Result_2>;
934
+ get_full_neuron_by_id_or_subaccount: ActorMethod<
935
+ [NeuronIdOrSubaccount],
936
+ Result_2
937
+ >;
938
+ get_latest_reward_event: ActorMethod<[], RewardEvent>;
939
+ get_metrics: ActorMethod<[], Result_3>;
940
+ get_monthly_node_provider_rewards: ActorMethod<[], Result_4>;
941
+ get_most_recent_monthly_node_provider_rewards: ActorMethod<
942
+ [],
943
+ [] | [MonthlyNodeProviderRewards]
944
+ >;
945
+ get_network_economics_parameters: ActorMethod<[], NetworkEconomics>;
946
+ get_neuron_ids: ActorMethod<[], BigUint64Array | bigint[]>;
947
+ get_neuron_info: ActorMethod<[bigint], Result_5>;
948
+ get_neuron_info_by_id_or_subaccount: ActorMethod<
949
+ [NeuronIdOrSubaccount],
950
+ Result_5
951
+ >;
952
+ get_neurons_fund_audit_info: ActorMethod<
953
+ [GetNeuronsFundAuditInfoRequest],
954
+ GetNeuronsFundAuditInfoResponse
955
+ >;
956
+ get_node_provider_by_caller: ActorMethod<[null], Result_7>;
957
+ get_pending_proposals: ActorMethod<[], Array<ProposalInfo>>;
958
+ get_proposal_info: ActorMethod<[bigint], [] | [ProposalInfo]>;
959
+ get_restore_aging_summary: ActorMethod<[], RestoreAgingSummary>;
960
+ list_known_neurons: ActorMethod<[], ListKnownNeuronsResponse>;
961
+ list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
962
+ list_node_provider_rewards: ActorMethod<
963
+ [ListNodeProviderRewardsRequest],
964
+ ListNodeProviderRewardsResponse
965
+ >;
966
+ list_node_providers: ActorMethod<[], ListNodeProvidersResponse>;
967
+ list_proposals: ActorMethod<[ListProposalInfo], ListProposalInfoResponse>;
968
+ manage_neuron: ActorMethod<[ManageNeuronRequest], ManageNeuronResponse>;
969
+ settle_community_fund_participation: ActorMethod<
970
+ [SettleCommunityFundParticipation],
971
+ Result
972
+ >;
973
+ settle_neurons_fund_participation: ActorMethod<
974
+ [SettleNeuronsFundParticipationRequest],
975
+ SettleNeuronsFundParticipationResponse
976
+ >;
977
+ simulate_manage_neuron: ActorMethod<
978
+ [ManageNeuronRequest],
979
+ ManageNeuronResponse
980
+ >;
981
+ transfer_gtc_neuron: ActorMethod<[NeuronId, NeuronId], Result>;
982
+ update_node_provider: ActorMethod<[UpdateNodeProvider], Result>;
983
+ }
984
+ export type idlFactory = IDL.InterfaceFactory;
985
+ export type init = (args: { IDL: typeof IDL }) => IDL.Type[];
986
+ export const ManageNeuronRequest = IDL.Rec();
987
+ export const Proposal = IDL.Rec();
988
+ export const NeuronId = IDL.Record({ id: IDL.Nat64 });
989
+ export const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
990
+ export const KnownNeuronData = IDL.Record({
991
+ name: IDL.Text,
992
+ description: IDL.Opt(IDL.Text)
993
+ });
994
+ export const KnownNeuron = IDL.Record({
995
+ id: IDL.Opt(NeuronId),
996
+ known_neuron_data: IDL.Opt(KnownNeuronData)
997
+ });
998
+ export const Spawn = IDL.Record({
999
+ percentage_to_spawn: IDL.Opt(IDL.Nat32),
1000
+ new_controller: IDL.Opt(IDL.Principal),
1001
+ nonce: IDL.Opt(IDL.Nat64)
1002
+ });
1003
+ export const Split = IDL.Record({ amount_e8s: IDL.Nat64 });
1004
+ export const Follow = IDL.Record({
1005
+ topic: IDL.Int32,
1006
+ followees: IDL.Vec(NeuronId)
1007
+ });
1008
+ export const RefreshVotingPower = IDL.Record({});
1009
+ export const ClaimOrRefreshNeuronFromAccount = IDL.Record({
1010
+ controller: IDL.Opt(IDL.Principal),
1011
+ memo: IDL.Nat64
1012
+ });
1013
+ export const By = IDL.Variant({
1014
+ NeuronIdOrSubaccount: IDL.Record({}),
1015
+ MemoAndController: ClaimOrRefreshNeuronFromAccount,
1016
+ Memo: IDL.Nat64
1017
+ });
1018
+ export const ClaimOrRefresh = IDL.Record({ by: IDL.Opt(By) });
1019
+ export const RemoveHotKey = IDL.Record({
1020
+ hot_key_to_remove: IDL.Opt(IDL.Principal)
1021
+ });
1022
+ export const AddHotKey = IDL.Record({ new_hot_key: IDL.Opt(IDL.Principal) });
1023
+ export const ChangeAutoStakeMaturity = IDL.Record({
1024
+ requested_setting_for_auto_stake_maturity: IDL.Bool
1025
+ });
1026
+ export const IncreaseDissolveDelay = IDL.Record({
1027
+ additional_dissolve_delay_seconds: IDL.Nat32
1028
+ });
1029
+ export const SetVisibility = IDL.Record({ visibility: IDL.Opt(IDL.Int32) });
1030
+ export const SetDissolveTimestamp = IDL.Record({
1031
+ dissolve_timestamp_seconds: IDL.Nat64
1032
+ });
1033
+ export const Operation = IDL.Variant({
1034
+ RemoveHotKey: RemoveHotKey,
1035
+ AddHotKey: AddHotKey,
1036
+ ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
1037
+ StopDissolving: IDL.Record({}),
1038
+ StartDissolving: IDL.Record({}),
1039
+ IncreaseDissolveDelay: IncreaseDissolveDelay,
1040
+ SetVisibility: SetVisibility,
1041
+ JoinCommunityFund: IDL.Record({}),
1042
+ LeaveCommunityFund: IDL.Record({}),
1043
+ SetDissolveTimestamp: SetDissolveTimestamp
1044
+ });
1045
+ export const Configure = IDL.Record({ operation: IDL.Opt(Operation) });
1046
+ export const ProposalId = IDL.Record({ id: IDL.Nat64 });
1047
+ export const RegisterVote = IDL.Record({
1048
+ vote: IDL.Int32,
1049
+ proposal: IDL.Opt(ProposalId)
1050
+ });
1051
+ export const Merge = IDL.Record({ source_neuron_id: IDL.Opt(NeuronId) });
1052
+ export const DisburseToNeuron = IDL.Record({
1053
+ dissolve_delay_seconds: IDL.Nat64,
1054
+ kyc_verified: IDL.Bool,
1055
+ amount_e8s: IDL.Nat64,
1056
+ new_controller: IDL.Opt(IDL.Principal),
1057
+ nonce: IDL.Nat64
1058
+ });
1059
+ export const StakeMaturity = IDL.Record({
1060
+ percentage_to_stake: IDL.Opt(IDL.Nat32)
1061
+ });
1062
+ export const MergeMaturity = IDL.Record({ percentage_to_merge: IDL.Nat32 });
1063
+ export const AccountIdentifier = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
1064
+ export const Amount = IDL.Record({ e8s: IDL.Nat64 });
1065
+ export const Disburse = IDL.Record({
1066
+ to_account: IDL.Opt(AccountIdentifier),
1067
+ amount: IDL.Opt(Amount)
1068
+ });
1069
+ export const Command = IDL.Variant({
1070
+ Spawn: Spawn,
1071
+ Split: Split,
1072
+ Follow: Follow,
1073
+ RefreshVotingPower: RefreshVotingPower,
1074
+ ClaimOrRefresh: ClaimOrRefresh,
1075
+ Configure: Configure,
1076
+ RegisterVote: RegisterVote,
1077
+ Merge: Merge,
1078
+ DisburseToNeuron: DisburseToNeuron,
1079
+ MakeProposal: Proposal,
1080
+ StakeMaturity: StakeMaturity,
1081
+ MergeMaturity: MergeMaturity,
1082
+ Disburse: Disburse
1083
+ });
1084
+ export const NeuronIdOrSubaccount = IDL.Variant({
1085
+ Subaccount: IDL.Vec(IDL.Nat8),
1086
+ NeuronId: NeuronId
1087
+ });
1088
+ export const ManageNeuron = IDL.Record({
1089
+ id: IDL.Opt(NeuronId),
1090
+ command: IDL.Opt(Command),
1091
+ neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount)
1092
+ });
1093
+ export const Controllers = IDL.Record({
1094
+ controllers: IDL.Vec(IDL.Principal)
1095
+ });
1096
+ export const CanisterSettings = IDL.Record({
1097
+ freezing_threshold: IDL.Opt(IDL.Nat64),
1098
+ wasm_memory_threshold: IDL.Opt(IDL.Nat64),
1099
+ controllers: IDL.Opt(Controllers),
1100
+ log_visibility: IDL.Opt(IDL.Int32),
1101
+ wasm_memory_limit: IDL.Opt(IDL.Nat64),
1102
+ memory_allocation: IDL.Opt(IDL.Nat64),
1103
+ compute_allocation: IDL.Opt(IDL.Nat64)
1104
+ });
1105
+ export const UpdateCanisterSettings = IDL.Record({
1106
+ canister_id: IDL.Opt(IDL.Principal),
1107
+ settings: IDL.Opt(CanisterSettings)
1108
+ });
1109
+ export const InstallCode = IDL.Record({
1110
+ skip_stopping_before_installing: IDL.Opt(IDL.Bool),
1111
+ wasm_module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1112
+ canister_id: IDL.Opt(IDL.Principal),
1113
+ arg_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
1114
+ install_mode: IDL.Opt(IDL.Int32)
1115
+ });
1116
+ export const StopOrStartCanister = IDL.Record({
1117
+ action: IDL.Opt(IDL.Int32),
1118
+ canister_id: IDL.Opt(IDL.Principal)
1119
+ });
1120
+ export const Percentage = IDL.Record({ basis_points: IDL.Opt(IDL.Nat64) });
1121
+ export const Duration = IDL.Record({ seconds: IDL.Opt(IDL.Nat64) });
1122
+ export const Tokens = IDL.Record({ e8s: IDL.Opt(IDL.Nat64) });
1123
+ export const VotingRewardParameters = IDL.Record({
1124
+ reward_rate_transition_duration: IDL.Opt(Duration),
1125
+ initial_reward_rate: IDL.Opt(Percentage),
1126
+ final_reward_rate: IDL.Opt(Percentage)
1127
+ });
1128
+ export const GovernanceParameters = IDL.Record({
1129
+ neuron_maximum_dissolve_delay_bonus: IDL.Opt(Percentage),
1130
+ neuron_maximum_age_for_age_bonus: IDL.Opt(Duration),
1131
+ neuron_maximum_dissolve_delay: IDL.Opt(Duration),
1132
+ neuron_minimum_dissolve_delay_to_vote: IDL.Opt(Duration),
1133
+ neuron_maximum_age_bonus: IDL.Opt(Percentage),
1134
+ neuron_minimum_stake: IDL.Opt(Tokens),
1135
+ proposal_wait_for_quiet_deadline_increase: IDL.Opt(Duration),
1136
+ proposal_initial_voting_period: IDL.Opt(Duration),
1137
+ proposal_rejection_fee: IDL.Opt(Tokens),
1138
+ voting_reward_parameters: IDL.Opt(VotingRewardParameters)
1139
+ });
1140
+ export const Image = IDL.Record({ base64_encoding: IDL.Opt(IDL.Text) });
1141
+ export const LedgerParameters = IDL.Record({
1142
+ transaction_fee: IDL.Opt(Tokens),
1143
+ token_symbol: IDL.Opt(IDL.Text),
1144
+ token_logo: IDL.Opt(Image),
1145
+ token_name: IDL.Opt(IDL.Text)
1146
+ });
1147
+ export const Canister = IDL.Record({ id: IDL.Opt(IDL.Principal) });
1148
+ export const NeuronBasketConstructionParameters = IDL.Record({
1149
+ dissolve_delay_interval: IDL.Opt(Duration),
1150
+ count: IDL.Opt(IDL.Nat64)
1151
+ });
1152
+ export const GlobalTimeOfDay = IDL.Record({
1153
+ seconds_after_utc_midnight: IDL.Opt(IDL.Nat64)
1154
+ });
1155
+ export const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
1156
+ export const SwapParameters = IDL.Record({
1157
+ minimum_participants: IDL.Opt(IDL.Nat64),
1158
+ neurons_fund_participation: IDL.Opt(IDL.Bool),
1159
+ duration: IDL.Opt(Duration),
1160
+ neuron_basket_construction_parameters: IDL.Opt(
1161
+ NeuronBasketConstructionParameters
1162
+ ),
1163
+ confirmation_text: IDL.Opt(IDL.Text),
1164
+ maximum_participant_icp: IDL.Opt(Tokens),
1165
+ minimum_icp: IDL.Opt(Tokens),
1166
+ minimum_direct_participation_icp: IDL.Opt(Tokens),
1167
+ minimum_participant_icp: IDL.Opt(Tokens),
1168
+ start_time: IDL.Opt(GlobalTimeOfDay),
1169
+ maximum_direct_participation_icp: IDL.Opt(Tokens),
1170
+ maximum_icp: IDL.Opt(Tokens),
1171
+ neurons_fund_investment_icp: IDL.Opt(Tokens),
1172
+ restricted_countries: IDL.Opt(Countries)
1173
+ });
1174
+ export const SwapDistribution = IDL.Record({ total: IDL.Opt(Tokens) });
1175
+ export const NeuronDistribution = IDL.Record({
1176
+ controller: IDL.Opt(IDL.Principal),
1177
+ dissolve_delay: IDL.Opt(Duration),
1178
+ memo: IDL.Opt(IDL.Nat64),
1179
+ vesting_period: IDL.Opt(Duration),
1180
+ stake: IDL.Opt(Tokens)
1181
+ });
1182
+ export const DeveloperDistribution = IDL.Record({
1183
+ developer_neurons: IDL.Vec(NeuronDistribution)
1184
+ });
1185
+ export const InitialTokenDistribution = IDL.Record({
1186
+ treasury_distribution: IDL.Opt(SwapDistribution),
1187
+ developer_distribution: IDL.Opt(DeveloperDistribution),
1188
+ swap_distribution: IDL.Opt(SwapDistribution)
1189
+ });
1190
+ export const CreateServiceNervousSystem = IDL.Record({
1191
+ url: IDL.Opt(IDL.Text),
1192
+ governance_parameters: IDL.Opt(GovernanceParameters),
1193
+ fallback_controller_principal_ids: IDL.Vec(IDL.Principal),
1194
+ logo: IDL.Opt(Image),
1195
+ name: IDL.Opt(IDL.Text),
1196
+ ledger_parameters: IDL.Opt(LedgerParameters),
1197
+ description: IDL.Opt(IDL.Text),
1198
+ dapp_canisters: IDL.Vec(Canister),
1199
+ swap_parameters: IDL.Opt(SwapParameters),
1200
+ initial_token_distribution: IDL.Opt(InitialTokenDistribution)
1201
+ });
1202
+ export const ExecuteNnsFunction = IDL.Record({
1203
+ nns_function: IDL.Int32,
1204
+ payload: IDL.Vec(IDL.Nat8)
1205
+ });
1206
+ export const NodeProvider = IDL.Record({
1207
+ id: IDL.Opt(IDL.Principal),
1208
+ reward_account: IDL.Opt(AccountIdentifier)
1209
+ });
1210
+ export const RewardToNeuron = IDL.Record({
1211
+ dissolve_delay_seconds: IDL.Nat64
1212
+ });
1213
+ export const RewardToAccount = IDL.Record({
1214
+ to_account: IDL.Opt(AccountIdentifier)
1215
+ });
1216
+ export const RewardMode = IDL.Variant({
1217
+ RewardToNeuron: RewardToNeuron,
1218
+ RewardToAccount: RewardToAccount
1219
+ });
1220
+ export const RewardNodeProvider = IDL.Record({
1221
+ node_provider: IDL.Opt(NodeProvider),
1222
+ reward_mode: IDL.Opt(RewardMode),
1223
+ amount_e8s: IDL.Nat64
1224
+ });
1225
+ export const NeuronBasketConstructionParameters_1 = IDL.Record({
1226
+ dissolve_delay_interval_seconds: IDL.Nat64,
1227
+ count: IDL.Nat64
1228
+ });
1229
+ export const Params = IDL.Record({
1230
+ min_participant_icp_e8s: IDL.Nat64,
1231
+ neuron_basket_construction_parameters: IDL.Opt(
1232
+ NeuronBasketConstructionParameters_1
1233
+ ),
1234
+ max_icp_e8s: IDL.Nat64,
1235
+ swap_due_timestamp_seconds: IDL.Nat64,
1236
+ min_participants: IDL.Nat32,
1237
+ sns_token_e8s: IDL.Nat64,
1238
+ sale_delay_seconds: IDL.Opt(IDL.Nat64),
1239
+ max_participant_icp_e8s: IDL.Nat64,
1240
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
1241
+ min_icp_e8s: IDL.Nat64,
1242
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
1243
+ });
1244
+ export const OpenSnsTokenSwap = IDL.Record({
1245
+ community_fund_investment_e8s: IDL.Opt(IDL.Nat64),
1246
+ target_swap_canister_id: IDL.Opt(IDL.Principal),
1247
+ params: IDL.Opt(Params)
1248
+ });
1249
+ export const TimeWindow = IDL.Record({
1250
+ start_timestamp_seconds: IDL.Nat64,
1251
+ end_timestamp_seconds: IDL.Nat64
1252
+ });
1253
+ export const SetOpenTimeWindowRequest = IDL.Record({
1254
+ open_time_window: IDL.Opt(TimeWindow)
1255
+ });
1256
+ export const SetSnsTokenSwapOpenTimeWindow = IDL.Record({
1257
+ request: IDL.Opt(SetOpenTimeWindowRequest),
1258
+ swap_canister_id: IDL.Opt(IDL.Principal)
1259
+ });
1260
+ export const SetDefaultFollowees = IDL.Record({
1261
+ default_followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees))
1262
+ });
1263
+ export const RewardNodeProviders = IDL.Record({
1264
+ use_registry_derived_rewards: IDL.Opt(IDL.Bool),
1265
+ rewards: IDL.Vec(RewardNodeProvider)
1266
+ });
1267
+ export const VotingPowerEconomics = IDL.Record({
1268
+ start_reducing_voting_power_after_seconds: IDL.Opt(IDL.Nat64),
1269
+ clear_following_after_seconds: IDL.Opt(IDL.Nat64)
1270
+ });
1271
+ export const Decimal = IDL.Record({ human_readable: IDL.Opt(IDL.Text) });
1272
+ export const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
1273
+ contribution_threshold_xdr: IDL.Opt(Decimal),
1274
+ one_third_participation_milestone_xdr: IDL.Opt(Decimal),
1275
+ full_participation_milestone_xdr: IDL.Opt(Decimal)
1276
+ });
1277
+ export const NeuronsFundEconomics = IDL.Record({
1278
+ maximum_icp_xdr_rate: IDL.Opt(Percentage),
1279
+ neurons_fund_matched_funding_curve_coefficients: IDL.Opt(
1280
+ NeuronsFundMatchedFundingCurveCoefficients
1281
+ ),
1282
+ max_theoretical_neurons_fund_participation_amount_xdr: IDL.Opt(Decimal),
1283
+ minimum_icp_xdr_rate: IDL.Opt(Percentage)
1284
+ });
1285
+ export const NetworkEconomics = IDL.Record({
1286
+ neuron_minimum_stake_e8s: IDL.Nat64,
1287
+ voting_power_economics: IDL.Opt(VotingPowerEconomics),
1288
+ max_proposals_to_keep_per_topic: IDL.Nat32,
1289
+ neuron_management_fee_per_proposal_e8s: IDL.Nat64,
1290
+ reject_cost_e8s: IDL.Nat64,
1291
+ transaction_fee_e8s: IDL.Nat64,
1292
+ neuron_spawn_dissolve_delay_seconds: IDL.Nat64,
1293
+ minimum_icp_xdr_rate: IDL.Nat64,
1294
+ maximum_node_provider_rewards_e8s: IDL.Nat64,
1295
+ neurons_fund_economics: IDL.Opt(NeuronsFundEconomics)
1296
+ });
1297
+ export const Principals = IDL.Record({ principals: IDL.Vec(IDL.Principal) });
1298
+ export const Change = IDL.Variant({
1299
+ ToRemove: NodeProvider,
1300
+ ToAdd: NodeProvider
1301
+ });
1302
+ export const AddOrRemoveNodeProvider = IDL.Record({
1303
+ change: IDL.Opt(Change)
1304
+ });
1305
+ export const Motion = IDL.Record({ motion_text: IDL.Text });
1306
+ export const Action = IDL.Variant({
1307
+ RegisterKnownNeuron: KnownNeuron,
1308
+ ManageNeuron: ManageNeuron,
1309
+ UpdateCanisterSettings: UpdateCanisterSettings,
1310
+ InstallCode: InstallCode,
1311
+ StopOrStartCanister: StopOrStartCanister,
1312
+ CreateServiceNervousSystem: CreateServiceNervousSystem,
1313
+ ExecuteNnsFunction: ExecuteNnsFunction,
1314
+ RewardNodeProvider: RewardNodeProvider,
1315
+ OpenSnsTokenSwap: OpenSnsTokenSwap,
1316
+ SetSnsTokenSwapOpenTimeWindow: SetSnsTokenSwapOpenTimeWindow,
1317
+ SetDefaultFollowees: SetDefaultFollowees,
1318
+ RewardNodeProviders: RewardNodeProviders,
1319
+ ManageNetworkEconomics: NetworkEconomics,
1320
+ ApproveGenesisKyc: Principals,
1321
+ AddOrRemoveNodeProvider: AddOrRemoveNodeProvider,
1322
+ Motion: Motion
1323
+ });
1324
+ Proposal.fill(
1325
+ IDL.Record({
1326
+ url: IDL.Text,
1327
+ title: IDL.Opt(IDL.Text),
1328
+ action: IDL.Opt(Action),
1329
+ summary: IDL.Text
1330
+ })
1331
+ );
1332
+ export const MakingSnsProposal = IDL.Record({
1333
+ proposal: IDL.Opt(Proposal),
1334
+ caller: IDL.Opt(IDL.Principal),
1335
+ proposer_id: IDL.Opt(NeuronId)
1336
+ });
1337
+ export const XdrConversionRate = IDL.Record({
1338
+ xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
1339
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1340
+ });
1341
+ export const MonthlyNodeProviderRewards = IDL.Record({
1342
+ minimum_xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
1343
+ registry_version: IDL.Opt(IDL.Nat64),
1344
+ node_providers: IDL.Vec(NodeProvider),
1345
+ timestamp: IDL.Nat64,
1346
+ rewards: IDL.Vec(RewardNodeProvider),
1347
+ xdr_conversion_rate: IDL.Opt(XdrConversionRate),
1348
+ maximum_node_provider_rewards_e8s: IDL.Opt(IDL.Nat64)
1349
+ });
1350
+ export const NeuronSubsetMetrics = IDL.Record({
1351
+ total_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
1352
+ maturity_e8s_equivalent_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1353
+ voting_power_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1354
+ total_staked_e8s: IDL.Opt(IDL.Nat64),
1355
+ count: IDL.Opt(IDL.Nat64),
1356
+ deciding_voting_power_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1357
+ total_staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
1358
+ total_potential_voting_power: IDL.Opt(IDL.Nat64),
1359
+ total_deciding_voting_power: IDL.Opt(IDL.Nat64),
1360
+ staked_maturity_e8s_equivalent_buckets: IDL.Vec(
1361
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
1362
+ ),
1363
+ staked_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1364
+ total_voting_power: IDL.Opt(IDL.Nat64),
1365
+ potential_voting_power_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1366
+ count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64))
1367
+ });
1368
+ export const GovernanceCachedMetrics = IDL.Record({
1369
+ total_maturity_e8s_equivalent: IDL.Nat64,
1370
+ not_dissolving_neurons_e8s_buckets: IDL.Vec(
1371
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1372
+ ),
1373
+ dissolving_neurons_staked_maturity_e8s_equivalent_sum: IDL.Nat64,
1374
+ garbage_collectable_neurons_count: IDL.Nat64,
1375
+ dissolving_neurons_staked_maturity_e8s_equivalent_buckets: IDL.Vec(
1376
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1377
+ ),
1378
+ neurons_with_invalid_stake_count: IDL.Nat64,
1379
+ not_dissolving_neurons_count_buckets: IDL.Vec(
1380
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
1381
+ ),
1382
+ ect_neuron_count: IDL.Nat64,
1383
+ total_supply_icp: IDL.Nat64,
1384
+ neurons_with_less_than_6_months_dissolve_delay_count: IDL.Nat64,
1385
+ dissolved_neurons_count: IDL.Nat64,
1386
+ community_fund_total_maturity_e8s_equivalent: IDL.Nat64,
1387
+ total_staked_e8s_seed: IDL.Nat64,
1388
+ total_staked_maturity_e8s_equivalent_ect: IDL.Nat64,
1389
+ total_staked_e8s: IDL.Nat64,
1390
+ fully_lost_voting_power_neuron_subset_metrics: IDL.Opt(NeuronSubsetMetrics),
1391
+ not_dissolving_neurons_count: IDL.Nat64,
1392
+ total_locked_e8s: IDL.Nat64,
1393
+ neurons_fund_total_active_neurons: IDL.Nat64,
1394
+ total_voting_power_non_self_authenticating_controller: IDL.Opt(IDL.Nat64),
1395
+ total_staked_maturity_e8s_equivalent: IDL.Nat64,
1396
+ not_dissolving_neurons_e8s_buckets_ect: IDL.Vec(
1397
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1398
+ ),
1399
+ declining_voting_power_neuron_subset_metrics: IDL.Opt(NeuronSubsetMetrics),
1400
+ total_staked_e8s_ect: IDL.Nat64,
1401
+ not_dissolving_neurons_staked_maturity_e8s_equivalent_sum: IDL.Nat64,
1402
+ dissolved_neurons_e8s: IDL.Nat64,
1403
+ total_staked_e8s_non_self_authenticating_controller: IDL.Opt(IDL.Nat64),
1404
+ dissolving_neurons_e8s_buckets_seed: IDL.Vec(
1405
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1406
+ ),
1407
+ neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
1408
+ not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets: IDL.Vec(
1409
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1410
+ ),
1411
+ dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
1412
+ dissolving_neurons_e8s_buckets_ect: IDL.Vec(
1413
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1414
+ ),
1415
+ non_self_authenticating_controller_neuron_subset_metrics:
1416
+ IDL.Opt(NeuronSubsetMetrics),
1417
+ dissolving_neurons_count: IDL.Nat64,
1418
+ dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
1419
+ total_staked_maturity_e8s_equivalent_seed: IDL.Nat64,
1420
+ community_fund_total_staked_e8s: IDL.Nat64,
1421
+ not_dissolving_neurons_e8s_buckets_seed: IDL.Vec(
1422
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
1423
+ ),
1424
+ public_neuron_subset_metrics: IDL.Opt(NeuronSubsetMetrics),
1425
+ timestamp_seconds: IDL.Nat64,
1426
+ seed_neuron_count: IDL.Nat64
1427
+ });
1428
+ export const RestoreAgingNeuronGroup = IDL.Record({
1429
+ count: IDL.Opt(IDL.Nat64),
1430
+ previous_total_stake_e8s: IDL.Opt(IDL.Nat64),
1431
+ current_total_stake_e8s: IDL.Opt(IDL.Nat64),
1432
+ group_type: IDL.Int32
1433
+ });
1434
+ export const RestoreAgingSummary = IDL.Record({
1435
+ groups: IDL.Vec(RestoreAgingNeuronGroup),
1436
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
1437
+ });
1438
+ export const RewardEvent = IDL.Record({
1439
+ rounds_since_last_distribution: IDL.Opt(IDL.Nat64),
1440
+ day_after_genesis: IDL.Nat64,
1441
+ actual_timestamp_seconds: IDL.Nat64,
1442
+ total_available_e8s_equivalent: IDL.Nat64,
1443
+ latest_round_available_e8s_equivalent: IDL.Opt(IDL.Nat64),
1444
+ distributed_e8s_equivalent: IDL.Nat64,
1445
+ settled_proposals: IDL.Vec(ProposalId)
1446
+ });
1447
+ export const NeuronStakeTransfer = IDL.Record({
1448
+ to_subaccount: IDL.Vec(IDL.Nat8),
1449
+ neuron_stake_e8s: IDL.Nat64,
1450
+ from: IDL.Opt(IDL.Principal),
1451
+ memo: IDL.Nat64,
1452
+ from_subaccount: IDL.Vec(IDL.Nat8),
1453
+ transfer_timestamp: IDL.Nat64,
1454
+ block_height: IDL.Nat64
1455
+ });
1456
+ export const Followers = IDL.Record({ followers: IDL.Vec(NeuronId) });
1457
+ export const FollowersMap = IDL.Record({
1458
+ followers_map: IDL.Vec(IDL.Tuple(IDL.Nat64, Followers))
1459
+ });
1460
+ export const Progress = IDL.Variant({ LastNeuronId: NeuronId });
1461
+ export const Migration = IDL.Record({
1462
+ status: IDL.Opt(IDL.Int32),
1463
+ failure_reason: IDL.Opt(IDL.Text),
1464
+ progress: IDL.Opt(Progress)
1465
+ });
1466
+ export const Migrations = IDL.Record({
1467
+ neuron_indexes_migration: IDL.Opt(Migration),
1468
+ copy_inactive_neurons_to_stable_memory_migration: IDL.Opt(Migration)
1469
+ });
1470
+ export const GovernanceError = IDL.Record({
1471
+ error_message: IDL.Text,
1472
+ error_type: IDL.Int32
1473
+ });
1474
+ export const Ballot = IDL.Record({
1475
+ vote: IDL.Int32,
1476
+ voting_power: IDL.Nat64
1477
+ });
1478
+ export const SwapParticipationLimits = IDL.Record({
1479
+ min_participant_icp_e8s: IDL.Opt(IDL.Nat64),
1480
+ max_participant_icp_e8s: IDL.Opt(IDL.Nat64),
1481
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
1482
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
1483
+ });
1484
+ export const NeuronsFundNeuronPortion = IDL.Record({
1485
+ controller: IDL.Opt(IDL.Principal),
1486
+ hotkeys: IDL.Vec(IDL.Principal),
1487
+ is_capped: IDL.Opt(IDL.Bool),
1488
+ maturity_equivalent_icp_e8s: IDL.Opt(IDL.Nat64),
1489
+ nns_neuron_id: IDL.Opt(NeuronId),
1490
+ amount_icp_e8s: IDL.Opt(IDL.Nat64)
1491
+ });
1492
+ export const NeuronsFundSnapshot = IDL.Record({
1493
+ neurons_fund_neuron_portions: IDL.Vec(NeuronsFundNeuronPortion)
1494
+ });
1495
+ export const IdealMatchedParticipationFunction = IDL.Record({
1496
+ serialized_representation: IDL.Opt(IDL.Text)
1497
+ });
1498
+ export const NeuronsFundParticipation = IDL.Record({
1499
+ total_maturity_equivalent_icp_e8s: IDL.Opt(IDL.Nat64),
1500
+ intended_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
1501
+ direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
1502
+ swap_participation_limits: IDL.Opt(SwapParticipationLimits),
1503
+ max_neurons_fund_swap_participation_icp_e8s: IDL.Opt(IDL.Nat64),
1504
+ neurons_fund_reserves: IDL.Opt(NeuronsFundSnapshot),
1505
+ ideal_matched_participation_function: IDL.Opt(
1506
+ IdealMatchedParticipationFunction
1507
+ ),
1508
+ allocated_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64)
1509
+ });
1510
+ export const NeuronsFundData = IDL.Record({
1511
+ final_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
1512
+ initial_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
1513
+ neurons_fund_refunds: IDL.Opt(NeuronsFundSnapshot)
1514
+ });
1515
+ export const CanisterStatusResultV2 = IDL.Record({
1516
+ status: IDL.Opt(IDL.Int32),
1517
+ freezing_threshold: IDL.Opt(IDL.Nat64),
1518
+ controllers: IDL.Vec(IDL.Principal),
1519
+ memory_size: IDL.Opt(IDL.Nat64),
1520
+ cycles: IDL.Opt(IDL.Nat64),
1521
+ idle_cycles_burned_per_day: IDL.Opt(IDL.Nat64),
1522
+ module_hash: IDL.Vec(IDL.Nat8)
1523
+ });
1524
+ export const CanisterSummary = IDL.Record({
1525
+ status: IDL.Opt(CanisterStatusResultV2),
1526
+ canister_id: IDL.Opt(IDL.Principal)
1527
+ });
1528
+ export const SwapBackgroundInformation = IDL.Record({
1529
+ ledger_index_canister_summary: IDL.Opt(CanisterSummary),
1530
+ fallback_controller_principal_ids: IDL.Vec(IDL.Principal),
1531
+ ledger_archive_canister_summaries: IDL.Vec(CanisterSummary),
1532
+ ledger_canister_summary: IDL.Opt(CanisterSummary),
1533
+ swap_canister_summary: IDL.Opt(CanisterSummary),
1534
+ governance_canister_summary: IDL.Opt(CanisterSummary),
1535
+ root_canister_summary: IDL.Opt(CanisterSummary),
1536
+ dapp_canister_summaries: IDL.Vec(CanisterSummary)
1537
+ });
1538
+ export const DerivedProposalInformation = IDL.Record({
1539
+ swap_background_information: IDL.Opt(SwapBackgroundInformation)
1540
+ });
1541
+ export const Tally = IDL.Record({
1542
+ no: IDL.Nat64,
1543
+ yes: IDL.Nat64,
1544
+ total: IDL.Nat64,
1545
+ timestamp_seconds: IDL.Nat64
1546
+ });
1547
+ export const WaitForQuietState = IDL.Record({
1548
+ current_deadline_timestamp_seconds: IDL.Nat64
1549
+ });
1550
+ export const ProposalData = IDL.Record({
1551
+ id: IDL.Opt(ProposalId),
1552
+ failure_reason: IDL.Opt(GovernanceError),
1553
+ ballots: IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
1554
+ proposal_timestamp_seconds: IDL.Nat64,
1555
+ reward_event_round: IDL.Nat64,
1556
+ failed_timestamp_seconds: IDL.Nat64,
1557
+ neurons_fund_data: IDL.Opt(NeuronsFundData),
1558
+ reject_cost_e8s: IDL.Nat64,
1559
+ derived_proposal_information: IDL.Opt(DerivedProposalInformation),
1560
+ latest_tally: IDL.Opt(Tally),
1561
+ total_potential_voting_power: IDL.Opt(IDL.Nat64),
1562
+ sns_token_swap_lifecycle: IDL.Opt(IDL.Int32),
1563
+ decided_timestamp_seconds: IDL.Nat64,
1564
+ proposal: IDL.Opt(Proposal),
1565
+ proposer: IDL.Opt(NeuronId),
1566
+ wait_for_quiet_state: IDL.Opt(WaitForQuietState),
1567
+ executed_timestamp_seconds: IDL.Nat64,
1568
+ original_total_community_fund_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64)
1569
+ });
1570
+ export const Command_2 = IDL.Variant({
1571
+ Spawn: NeuronId,
1572
+ Split: Split,
1573
+ Configure: Configure,
1574
+ Merge: Merge,
1575
+ DisburseToNeuron: DisburseToNeuron,
1576
+ SyncCommand: IDL.Record({}),
1577
+ ClaimOrRefreshNeuron: ClaimOrRefresh,
1578
+ MergeMaturity: MergeMaturity,
1579
+ Disburse: Disburse
1580
+ });
1581
+ export const NeuronInFlightCommand = IDL.Record({
1582
+ command: IDL.Opt(Command_2),
1583
+ timestamp: IDL.Nat64
1584
+ });
1585
+ export const BallotInfo = IDL.Record({
1586
+ vote: IDL.Int32,
1587
+ proposal_id: IDL.Opt(ProposalId)
1588
+ });
1589
+ export const DissolveState = IDL.Variant({
1590
+ DissolveDelaySeconds: IDL.Nat64,
1591
+ WhenDissolvedTimestampSeconds: IDL.Nat64
1592
+ });
1593
+ export const Neuron = IDL.Record({
1594
+ id: IDL.Opt(NeuronId),
1595
+ staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
1596
+ controller: IDL.Opt(IDL.Principal),
1597
+ recent_ballots: IDL.Vec(BallotInfo),
1598
+ voting_power_refreshed_timestamp_seconds: IDL.Opt(IDL.Nat64),
1599
+ kyc_verified: IDL.Bool,
1600
+ potential_voting_power: IDL.Opt(IDL.Nat64),
1601
+ neuron_type: IDL.Opt(IDL.Int32),
1602
+ not_for_profit: IDL.Bool,
1603
+ maturity_e8s_equivalent: IDL.Nat64,
1604
+ deciding_voting_power: IDL.Opt(IDL.Nat64),
1605
+ cached_neuron_stake_e8s: IDL.Nat64,
1606
+ created_timestamp_seconds: IDL.Nat64,
1607
+ auto_stake_maturity: IDL.Opt(IDL.Bool),
1608
+ aging_since_timestamp_seconds: IDL.Nat64,
1609
+ hot_keys: IDL.Vec(IDL.Principal),
1610
+ account: IDL.Vec(IDL.Nat8),
1611
+ joined_community_fund_timestamp_seconds: IDL.Opt(IDL.Nat64),
1612
+ dissolve_state: IDL.Opt(DissolveState),
1613
+ followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
1614
+ neuron_fees_e8s: IDL.Nat64,
1615
+ visibility: IDL.Opt(IDL.Int32),
1616
+ transfer: IDL.Opt(NeuronStakeTransfer),
1617
+ known_neuron_data: IDL.Opt(KnownNeuronData),
1618
+ spawn_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
1619
+ });
1620
+ export const Governance = IDL.Record({
1621
+ default_followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
1622
+ making_sns_proposal: IDL.Opt(MakingSnsProposal),
1623
+ most_recent_monthly_node_provider_rewards: IDL.Opt(
1624
+ MonthlyNodeProviderRewards
1625
+ ),
1626
+ maturity_modulation_last_updated_at_timestamp_seconds: IDL.Opt(IDL.Nat64),
1627
+ wait_for_quiet_threshold_seconds: IDL.Nat64,
1628
+ metrics: IDL.Opt(GovernanceCachedMetrics),
1629
+ neuron_management_voting_period_seconds: IDL.Opt(IDL.Nat64),
1630
+ node_providers: IDL.Vec(NodeProvider),
1631
+ cached_daily_maturity_modulation_basis_points: IDL.Opt(IDL.Int32),
1632
+ economics: IDL.Opt(NetworkEconomics),
1633
+ restore_aging_summary: IDL.Opt(RestoreAgingSummary),
1634
+ spawning_neurons: IDL.Opt(IDL.Bool),
1635
+ latest_reward_event: IDL.Opt(RewardEvent),
1636
+ to_claim_transfers: IDL.Vec(NeuronStakeTransfer),
1637
+ short_voting_period_seconds: IDL.Nat64,
1638
+ topic_followee_index: IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
1639
+ migrations: IDL.Opt(Migrations),
1640
+ proposals: IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
1641
+ xdr_conversion_rate: IDL.Opt(XdrConversionRate),
1642
+ in_flight_commands: IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
1643
+ neurons: IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
1644
+ genesis_timestamp_seconds: IDL.Nat64
1645
+ });
1646
+ export const Result = IDL.Variant({ Ok: IDL.Null, Err: GovernanceError });
1647
+ export const Result_1 = IDL.Variant({
1648
+ Error: GovernanceError,
1649
+ NeuronId: NeuronId
1650
+ });
1651
+ export const ClaimOrRefreshNeuronFromAccountResponse = IDL.Record({
1652
+ result: IDL.Opt(Result_1)
1653
+ });
1654
+ export const Result_2 = IDL.Variant({ Ok: Neuron, Err: GovernanceError });
1655
+ export const Result_3 = IDL.Variant({
1656
+ Ok: GovernanceCachedMetrics,
1657
+ Err: GovernanceError
1658
+ });
1659
+ export const Result_4 = IDL.Variant({
1660
+ Ok: MonthlyNodeProviderRewards,
1661
+ Err: GovernanceError
1662
+ });
1663
+ export const NeuronInfo = IDL.Record({
1664
+ dissolve_delay_seconds: IDL.Nat64,
1665
+ recent_ballots: IDL.Vec(BallotInfo),
1666
+ voting_power_refreshed_timestamp_seconds: IDL.Opt(IDL.Nat64),
1667
+ potential_voting_power: IDL.Opt(IDL.Nat64),
1668
+ neuron_type: IDL.Opt(IDL.Int32),
1669
+ deciding_voting_power: IDL.Opt(IDL.Nat64),
1670
+ created_timestamp_seconds: IDL.Nat64,
1671
+ state: IDL.Int32,
1672
+ stake_e8s: IDL.Nat64,
1673
+ joined_community_fund_timestamp_seconds: IDL.Opt(IDL.Nat64),
1674
+ retrieved_at_timestamp_seconds: IDL.Nat64,
1675
+ visibility: IDL.Opt(IDL.Int32),
1676
+ known_neuron_data: IDL.Opt(KnownNeuronData),
1677
+ voting_power: IDL.Nat64,
1678
+ age_seconds: IDL.Nat64
1679
+ });
1680
+ export const Result_5 = IDL.Variant({
1681
+ Ok: NeuronInfo,
1682
+ Err: GovernanceError
1683
+ });
1684
+ export const GetNeuronsFundAuditInfoRequest = IDL.Record({
1685
+ nns_proposal_id: IDL.Opt(ProposalId)
1686
+ });
1687
+ export const NeuronsFundAuditInfo = IDL.Record({
1688
+ final_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
1689
+ initial_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
1690
+ neurons_fund_refunds: IDL.Opt(NeuronsFundSnapshot)
1691
+ });
1692
+ export const Ok = IDL.Record({
1693
+ neurons_fund_audit_info: IDL.Opt(NeuronsFundAuditInfo)
1694
+ });
1695
+ export const Result_6 = IDL.Variant({ Ok: Ok, Err: GovernanceError });
1696
+ export const GetNeuronsFundAuditInfoResponse = IDL.Record({
1697
+ result: IDL.Opt(Result_6)
1698
+ });
1699
+ export const Result_7 = IDL.Variant({
1700
+ Ok: NodeProvider,
1701
+ Err: GovernanceError
1702
+ });
1703
+ export const ProposalInfo = IDL.Record({
1704
+ id: IDL.Opt(ProposalId),
1705
+ status: IDL.Int32,
1706
+ topic: IDL.Int32,
1707
+ failure_reason: IDL.Opt(GovernanceError),
1708
+ ballots: IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
1709
+ proposal_timestamp_seconds: IDL.Nat64,
1710
+ reward_event_round: IDL.Nat64,
1711
+ deadline_timestamp_seconds: IDL.Opt(IDL.Nat64),
1712
+ failed_timestamp_seconds: IDL.Nat64,
1713
+ reject_cost_e8s: IDL.Nat64,
1714
+ derived_proposal_information: IDL.Opt(DerivedProposalInformation),
1715
+ latest_tally: IDL.Opt(Tally),
1716
+ total_potential_voting_power: IDL.Opt(IDL.Nat64),
1717
+ reward_status: IDL.Int32,
1718
+ decided_timestamp_seconds: IDL.Nat64,
1719
+ proposal: IDL.Opt(Proposal),
1720
+ proposer: IDL.Opt(NeuronId),
1721
+ executed_timestamp_seconds: IDL.Nat64
1722
+ });
1723
+ export const ListKnownNeuronsResponse = IDL.Record({
1724
+ known_neurons: IDL.Vec(KnownNeuron)
1725
+ });
1726
+ export const NeuronSubaccount = IDL.Record({
1727
+ subaccount: IDL.Vec(IDL.Nat8)
1728
+ });
1729
+ export const ListNeurons = IDL.Record({
1730
+ page_size: IDL.Opt(IDL.Nat64),
1731
+ include_public_neurons_in_full_neurons: IDL.Opt(IDL.Bool),
1732
+ neuron_ids: IDL.Vec(IDL.Nat64),
1733
+ page_number: IDL.Opt(IDL.Nat64),
1734
+ include_empty_neurons_readable_by_caller: IDL.Opt(IDL.Bool),
1735
+ neuron_subaccounts: IDL.Opt(IDL.Vec(NeuronSubaccount)),
1736
+ include_neurons_readable_by_caller: IDL.Bool
1737
+ });
1738
+ export const ListNeuronsResponse = IDL.Record({
1739
+ neuron_infos: IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInfo)),
1740
+ full_neurons: IDL.Vec(Neuron),
1741
+ total_pages_available: IDL.Opt(IDL.Nat64)
1742
+ });
1743
+ export const DateRangeFilter = IDL.Record({
1744
+ start_timestamp_seconds: IDL.Opt(IDL.Nat64),
1745
+ end_timestamp_seconds: IDL.Opt(IDL.Nat64)
1746
+ });
1747
+ export const ListNodeProviderRewardsRequest = IDL.Record({
1748
+ date_filter: IDL.Opt(DateRangeFilter)
1749
+ });
1750
+ export const ListNodeProviderRewardsResponse = IDL.Record({
1751
+ rewards: IDL.Vec(MonthlyNodeProviderRewards)
1752
+ });
1753
+ export const ListNodeProvidersResponse = IDL.Record({
1754
+ node_providers: IDL.Vec(NodeProvider)
1755
+ });
1756
+ export const ListProposalInfo = IDL.Record({
1757
+ include_reward_status: IDL.Vec(IDL.Int32),
1758
+ omit_large_fields: IDL.Opt(IDL.Bool),
1759
+ before_proposal: IDL.Opt(ProposalId),
1760
+ limit: IDL.Nat32,
1761
+ exclude_topic: IDL.Vec(IDL.Int32),
1762
+ include_all_manage_neuron_proposals: IDL.Opt(IDL.Bool),
1763
+ include_status: IDL.Vec(IDL.Int32)
1764
+ });
1765
+ export const ListProposalInfoResponse = IDL.Record({
1766
+ proposal_info: IDL.Vec(ProposalInfo)
1767
+ });
1768
+ export const InstallCodeRequest = IDL.Record({
1769
+ arg: IDL.Opt(IDL.Vec(IDL.Nat8)),
1770
+ wasm_module: IDL.Opt(IDL.Vec(IDL.Nat8)),
1771
+ skip_stopping_before_installing: IDL.Opt(IDL.Bool),
1772
+ canister_id: IDL.Opt(IDL.Principal),
1773
+ install_mode: IDL.Opt(IDL.Int32)
1774
+ });
1775
+ export const ProposalActionRequest = IDL.Variant({
1776
+ RegisterKnownNeuron: KnownNeuron,
1777
+ ManageNeuron: ManageNeuronRequest,
1778
+ UpdateCanisterSettings: UpdateCanisterSettings,
1779
+ InstallCode: InstallCodeRequest,
1780
+ StopOrStartCanister: StopOrStartCanister,
1781
+ CreateServiceNervousSystem: CreateServiceNervousSystem,
1782
+ ExecuteNnsFunction: ExecuteNnsFunction,
1783
+ RewardNodeProvider: RewardNodeProvider,
1784
+ RewardNodeProviders: RewardNodeProviders,
1785
+ ManageNetworkEconomics: NetworkEconomics,
1786
+ ApproveGenesisKyc: Principals,
1787
+ AddOrRemoveNodeProvider: AddOrRemoveNodeProvider,
1788
+ Motion: Motion
1789
+ });
1790
+ export const MakeProposalRequest = IDL.Record({
1791
+ url: IDL.Text,
1792
+ title: IDL.Opt(IDL.Text),
1793
+ action: IDL.Opt(ProposalActionRequest),
1794
+ summary: IDL.Text
1795
+ });
1796
+ export const ManageNeuronCommandRequest = IDL.Variant({
1797
+ Spawn: Spawn,
1798
+ Split: Split,
1799
+ Follow: Follow,
1800
+ RefreshVotingPower: RefreshVotingPower,
1801
+ ClaimOrRefresh: ClaimOrRefresh,
1802
+ Configure: Configure,
1803
+ RegisterVote: RegisterVote,
1804
+ Merge: Merge,
1805
+ DisburseToNeuron: DisburseToNeuron,
1806
+ MakeProposal: MakeProposalRequest,
1807
+ StakeMaturity: StakeMaturity,
1808
+ MergeMaturity: MergeMaturity,
1809
+ Disburse: Disburse
1810
+ });
1811
+ ManageNeuronRequest.fill(
1812
+ IDL.Record({
1813
+ id: IDL.Opt(NeuronId),
1814
+ command: IDL.Opt(ManageNeuronCommandRequest),
1815
+ neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount)
1816
+ })
1817
+ );
1818
+ export const SpawnResponse = IDL.Record({
1819
+ created_neuron_id: IDL.Opt(NeuronId)
1820
+ });
1821
+ export const RefreshVotingPowerResponse = IDL.Record({});
1822
+ export const ClaimOrRefreshResponse = IDL.Record({
1823
+ refreshed_neuron_id: IDL.Opt(NeuronId)
1824
+ });
1825
+ export const MergeResponse = IDL.Record({
1826
+ target_neuron: IDL.Opt(Neuron),
1827
+ source_neuron: IDL.Opt(Neuron),
1828
+ target_neuron_info: IDL.Opt(NeuronInfo),
1829
+ source_neuron_info: IDL.Opt(NeuronInfo)
1830
+ });
1831
+ export const MakeProposalResponse = IDL.Record({
1832
+ message: IDL.Opt(IDL.Text),
1833
+ proposal_id: IDL.Opt(ProposalId)
1834
+ });
1835
+ export const StakeMaturityResponse = IDL.Record({
1836
+ maturity_e8s: IDL.Nat64,
1837
+ staked_maturity_e8s: IDL.Nat64
1838
+ });
1839
+ export const MergeMaturityResponse = IDL.Record({
1840
+ merged_maturity_e8s: IDL.Nat64,
1841
+ new_stake_e8s: IDL.Nat64
1842
+ });
1843
+ export const DisburseResponse = IDL.Record({
1844
+ transfer_block_height: IDL.Nat64
1845
+ });
1846
+ export const Command_1 = IDL.Variant({
1847
+ Error: GovernanceError,
1848
+ Spawn: SpawnResponse,
1849
+ Split: SpawnResponse,
1850
+ Follow: IDL.Record({}),
1851
+ RefreshVotingPower: RefreshVotingPowerResponse,
1852
+ ClaimOrRefresh: ClaimOrRefreshResponse,
1853
+ Configure: IDL.Record({}),
1854
+ RegisterVote: IDL.Record({}),
1855
+ Merge: MergeResponse,
1856
+ DisburseToNeuron: SpawnResponse,
1857
+ MakeProposal: MakeProposalResponse,
1858
+ StakeMaturity: StakeMaturityResponse,
1859
+ MergeMaturity: MergeMaturityResponse,
1860
+ Disburse: DisburseResponse
1861
+ });
1862
+ export const ManageNeuronResponse = IDL.Record({
1863
+ command: IDL.Opt(Command_1)
1864
+ });
1865
+ export const Committed = IDL.Record({
1866
+ total_direct_contribution_icp_e8s: IDL.Opt(IDL.Nat64),
1867
+ total_neurons_fund_contribution_icp_e8s: IDL.Opt(IDL.Nat64),
1868
+ sns_governance_canister_id: IDL.Opt(IDL.Principal)
1869
+ });
1870
+ export const Result_8 = IDL.Variant({
1871
+ Committed: Committed,
1872
+ Aborted: IDL.Record({})
1873
+ });
1874
+ export const SettleCommunityFundParticipation = IDL.Record({
1875
+ result: IDL.Opt(Result_8),
1876
+ open_sns_token_swap_proposal_id: IDL.Opt(IDL.Nat64)
1877
+ });
1878
+ export const Committed_1 = IDL.Record({
1879
+ total_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
1880
+ total_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
1881
+ sns_governance_canister_id: IDL.Opt(IDL.Principal)
1882
+ });
1883
+ export const Result_9 = IDL.Variant({
1884
+ Committed: Committed_1,
1885
+ Aborted: IDL.Record({})
1886
+ });
1887
+ export const SettleNeuronsFundParticipationRequest = IDL.Record({
1888
+ result: IDL.Opt(Result_9),
1889
+ nns_proposal_id: IDL.Opt(IDL.Nat64)
1890
+ });
1891
+ export const NeuronsFundNeuron = IDL.Record({
1892
+ controller: IDL.Opt(IDL.Principal),
1893
+ hotkeys: IDL.Opt(Principals),
1894
+ is_capped: IDL.Opt(IDL.Bool),
1895
+ nns_neuron_id: IDL.Opt(IDL.Nat64),
1896
+ amount_icp_e8s: IDL.Opt(IDL.Nat64)
1897
+ });
1898
+ export const Ok_1 = IDL.Record({
1899
+ neurons_fund_neuron_portions: IDL.Vec(NeuronsFundNeuron)
1900
+ });
1901
+ export const Result_10 = IDL.Variant({ Ok: Ok_1, Err: GovernanceError });
1902
+ export const SettleNeuronsFundParticipationResponse = IDL.Record({
1903
+ result: IDL.Opt(Result_10)
1904
+ });
1905
+ export const UpdateNodeProvider = IDL.Record({
1906
+ reward_account: IDL.Opt(AccountIdentifier)
1907
+ });
1908
+ export const idlFactory: idlFactory = ({ IDL }) => {
1909
+ const ManageNeuronRequest = IDL.Rec();
1910
+ const Proposal = IDL.Rec();
1911
+ const NeuronId = IDL.Record({ id: IDL.Nat64 });
1912
+ const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
1913
+ const KnownNeuronData = IDL.Record({
1914
+ name: IDL.Text,
1915
+ description: IDL.Opt(IDL.Text)
1916
+ });
1917
+ const KnownNeuron = IDL.Record({
1918
+ id: IDL.Opt(NeuronId),
1919
+ known_neuron_data: IDL.Opt(KnownNeuronData)
1920
+ });
1921
+ const Spawn = IDL.Record({
1922
+ percentage_to_spawn: IDL.Opt(IDL.Nat32),
1923
+ new_controller: IDL.Opt(IDL.Principal),
1924
+ nonce: IDL.Opt(IDL.Nat64)
1925
+ });
1926
+ const Split = IDL.Record({ amount_e8s: IDL.Nat64 });
1927
+ const Follow = IDL.Record({
1928
+ topic: IDL.Int32,
1929
+ followees: IDL.Vec(NeuronId)
1930
+ });
1931
+ const RefreshVotingPower = IDL.Record({});
1932
+ const ClaimOrRefreshNeuronFromAccount = IDL.Record({
1933
+ controller: IDL.Opt(IDL.Principal),
1934
+ memo: IDL.Nat64
1935
+ });
1936
+ const By = IDL.Variant({
1937
+ NeuronIdOrSubaccount: IDL.Record({}),
1938
+ MemoAndController: ClaimOrRefreshNeuronFromAccount,
1939
+ Memo: IDL.Nat64
1940
+ });
1941
+ const ClaimOrRefresh = IDL.Record({ by: IDL.Opt(By) });
1942
+ const RemoveHotKey = IDL.Record({
1943
+ hot_key_to_remove: IDL.Opt(IDL.Principal)
1944
+ });
1945
+ const AddHotKey = IDL.Record({ new_hot_key: IDL.Opt(IDL.Principal) });
1946
+ const ChangeAutoStakeMaturity = IDL.Record({
1947
+ requested_setting_for_auto_stake_maturity: IDL.Bool
1948
+ });
1949
+ const IncreaseDissolveDelay = IDL.Record({
1950
+ additional_dissolve_delay_seconds: IDL.Nat32
1951
+ });
1952
+ const SetVisibility = IDL.Record({ visibility: IDL.Opt(IDL.Int32) });
1953
+ const SetDissolveTimestamp = IDL.Record({
1954
+ dissolve_timestamp_seconds: IDL.Nat64
1955
+ });
1956
+ const Operation = IDL.Variant({
1957
+ RemoveHotKey: RemoveHotKey,
1958
+ AddHotKey: AddHotKey,
1959
+ ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
1960
+ StopDissolving: IDL.Record({}),
1961
+ StartDissolving: IDL.Record({}),
1962
+ IncreaseDissolveDelay: IncreaseDissolveDelay,
1963
+ SetVisibility: SetVisibility,
1964
+ JoinCommunityFund: IDL.Record({}),
1965
+ LeaveCommunityFund: IDL.Record({}),
1966
+ SetDissolveTimestamp: SetDissolveTimestamp
1967
+ });
1968
+ const Configure = IDL.Record({ operation: IDL.Opt(Operation) });
1969
+ const ProposalId = IDL.Record({ id: IDL.Nat64 });
1970
+ const RegisterVote = IDL.Record({
1971
+ vote: IDL.Int32,
1972
+ proposal: IDL.Opt(ProposalId)
1973
+ });
1974
+ const Merge = IDL.Record({ source_neuron_id: IDL.Opt(NeuronId) });
1975
+ const DisburseToNeuron = IDL.Record({
1976
+ dissolve_delay_seconds: IDL.Nat64,
1977
+ kyc_verified: IDL.Bool,
1978
+ amount_e8s: IDL.Nat64,
1979
+ new_controller: IDL.Opt(IDL.Principal),
1980
+ nonce: IDL.Nat64
1981
+ });
1982
+ const StakeMaturity = IDL.Record({
1983
+ percentage_to_stake: IDL.Opt(IDL.Nat32)
1984
+ });
1985
+ const MergeMaturity = IDL.Record({ percentage_to_merge: IDL.Nat32 });
1986
+ const AccountIdentifier = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
1987
+ const Amount = IDL.Record({ e8s: IDL.Nat64 });
1988
+ const Disburse = IDL.Record({
1989
+ to_account: IDL.Opt(AccountIdentifier),
1990
+ amount: IDL.Opt(Amount)
1991
+ });
1992
+ const Command = IDL.Variant({
1993
+ Spawn: Spawn,
1994
+ Split: Split,
1995
+ Follow: Follow,
1996
+ RefreshVotingPower: RefreshVotingPower,
1997
+ ClaimOrRefresh: ClaimOrRefresh,
1998
+ Configure: Configure,
1999
+ RegisterVote: RegisterVote,
2000
+ Merge: Merge,
2001
+ DisburseToNeuron: DisburseToNeuron,
2002
+ MakeProposal: Proposal,
2003
+ StakeMaturity: StakeMaturity,
2004
+ MergeMaturity: MergeMaturity,
2005
+ Disburse: Disburse
2006
+ });
2007
+ const NeuronIdOrSubaccount = IDL.Variant({
2008
+ Subaccount: IDL.Vec(IDL.Nat8),
2009
+ NeuronId: NeuronId
2010
+ });
2011
+ const ManageNeuron = IDL.Record({
2012
+ id: IDL.Opt(NeuronId),
2013
+ command: IDL.Opt(Command),
2014
+ neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount)
2015
+ });
2016
+ const Controllers = IDL.Record({ controllers: IDL.Vec(IDL.Principal) });
2017
+ const CanisterSettings = IDL.Record({
2018
+ freezing_threshold: IDL.Opt(IDL.Nat64),
2019
+ wasm_memory_threshold: IDL.Opt(IDL.Nat64),
2020
+ controllers: IDL.Opt(Controllers),
2021
+ log_visibility: IDL.Opt(IDL.Int32),
2022
+ wasm_memory_limit: IDL.Opt(IDL.Nat64),
2023
+ memory_allocation: IDL.Opt(IDL.Nat64),
2024
+ compute_allocation: IDL.Opt(IDL.Nat64)
2025
+ });
2026
+ const UpdateCanisterSettings = IDL.Record({
2027
+ canister_id: IDL.Opt(IDL.Principal),
2028
+ settings: IDL.Opt(CanisterSettings)
2029
+ });
2030
+ const InstallCode = IDL.Record({
2031
+ skip_stopping_before_installing: IDL.Opt(IDL.Bool),
2032
+ wasm_module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
2033
+ canister_id: IDL.Opt(IDL.Principal),
2034
+ arg_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
2035
+ install_mode: IDL.Opt(IDL.Int32)
2036
+ });
2037
+ const StopOrStartCanister = IDL.Record({
2038
+ action: IDL.Opt(IDL.Int32),
2039
+ canister_id: IDL.Opt(IDL.Principal)
2040
+ });
2041
+ const Percentage = IDL.Record({ basis_points: IDL.Opt(IDL.Nat64) });
2042
+ const Duration = IDL.Record({ seconds: IDL.Opt(IDL.Nat64) });
2043
+ const Tokens = IDL.Record({ e8s: IDL.Opt(IDL.Nat64) });
2044
+ const VotingRewardParameters = IDL.Record({
2045
+ reward_rate_transition_duration: IDL.Opt(Duration),
2046
+ initial_reward_rate: IDL.Opt(Percentage),
2047
+ final_reward_rate: IDL.Opt(Percentage)
2048
+ });
2049
+ const GovernanceParameters = IDL.Record({
2050
+ neuron_maximum_dissolve_delay_bonus: IDL.Opt(Percentage),
2051
+ neuron_maximum_age_for_age_bonus: IDL.Opt(Duration),
2052
+ neuron_maximum_dissolve_delay: IDL.Opt(Duration),
2053
+ neuron_minimum_dissolve_delay_to_vote: IDL.Opt(Duration),
2054
+ neuron_maximum_age_bonus: IDL.Opt(Percentage),
2055
+ neuron_minimum_stake: IDL.Opt(Tokens),
2056
+ proposal_wait_for_quiet_deadline_increase: IDL.Opt(Duration),
2057
+ proposal_initial_voting_period: IDL.Opt(Duration),
2058
+ proposal_rejection_fee: IDL.Opt(Tokens),
2059
+ voting_reward_parameters: IDL.Opt(VotingRewardParameters)
2060
+ });
2061
+ const Image = IDL.Record({ base64_encoding: IDL.Opt(IDL.Text) });
2062
+ const LedgerParameters = IDL.Record({
2063
+ transaction_fee: IDL.Opt(Tokens),
2064
+ token_symbol: IDL.Opt(IDL.Text),
2065
+ token_logo: IDL.Opt(Image),
2066
+ token_name: IDL.Opt(IDL.Text)
2067
+ });
2068
+ const Canister = IDL.Record({ id: IDL.Opt(IDL.Principal) });
2069
+ const NeuronBasketConstructionParameters = IDL.Record({
2070
+ dissolve_delay_interval: IDL.Opt(Duration),
2071
+ count: IDL.Opt(IDL.Nat64)
2072
+ });
2073
+ const GlobalTimeOfDay = IDL.Record({
2074
+ seconds_after_utc_midnight: IDL.Opt(IDL.Nat64)
2075
+ });
2076
+ const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
2077
+ const SwapParameters = IDL.Record({
2078
+ minimum_participants: IDL.Opt(IDL.Nat64),
2079
+ neurons_fund_participation: IDL.Opt(IDL.Bool),
2080
+ duration: IDL.Opt(Duration),
2081
+ neuron_basket_construction_parameters: IDL.Opt(
2082
+ NeuronBasketConstructionParameters
2083
+ ),
2084
+ confirmation_text: IDL.Opt(IDL.Text),
2085
+ maximum_participant_icp: IDL.Opt(Tokens),
2086
+ minimum_icp: IDL.Opt(Tokens),
2087
+ minimum_direct_participation_icp: IDL.Opt(Tokens),
2088
+ minimum_participant_icp: IDL.Opt(Tokens),
2089
+ start_time: IDL.Opt(GlobalTimeOfDay),
2090
+ maximum_direct_participation_icp: IDL.Opt(Tokens),
2091
+ maximum_icp: IDL.Opt(Tokens),
2092
+ neurons_fund_investment_icp: IDL.Opt(Tokens),
2093
+ restricted_countries: IDL.Opt(Countries)
2094
+ });
2095
+ const SwapDistribution = IDL.Record({ total: IDL.Opt(Tokens) });
2096
+ const NeuronDistribution = IDL.Record({
2097
+ controller: IDL.Opt(IDL.Principal),
2098
+ dissolve_delay: IDL.Opt(Duration),
2099
+ memo: IDL.Opt(IDL.Nat64),
2100
+ vesting_period: IDL.Opt(Duration),
2101
+ stake: IDL.Opt(Tokens)
2102
+ });
2103
+ const DeveloperDistribution = IDL.Record({
2104
+ developer_neurons: IDL.Vec(NeuronDistribution)
2105
+ });
2106
+ const InitialTokenDistribution = IDL.Record({
2107
+ treasury_distribution: IDL.Opt(SwapDistribution),
2108
+ developer_distribution: IDL.Opt(DeveloperDistribution),
2109
+ swap_distribution: IDL.Opt(SwapDistribution)
2110
+ });
2111
+ const CreateServiceNervousSystem = IDL.Record({
2112
+ url: IDL.Opt(IDL.Text),
2113
+ governance_parameters: IDL.Opt(GovernanceParameters),
2114
+ fallback_controller_principal_ids: IDL.Vec(IDL.Principal),
2115
+ logo: IDL.Opt(Image),
2116
+ name: IDL.Opt(IDL.Text),
2117
+ ledger_parameters: IDL.Opt(LedgerParameters),
2118
+ description: IDL.Opt(IDL.Text),
2119
+ dapp_canisters: IDL.Vec(Canister),
2120
+ swap_parameters: IDL.Opt(SwapParameters),
2121
+ initial_token_distribution: IDL.Opt(InitialTokenDistribution)
2122
+ });
2123
+ const ExecuteNnsFunction = IDL.Record({
2124
+ nns_function: IDL.Int32,
2125
+ payload: IDL.Vec(IDL.Nat8)
2126
+ });
2127
+ const NodeProvider = IDL.Record({
2128
+ id: IDL.Opt(IDL.Principal),
2129
+ reward_account: IDL.Opt(AccountIdentifier)
2130
+ });
2131
+ const RewardToNeuron = IDL.Record({ dissolve_delay_seconds: IDL.Nat64 });
2132
+ const RewardToAccount = IDL.Record({
2133
+ to_account: IDL.Opt(AccountIdentifier)
2134
+ });
2135
+ const RewardMode = IDL.Variant({
2136
+ RewardToNeuron: RewardToNeuron,
2137
+ RewardToAccount: RewardToAccount
2138
+ });
2139
+ const RewardNodeProvider = IDL.Record({
2140
+ node_provider: IDL.Opt(NodeProvider),
2141
+ reward_mode: IDL.Opt(RewardMode),
2142
+ amount_e8s: IDL.Nat64
2143
+ });
2144
+ const NeuronBasketConstructionParameters_1 = IDL.Record({
2145
+ dissolve_delay_interval_seconds: IDL.Nat64,
2146
+ count: IDL.Nat64
2147
+ });
2148
+ const Params = IDL.Record({
2149
+ min_participant_icp_e8s: IDL.Nat64,
2150
+ neuron_basket_construction_parameters: IDL.Opt(
2151
+ NeuronBasketConstructionParameters_1
2152
+ ),
2153
+ max_icp_e8s: IDL.Nat64,
2154
+ swap_due_timestamp_seconds: IDL.Nat64,
2155
+ min_participants: IDL.Nat32,
2156
+ sns_token_e8s: IDL.Nat64,
2157
+ sale_delay_seconds: IDL.Opt(IDL.Nat64),
2158
+ max_participant_icp_e8s: IDL.Nat64,
2159
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
2160
+ min_icp_e8s: IDL.Nat64,
2161
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
2162
+ });
2163
+ const OpenSnsTokenSwap = IDL.Record({
2164
+ community_fund_investment_e8s: IDL.Opt(IDL.Nat64),
2165
+ target_swap_canister_id: IDL.Opt(IDL.Principal),
2166
+ params: IDL.Opt(Params)
2167
+ });
2168
+ const TimeWindow = IDL.Record({
2169
+ start_timestamp_seconds: IDL.Nat64,
2170
+ end_timestamp_seconds: IDL.Nat64
2171
+ });
2172
+ const SetOpenTimeWindowRequest = IDL.Record({
2173
+ open_time_window: IDL.Opt(TimeWindow)
2174
+ });
2175
+ const SetSnsTokenSwapOpenTimeWindow = IDL.Record({
2176
+ request: IDL.Opt(SetOpenTimeWindowRequest),
2177
+ swap_canister_id: IDL.Opt(IDL.Principal)
2178
+ });
2179
+ const SetDefaultFollowees = IDL.Record({
2180
+ default_followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees))
2181
+ });
2182
+ const RewardNodeProviders = IDL.Record({
2183
+ use_registry_derived_rewards: IDL.Opt(IDL.Bool),
2184
+ rewards: IDL.Vec(RewardNodeProvider)
2185
+ });
2186
+ const VotingPowerEconomics = IDL.Record({
2187
+ start_reducing_voting_power_after_seconds: IDL.Opt(IDL.Nat64),
2188
+ clear_following_after_seconds: IDL.Opt(IDL.Nat64)
2189
+ });
2190
+ const Decimal = IDL.Record({ human_readable: IDL.Opt(IDL.Text) });
2191
+ const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
2192
+ contribution_threshold_xdr: IDL.Opt(Decimal),
2193
+ one_third_participation_milestone_xdr: IDL.Opt(Decimal),
2194
+ full_participation_milestone_xdr: IDL.Opt(Decimal)
2195
+ });
2196
+ const NeuronsFundEconomics = IDL.Record({
2197
+ maximum_icp_xdr_rate: IDL.Opt(Percentage),
2198
+ neurons_fund_matched_funding_curve_coefficients: IDL.Opt(
2199
+ NeuronsFundMatchedFundingCurveCoefficients
2200
+ ),
2201
+ max_theoretical_neurons_fund_participation_amount_xdr: IDL.Opt(Decimal),
2202
+ minimum_icp_xdr_rate: IDL.Opt(Percentage)
2203
+ });
2204
+ const NetworkEconomics = IDL.Record({
2205
+ neuron_minimum_stake_e8s: IDL.Nat64,
2206
+ voting_power_economics: IDL.Opt(VotingPowerEconomics),
2207
+ max_proposals_to_keep_per_topic: IDL.Nat32,
2208
+ neuron_management_fee_per_proposal_e8s: IDL.Nat64,
2209
+ reject_cost_e8s: IDL.Nat64,
2210
+ transaction_fee_e8s: IDL.Nat64,
2211
+ neuron_spawn_dissolve_delay_seconds: IDL.Nat64,
2212
+ minimum_icp_xdr_rate: IDL.Nat64,
2213
+ maximum_node_provider_rewards_e8s: IDL.Nat64,
2214
+ neurons_fund_economics: IDL.Opt(NeuronsFundEconomics)
2215
+ });
2216
+ const Principals = IDL.Record({ principals: IDL.Vec(IDL.Principal) });
2217
+ const Change = IDL.Variant({
2218
+ ToRemove: NodeProvider,
2219
+ ToAdd: NodeProvider
2220
+ });
2221
+ const AddOrRemoveNodeProvider = IDL.Record({ change: IDL.Opt(Change) });
2222
+ const Motion = IDL.Record({ motion_text: IDL.Text });
2223
+ const Action = IDL.Variant({
2224
+ RegisterKnownNeuron: KnownNeuron,
2225
+ ManageNeuron: ManageNeuron,
2226
+ UpdateCanisterSettings: UpdateCanisterSettings,
2227
+ InstallCode: InstallCode,
2228
+ StopOrStartCanister: StopOrStartCanister,
2229
+ CreateServiceNervousSystem: CreateServiceNervousSystem,
2230
+ ExecuteNnsFunction: ExecuteNnsFunction,
2231
+ RewardNodeProvider: RewardNodeProvider,
2232
+ OpenSnsTokenSwap: OpenSnsTokenSwap,
2233
+ SetSnsTokenSwapOpenTimeWindow: SetSnsTokenSwapOpenTimeWindow,
2234
+ SetDefaultFollowees: SetDefaultFollowees,
2235
+ RewardNodeProviders: RewardNodeProviders,
2236
+ ManageNetworkEconomics: NetworkEconomics,
2237
+ ApproveGenesisKyc: Principals,
2238
+ AddOrRemoveNodeProvider: AddOrRemoveNodeProvider,
2239
+ Motion: Motion
2240
+ });
2241
+ Proposal.fill(
2242
+ IDL.Record({
2243
+ url: IDL.Text,
2244
+ title: IDL.Opt(IDL.Text),
2245
+ action: IDL.Opt(Action),
2246
+ summary: IDL.Text
2247
+ })
2248
+ );
2249
+ const MakingSnsProposal = IDL.Record({
2250
+ proposal: IDL.Opt(Proposal),
2251
+ caller: IDL.Opt(IDL.Principal),
2252
+ proposer_id: IDL.Opt(NeuronId)
2253
+ });
2254
+ const XdrConversionRate = IDL.Record({
2255
+ xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
2256
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
2257
+ });
2258
+ const MonthlyNodeProviderRewards = IDL.Record({
2259
+ minimum_xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
2260
+ registry_version: IDL.Opt(IDL.Nat64),
2261
+ node_providers: IDL.Vec(NodeProvider),
2262
+ timestamp: IDL.Nat64,
2263
+ rewards: IDL.Vec(RewardNodeProvider),
2264
+ xdr_conversion_rate: IDL.Opt(XdrConversionRate),
2265
+ maximum_node_provider_rewards_e8s: IDL.Opt(IDL.Nat64)
2266
+ });
2267
+ const NeuronSubsetMetrics = IDL.Record({
2268
+ total_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
2269
+ maturity_e8s_equivalent_buckets: IDL.Vec(
2270
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
2271
+ ),
2272
+ voting_power_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
2273
+ total_staked_e8s: IDL.Opt(IDL.Nat64),
2274
+ count: IDL.Opt(IDL.Nat64),
2275
+ deciding_voting_power_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
2276
+ total_staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
2277
+ total_potential_voting_power: IDL.Opt(IDL.Nat64),
2278
+ total_deciding_voting_power: IDL.Opt(IDL.Nat64),
2279
+ staked_maturity_e8s_equivalent_buckets: IDL.Vec(
2280
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
2281
+ ),
2282
+ staked_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
2283
+ total_voting_power: IDL.Opt(IDL.Nat64),
2284
+ potential_voting_power_buckets: IDL.Vec(
2285
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
2286
+ ),
2287
+ count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64))
2288
+ });
2289
+ const GovernanceCachedMetrics = IDL.Record({
2290
+ total_maturity_e8s_equivalent: IDL.Nat64,
2291
+ not_dissolving_neurons_e8s_buckets: IDL.Vec(
2292
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
2293
+ ),
2294
+ dissolving_neurons_staked_maturity_e8s_equivalent_sum: IDL.Nat64,
2295
+ garbage_collectable_neurons_count: IDL.Nat64,
2296
+ dissolving_neurons_staked_maturity_e8s_equivalent_buckets: IDL.Vec(
2297
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
2298
+ ),
2299
+ neurons_with_invalid_stake_count: IDL.Nat64,
2300
+ not_dissolving_neurons_count_buckets: IDL.Vec(
2301
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
2302
+ ),
2303
+ ect_neuron_count: IDL.Nat64,
2304
+ total_supply_icp: IDL.Nat64,
2305
+ neurons_with_less_than_6_months_dissolve_delay_count: IDL.Nat64,
2306
+ dissolved_neurons_count: IDL.Nat64,
2307
+ community_fund_total_maturity_e8s_equivalent: IDL.Nat64,
2308
+ total_staked_e8s_seed: IDL.Nat64,
2309
+ total_staked_maturity_e8s_equivalent_ect: IDL.Nat64,
2310
+ total_staked_e8s: IDL.Nat64,
2311
+ fully_lost_voting_power_neuron_subset_metrics:
2312
+ IDL.Opt(NeuronSubsetMetrics),
2313
+ not_dissolving_neurons_count: IDL.Nat64,
2314
+ total_locked_e8s: IDL.Nat64,
2315
+ neurons_fund_total_active_neurons: IDL.Nat64,
2316
+ total_voting_power_non_self_authenticating_controller: IDL.Opt(
2317
+ IDL.Nat64
2318
+ ),
2319
+ total_staked_maturity_e8s_equivalent: IDL.Nat64,
2320
+ not_dissolving_neurons_e8s_buckets_ect: IDL.Vec(
2321
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
2322
+ ),
2323
+ declining_voting_power_neuron_subset_metrics:
2324
+ IDL.Opt(NeuronSubsetMetrics),
2325
+ total_staked_e8s_ect: IDL.Nat64,
2326
+ not_dissolving_neurons_staked_maturity_e8s_equivalent_sum: IDL.Nat64,
2327
+ dissolved_neurons_e8s: IDL.Nat64,
2328
+ total_staked_e8s_non_self_authenticating_controller: IDL.Opt(IDL.Nat64),
2329
+ dissolving_neurons_e8s_buckets_seed: IDL.Vec(
2330
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
2331
+ ),
2332
+ neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
2333
+ not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets: IDL.Vec(
2334
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
2335
+ ),
2336
+ dissolving_neurons_count_buckets: IDL.Vec(
2337
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
2338
+ ),
2339
+ dissolving_neurons_e8s_buckets_ect: IDL.Vec(
2340
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
2341
+ ),
2342
+ non_self_authenticating_controller_neuron_subset_metrics:
2343
+ IDL.Opt(NeuronSubsetMetrics),
2344
+ dissolving_neurons_count: IDL.Nat64,
2345
+ dissolving_neurons_e8s_buckets: IDL.Vec(
2346
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
2347
+ ),
2348
+ total_staked_maturity_e8s_equivalent_seed: IDL.Nat64,
2349
+ community_fund_total_staked_e8s: IDL.Nat64,
2350
+ not_dissolving_neurons_e8s_buckets_seed: IDL.Vec(
2351
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
2352
+ ),
2353
+ public_neuron_subset_metrics: IDL.Opt(NeuronSubsetMetrics),
2354
+ timestamp_seconds: IDL.Nat64,
2355
+ seed_neuron_count: IDL.Nat64
2356
+ });
2357
+ const RestoreAgingNeuronGroup = IDL.Record({
2358
+ count: IDL.Opt(IDL.Nat64),
2359
+ previous_total_stake_e8s: IDL.Opt(IDL.Nat64),
2360
+ current_total_stake_e8s: IDL.Opt(IDL.Nat64),
2361
+ group_type: IDL.Int32
2362
+ });
2363
+ const RestoreAgingSummary = IDL.Record({
2364
+ groups: IDL.Vec(RestoreAgingNeuronGroup),
2365
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
2366
+ });
2367
+ const RewardEvent = IDL.Record({
2368
+ rounds_since_last_distribution: IDL.Opt(IDL.Nat64),
2369
+ day_after_genesis: IDL.Nat64,
2370
+ actual_timestamp_seconds: IDL.Nat64,
2371
+ total_available_e8s_equivalent: IDL.Nat64,
2372
+ latest_round_available_e8s_equivalent: IDL.Opt(IDL.Nat64),
2373
+ distributed_e8s_equivalent: IDL.Nat64,
2374
+ settled_proposals: IDL.Vec(ProposalId)
2375
+ });
2376
+ const NeuronStakeTransfer = IDL.Record({
2377
+ to_subaccount: IDL.Vec(IDL.Nat8),
2378
+ neuron_stake_e8s: IDL.Nat64,
2379
+ from: IDL.Opt(IDL.Principal),
2380
+ memo: IDL.Nat64,
2381
+ from_subaccount: IDL.Vec(IDL.Nat8),
2382
+ transfer_timestamp: IDL.Nat64,
2383
+ block_height: IDL.Nat64
2384
+ });
2385
+ const Followers = IDL.Record({ followers: IDL.Vec(NeuronId) });
2386
+ const FollowersMap = IDL.Record({
2387
+ followers_map: IDL.Vec(IDL.Tuple(IDL.Nat64, Followers))
2388
+ });
2389
+ const Progress = IDL.Variant({ LastNeuronId: NeuronId });
2390
+ const Migration = IDL.Record({
2391
+ status: IDL.Opt(IDL.Int32),
2392
+ failure_reason: IDL.Opt(IDL.Text),
2393
+ progress: IDL.Opt(Progress)
2394
+ });
2395
+ const Migrations = IDL.Record({
2396
+ neuron_indexes_migration: IDL.Opt(Migration),
2397
+ copy_inactive_neurons_to_stable_memory_migration: IDL.Opt(Migration)
2398
+ });
2399
+ const GovernanceError = IDL.Record({
2400
+ error_message: IDL.Text,
2401
+ error_type: IDL.Int32
2402
+ });
2403
+ const Ballot = IDL.Record({ vote: IDL.Int32, voting_power: IDL.Nat64 });
2404
+ const SwapParticipationLimits = IDL.Record({
2405
+ min_participant_icp_e8s: IDL.Opt(IDL.Nat64),
2406
+ max_participant_icp_e8s: IDL.Opt(IDL.Nat64),
2407
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
2408
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
2409
+ });
2410
+ const NeuronsFundNeuronPortion = IDL.Record({
2411
+ controller: IDL.Opt(IDL.Principal),
2412
+ hotkeys: IDL.Vec(IDL.Principal),
2413
+ is_capped: IDL.Opt(IDL.Bool),
2414
+ maturity_equivalent_icp_e8s: IDL.Opt(IDL.Nat64),
2415
+ nns_neuron_id: IDL.Opt(NeuronId),
2416
+ amount_icp_e8s: IDL.Opt(IDL.Nat64)
2417
+ });
2418
+ const NeuronsFundSnapshot = IDL.Record({
2419
+ neurons_fund_neuron_portions: IDL.Vec(NeuronsFundNeuronPortion)
2420
+ });
2421
+ const IdealMatchedParticipationFunction = IDL.Record({
2422
+ serialized_representation: IDL.Opt(IDL.Text)
2423
+ });
2424
+ const NeuronsFundParticipation = IDL.Record({
2425
+ total_maturity_equivalent_icp_e8s: IDL.Opt(IDL.Nat64),
2426
+ intended_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
2427
+ direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
2428
+ swap_participation_limits: IDL.Opt(SwapParticipationLimits),
2429
+ max_neurons_fund_swap_participation_icp_e8s: IDL.Opt(IDL.Nat64),
2430
+ neurons_fund_reserves: IDL.Opt(NeuronsFundSnapshot),
2431
+ ideal_matched_participation_function: IDL.Opt(
2432
+ IdealMatchedParticipationFunction
2433
+ ),
2434
+ allocated_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64)
2435
+ });
2436
+ const NeuronsFundData = IDL.Record({
2437
+ final_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
2438
+ initial_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
2439
+ neurons_fund_refunds: IDL.Opt(NeuronsFundSnapshot)
2440
+ });
2441
+ const CanisterStatusResultV2 = IDL.Record({
2442
+ status: IDL.Opt(IDL.Int32),
2443
+ freezing_threshold: IDL.Opt(IDL.Nat64),
2444
+ controllers: IDL.Vec(IDL.Principal),
2445
+ memory_size: IDL.Opt(IDL.Nat64),
2446
+ cycles: IDL.Opt(IDL.Nat64),
2447
+ idle_cycles_burned_per_day: IDL.Opt(IDL.Nat64),
2448
+ module_hash: IDL.Vec(IDL.Nat8)
2449
+ });
2450
+ const CanisterSummary = IDL.Record({
2451
+ status: IDL.Opt(CanisterStatusResultV2),
2452
+ canister_id: IDL.Opt(IDL.Principal)
2453
+ });
2454
+ const SwapBackgroundInformation = IDL.Record({
2455
+ ledger_index_canister_summary: IDL.Opt(CanisterSummary),
2456
+ fallback_controller_principal_ids: IDL.Vec(IDL.Principal),
2457
+ ledger_archive_canister_summaries: IDL.Vec(CanisterSummary),
2458
+ ledger_canister_summary: IDL.Opt(CanisterSummary),
2459
+ swap_canister_summary: IDL.Opt(CanisterSummary),
2460
+ governance_canister_summary: IDL.Opt(CanisterSummary),
2461
+ root_canister_summary: IDL.Opt(CanisterSummary),
2462
+ dapp_canister_summaries: IDL.Vec(CanisterSummary)
2463
+ });
2464
+ const DerivedProposalInformation = IDL.Record({
2465
+ swap_background_information: IDL.Opt(SwapBackgroundInformation)
2466
+ });
2467
+ const Tally = IDL.Record({
2468
+ no: IDL.Nat64,
2469
+ yes: IDL.Nat64,
2470
+ total: IDL.Nat64,
2471
+ timestamp_seconds: IDL.Nat64
2472
+ });
2473
+ const WaitForQuietState = IDL.Record({
2474
+ current_deadline_timestamp_seconds: IDL.Nat64
2475
+ });
2476
+ const ProposalData = IDL.Record({
2477
+ id: IDL.Opt(ProposalId),
2478
+ failure_reason: IDL.Opt(GovernanceError),
2479
+ ballots: IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
2480
+ proposal_timestamp_seconds: IDL.Nat64,
2481
+ reward_event_round: IDL.Nat64,
2482
+ failed_timestamp_seconds: IDL.Nat64,
2483
+ neurons_fund_data: IDL.Opt(NeuronsFundData),
2484
+ reject_cost_e8s: IDL.Nat64,
2485
+ derived_proposal_information: IDL.Opt(DerivedProposalInformation),
2486
+ latest_tally: IDL.Opt(Tally),
2487
+ total_potential_voting_power: IDL.Opt(IDL.Nat64),
2488
+ sns_token_swap_lifecycle: IDL.Opt(IDL.Int32),
2489
+ decided_timestamp_seconds: IDL.Nat64,
2490
+ proposal: IDL.Opt(Proposal),
2491
+ proposer: IDL.Opt(NeuronId),
2492
+ wait_for_quiet_state: IDL.Opt(WaitForQuietState),
2493
+ executed_timestamp_seconds: IDL.Nat64,
2494
+ original_total_community_fund_maturity_e8s_equivalent: IDL.Opt(
2495
+ IDL.Nat64
2496
+ )
2497
+ });
2498
+ const Command_2 = IDL.Variant({
2499
+ Spawn: NeuronId,
2500
+ Split: Split,
2501
+ Configure: Configure,
2502
+ Merge: Merge,
2503
+ DisburseToNeuron: DisburseToNeuron,
2504
+ SyncCommand: IDL.Record({}),
2505
+ ClaimOrRefreshNeuron: ClaimOrRefresh,
2506
+ MergeMaturity: MergeMaturity,
2507
+ Disburse: Disburse
2508
+ });
2509
+ const NeuronInFlightCommand = IDL.Record({
2510
+ command: IDL.Opt(Command_2),
2511
+ timestamp: IDL.Nat64
2512
+ });
2513
+ const BallotInfo = IDL.Record({
2514
+ vote: IDL.Int32,
2515
+ proposal_id: IDL.Opt(ProposalId)
2516
+ });
2517
+ const DissolveState = IDL.Variant({
2518
+ DissolveDelaySeconds: IDL.Nat64,
2519
+ WhenDissolvedTimestampSeconds: IDL.Nat64
2520
+ });
2521
+ const Neuron = IDL.Record({
2522
+ id: IDL.Opt(NeuronId),
2523
+ staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
2524
+ controller: IDL.Opt(IDL.Principal),
2525
+ recent_ballots: IDL.Vec(BallotInfo),
2526
+ voting_power_refreshed_timestamp_seconds: IDL.Opt(IDL.Nat64),
2527
+ kyc_verified: IDL.Bool,
2528
+ potential_voting_power: IDL.Opt(IDL.Nat64),
2529
+ neuron_type: IDL.Opt(IDL.Int32),
2530
+ not_for_profit: IDL.Bool,
2531
+ maturity_e8s_equivalent: IDL.Nat64,
2532
+ deciding_voting_power: IDL.Opt(IDL.Nat64),
2533
+ cached_neuron_stake_e8s: IDL.Nat64,
2534
+ created_timestamp_seconds: IDL.Nat64,
2535
+ auto_stake_maturity: IDL.Opt(IDL.Bool),
2536
+ aging_since_timestamp_seconds: IDL.Nat64,
2537
+ hot_keys: IDL.Vec(IDL.Principal),
2538
+ account: IDL.Vec(IDL.Nat8),
2539
+ joined_community_fund_timestamp_seconds: IDL.Opt(IDL.Nat64),
2540
+ dissolve_state: IDL.Opt(DissolveState),
2541
+ followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
2542
+ neuron_fees_e8s: IDL.Nat64,
2543
+ visibility: IDL.Opt(IDL.Int32),
2544
+ transfer: IDL.Opt(NeuronStakeTransfer),
2545
+ known_neuron_data: IDL.Opt(KnownNeuronData),
2546
+ spawn_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
2547
+ });
2548
+ const Governance = IDL.Record({
2549
+ default_followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
2550
+ making_sns_proposal: IDL.Opt(MakingSnsProposal),
2551
+ most_recent_monthly_node_provider_rewards: IDL.Opt(
2552
+ MonthlyNodeProviderRewards
2553
+ ),
2554
+ maturity_modulation_last_updated_at_timestamp_seconds: IDL.Opt(
2555
+ IDL.Nat64
2556
+ ),
2557
+ wait_for_quiet_threshold_seconds: IDL.Nat64,
2558
+ metrics: IDL.Opt(GovernanceCachedMetrics),
2559
+ neuron_management_voting_period_seconds: IDL.Opt(IDL.Nat64),
2560
+ node_providers: IDL.Vec(NodeProvider),
2561
+ cached_daily_maturity_modulation_basis_points: IDL.Opt(IDL.Int32),
2562
+ economics: IDL.Opt(NetworkEconomics),
2563
+ restore_aging_summary: IDL.Opt(RestoreAgingSummary),
2564
+ spawning_neurons: IDL.Opt(IDL.Bool),
2565
+ latest_reward_event: IDL.Opt(RewardEvent),
2566
+ to_claim_transfers: IDL.Vec(NeuronStakeTransfer),
2567
+ short_voting_period_seconds: IDL.Nat64,
2568
+ topic_followee_index: IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
2569
+ migrations: IDL.Opt(Migrations),
2570
+ proposals: IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
2571
+ xdr_conversion_rate: IDL.Opt(XdrConversionRate),
2572
+ in_flight_commands: IDL.Vec(
2573
+ IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)
2574
+ ),
2575
+ neurons: IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
2576
+ genesis_timestamp_seconds: IDL.Nat64
2577
+ });
2578
+ const Result = IDL.Variant({ Ok: IDL.Null, Err: GovernanceError });
2579
+ const Result_1 = IDL.Variant({
2580
+ Error: GovernanceError,
2581
+ NeuronId: NeuronId
2582
+ });
2583
+ const ClaimOrRefreshNeuronFromAccountResponse = IDL.Record({
2584
+ result: IDL.Opt(Result_1)
2585
+ });
2586
+ const Result_2 = IDL.Variant({ Ok: Neuron, Err: GovernanceError });
2587
+ const Result_3 = IDL.Variant({
2588
+ Ok: GovernanceCachedMetrics,
2589
+ Err: GovernanceError
2590
+ });
2591
+ const Result_4 = IDL.Variant({
2592
+ Ok: MonthlyNodeProviderRewards,
2593
+ Err: GovernanceError
2594
+ });
2595
+ const NeuronInfo = IDL.Record({
2596
+ dissolve_delay_seconds: IDL.Nat64,
2597
+ recent_ballots: IDL.Vec(BallotInfo),
2598
+ voting_power_refreshed_timestamp_seconds: IDL.Opt(IDL.Nat64),
2599
+ potential_voting_power: IDL.Opt(IDL.Nat64),
2600
+ neuron_type: IDL.Opt(IDL.Int32),
2601
+ deciding_voting_power: IDL.Opt(IDL.Nat64),
2602
+ created_timestamp_seconds: IDL.Nat64,
2603
+ state: IDL.Int32,
2604
+ stake_e8s: IDL.Nat64,
2605
+ joined_community_fund_timestamp_seconds: IDL.Opt(IDL.Nat64),
2606
+ retrieved_at_timestamp_seconds: IDL.Nat64,
2607
+ visibility: IDL.Opt(IDL.Int32),
2608
+ known_neuron_data: IDL.Opt(KnownNeuronData),
2609
+ voting_power: IDL.Nat64,
2610
+ age_seconds: IDL.Nat64
2611
+ });
2612
+ const Result_5 = IDL.Variant({ Ok: NeuronInfo, Err: GovernanceError });
2613
+ const GetNeuronsFundAuditInfoRequest = IDL.Record({
2614
+ nns_proposal_id: IDL.Opt(ProposalId)
2615
+ });
2616
+ const NeuronsFundAuditInfo = IDL.Record({
2617
+ final_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
2618
+ initial_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
2619
+ neurons_fund_refunds: IDL.Opt(NeuronsFundSnapshot)
2620
+ });
2621
+ const Ok = IDL.Record({
2622
+ neurons_fund_audit_info: IDL.Opt(NeuronsFundAuditInfo)
2623
+ });
2624
+ const Result_6 = IDL.Variant({ Ok: Ok, Err: GovernanceError });
2625
+ const GetNeuronsFundAuditInfoResponse = IDL.Record({
2626
+ result: IDL.Opt(Result_6)
2627
+ });
2628
+ const Result_7 = IDL.Variant({
2629
+ Ok: NodeProvider,
2630
+ Err: GovernanceError
2631
+ });
2632
+ const ProposalInfo = IDL.Record({
2633
+ id: IDL.Opt(ProposalId),
2634
+ status: IDL.Int32,
2635
+ topic: IDL.Int32,
2636
+ failure_reason: IDL.Opt(GovernanceError),
2637
+ ballots: IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
2638
+ proposal_timestamp_seconds: IDL.Nat64,
2639
+ reward_event_round: IDL.Nat64,
2640
+ deadline_timestamp_seconds: IDL.Opt(IDL.Nat64),
2641
+ failed_timestamp_seconds: IDL.Nat64,
2642
+ reject_cost_e8s: IDL.Nat64,
2643
+ derived_proposal_information: IDL.Opt(DerivedProposalInformation),
2644
+ latest_tally: IDL.Opt(Tally),
2645
+ total_potential_voting_power: IDL.Opt(IDL.Nat64),
2646
+ reward_status: IDL.Int32,
2647
+ decided_timestamp_seconds: IDL.Nat64,
2648
+ proposal: IDL.Opt(Proposal),
2649
+ proposer: IDL.Opt(NeuronId),
2650
+ executed_timestamp_seconds: IDL.Nat64
2651
+ });
2652
+ const ListKnownNeuronsResponse = IDL.Record({
2653
+ known_neurons: IDL.Vec(KnownNeuron)
2654
+ });
2655
+ const NeuronSubaccount = IDL.Record({ subaccount: IDL.Vec(IDL.Nat8) });
2656
+ const ListNeurons = IDL.Record({
2657
+ page_size: IDL.Opt(IDL.Nat64),
2658
+ include_public_neurons_in_full_neurons: IDL.Opt(IDL.Bool),
2659
+ neuron_ids: IDL.Vec(IDL.Nat64),
2660
+ page_number: IDL.Opt(IDL.Nat64),
2661
+ include_empty_neurons_readable_by_caller: IDL.Opt(IDL.Bool),
2662
+ neuron_subaccounts: IDL.Opt(IDL.Vec(NeuronSubaccount)),
2663
+ include_neurons_readable_by_caller: IDL.Bool
2664
+ });
2665
+ const ListNeuronsResponse = IDL.Record({
2666
+ neuron_infos: IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInfo)),
2667
+ full_neurons: IDL.Vec(Neuron),
2668
+ total_pages_available: IDL.Opt(IDL.Nat64)
2669
+ });
2670
+ const DateRangeFilter = IDL.Record({
2671
+ start_timestamp_seconds: IDL.Opt(IDL.Nat64),
2672
+ end_timestamp_seconds: IDL.Opt(IDL.Nat64)
2673
+ });
2674
+ const ListNodeProviderRewardsRequest = IDL.Record({
2675
+ date_filter: IDL.Opt(DateRangeFilter)
2676
+ });
2677
+ const ListNodeProviderRewardsResponse = IDL.Record({
2678
+ rewards: IDL.Vec(MonthlyNodeProviderRewards)
2679
+ });
2680
+ const ListNodeProvidersResponse = IDL.Record({
2681
+ node_providers: IDL.Vec(NodeProvider)
2682
+ });
2683
+ const ListProposalInfo = IDL.Record({
2684
+ include_reward_status: IDL.Vec(IDL.Int32),
2685
+ omit_large_fields: IDL.Opt(IDL.Bool),
2686
+ before_proposal: IDL.Opt(ProposalId),
2687
+ limit: IDL.Nat32,
2688
+ exclude_topic: IDL.Vec(IDL.Int32),
2689
+ include_all_manage_neuron_proposals: IDL.Opt(IDL.Bool),
2690
+ include_status: IDL.Vec(IDL.Int32)
2691
+ });
2692
+ const ListProposalInfoResponse = IDL.Record({
2693
+ proposal_info: IDL.Vec(ProposalInfo)
2694
+ });
2695
+ const InstallCodeRequest = IDL.Record({
2696
+ arg: IDL.Opt(IDL.Vec(IDL.Nat8)),
2697
+ wasm_module: IDL.Opt(IDL.Vec(IDL.Nat8)),
2698
+ skip_stopping_before_installing: IDL.Opt(IDL.Bool),
2699
+ canister_id: IDL.Opt(IDL.Principal),
2700
+ install_mode: IDL.Opt(IDL.Int32)
2701
+ });
2702
+ const ProposalActionRequest = IDL.Variant({
2703
+ RegisterKnownNeuron: KnownNeuron,
2704
+ ManageNeuron: ManageNeuronRequest,
2705
+ UpdateCanisterSettings: UpdateCanisterSettings,
2706
+ InstallCode: InstallCodeRequest,
2707
+ StopOrStartCanister: StopOrStartCanister,
2708
+ CreateServiceNervousSystem: CreateServiceNervousSystem,
2709
+ ExecuteNnsFunction: ExecuteNnsFunction,
2710
+ RewardNodeProvider: RewardNodeProvider,
2711
+ RewardNodeProviders: RewardNodeProviders,
2712
+ ManageNetworkEconomics: NetworkEconomics,
2713
+ ApproveGenesisKyc: Principals,
2714
+ AddOrRemoveNodeProvider: AddOrRemoveNodeProvider,
2715
+ Motion: Motion
2716
+ });
2717
+ const MakeProposalRequest = IDL.Record({
2718
+ url: IDL.Text,
2719
+ title: IDL.Opt(IDL.Text),
2720
+ action: IDL.Opt(ProposalActionRequest),
2721
+ summary: IDL.Text
2722
+ });
2723
+ const ManageNeuronCommandRequest = IDL.Variant({
2724
+ Spawn: Spawn,
2725
+ Split: Split,
2726
+ Follow: Follow,
2727
+ RefreshVotingPower: RefreshVotingPower,
2728
+ ClaimOrRefresh: ClaimOrRefresh,
2729
+ Configure: Configure,
2730
+ RegisterVote: RegisterVote,
2731
+ Merge: Merge,
2732
+ DisburseToNeuron: DisburseToNeuron,
2733
+ MakeProposal: MakeProposalRequest,
2734
+ StakeMaturity: StakeMaturity,
2735
+ MergeMaturity: MergeMaturity,
2736
+ Disburse: Disburse
2737
+ });
2738
+ ManageNeuronRequest.fill(
2739
+ IDL.Record({
2740
+ id: IDL.Opt(NeuronId),
2741
+ command: IDL.Opt(ManageNeuronCommandRequest),
2742
+ neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount)
2743
+ })
2744
+ );
2745
+ const SpawnResponse = IDL.Record({ created_neuron_id: IDL.Opt(NeuronId) });
2746
+ const RefreshVotingPowerResponse = IDL.Record({});
2747
+ const ClaimOrRefreshResponse = IDL.Record({
2748
+ refreshed_neuron_id: IDL.Opt(NeuronId)
2749
+ });
2750
+ const MergeResponse = IDL.Record({
2751
+ target_neuron: IDL.Opt(Neuron),
2752
+ source_neuron: IDL.Opt(Neuron),
2753
+ target_neuron_info: IDL.Opt(NeuronInfo),
2754
+ source_neuron_info: IDL.Opt(NeuronInfo)
2755
+ });
2756
+ const MakeProposalResponse = IDL.Record({
2757
+ message: IDL.Opt(IDL.Text),
2758
+ proposal_id: IDL.Opt(ProposalId)
2759
+ });
2760
+ const StakeMaturityResponse = IDL.Record({
2761
+ maturity_e8s: IDL.Nat64,
2762
+ staked_maturity_e8s: IDL.Nat64
2763
+ });
2764
+ const MergeMaturityResponse = IDL.Record({
2765
+ merged_maturity_e8s: IDL.Nat64,
2766
+ new_stake_e8s: IDL.Nat64
2767
+ });
2768
+ const DisburseResponse = IDL.Record({ transfer_block_height: IDL.Nat64 });
2769
+ const Command_1 = IDL.Variant({
2770
+ Error: GovernanceError,
2771
+ Spawn: SpawnResponse,
2772
+ Split: SpawnResponse,
2773
+ Follow: IDL.Record({}),
2774
+ RefreshVotingPower: RefreshVotingPowerResponse,
2775
+ ClaimOrRefresh: ClaimOrRefreshResponse,
2776
+ Configure: IDL.Record({}),
2777
+ RegisterVote: IDL.Record({}),
2778
+ Merge: MergeResponse,
2779
+ DisburseToNeuron: SpawnResponse,
2780
+ MakeProposal: MakeProposalResponse,
2781
+ StakeMaturity: StakeMaturityResponse,
2782
+ MergeMaturity: MergeMaturityResponse,
2783
+ Disburse: DisburseResponse
2784
+ });
2785
+ const ManageNeuronResponse = IDL.Record({ command: IDL.Opt(Command_1) });
2786
+ const Committed = IDL.Record({
2787
+ total_direct_contribution_icp_e8s: IDL.Opt(IDL.Nat64),
2788
+ total_neurons_fund_contribution_icp_e8s: IDL.Opt(IDL.Nat64),
2789
+ sns_governance_canister_id: IDL.Opt(IDL.Principal)
2790
+ });
2791
+ const Result_8 = IDL.Variant({
2792
+ Committed: Committed,
2793
+ Aborted: IDL.Record({})
2794
+ });
2795
+ const SettleCommunityFundParticipation = IDL.Record({
2796
+ result: IDL.Opt(Result_8),
2797
+ open_sns_token_swap_proposal_id: IDL.Opt(IDL.Nat64)
2798
+ });
2799
+ const Committed_1 = IDL.Record({
2800
+ total_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
2801
+ total_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
2802
+ sns_governance_canister_id: IDL.Opt(IDL.Principal)
2803
+ });
2804
+ const Result_9 = IDL.Variant({
2805
+ Committed: Committed_1,
2806
+ Aborted: IDL.Record({})
2807
+ });
2808
+ const SettleNeuronsFundParticipationRequest = IDL.Record({
2809
+ result: IDL.Opt(Result_9),
2810
+ nns_proposal_id: IDL.Opt(IDL.Nat64)
2811
+ });
2812
+ const NeuronsFundNeuron = IDL.Record({
2813
+ controller: IDL.Opt(IDL.Principal),
2814
+ hotkeys: IDL.Opt(Principals),
2815
+ is_capped: IDL.Opt(IDL.Bool),
2816
+ nns_neuron_id: IDL.Opt(IDL.Nat64),
2817
+ amount_icp_e8s: IDL.Opt(IDL.Nat64)
2818
+ });
2819
+ const Ok_1 = IDL.Record({
2820
+ neurons_fund_neuron_portions: IDL.Vec(NeuronsFundNeuron)
2821
+ });
2822
+ const Result_10 = IDL.Variant({ Ok: Ok_1, Err: GovernanceError });
2823
+ const SettleNeuronsFundParticipationResponse = IDL.Record({
2824
+ result: IDL.Opt(Result_10)
2825
+ });
2826
+ const UpdateNodeProvider = IDL.Record({
2827
+ reward_account: IDL.Opt(AccountIdentifier)
2828
+ });
2829
+ return IDL.Service({
2830
+ claim_gtc_neurons: IDL.Func(
2831
+ [IDL.Principal, IDL.Vec(NeuronId)],
2832
+ [Result],
2833
+ []
2834
+ ),
2835
+ claim_or_refresh_neuron_from_account: IDL.Func(
2836
+ [ClaimOrRefreshNeuronFromAccount],
2837
+ [ClaimOrRefreshNeuronFromAccountResponse],
2838
+ []
2839
+ ),
2840
+ get_build_metadata: IDL.Func([], [IDL.Text], ['query']),
2841
+ get_full_neuron: IDL.Func([IDL.Nat64], [Result_2], ['query']),
2842
+ get_full_neuron_by_id_or_subaccount: IDL.Func(
2843
+ [NeuronIdOrSubaccount],
2844
+ [Result_2],
2845
+ ['query']
2846
+ ),
2847
+ get_latest_reward_event: IDL.Func([], [RewardEvent], ['query']),
2848
+ get_metrics: IDL.Func([], [Result_3], ['query']),
2849
+ get_monthly_node_provider_rewards: IDL.Func([], [Result_4], []),
2850
+ get_most_recent_monthly_node_provider_rewards: IDL.Func(
2851
+ [],
2852
+ [IDL.Opt(MonthlyNodeProviderRewards)],
2853
+ ['query']
2854
+ ),
2855
+ get_network_economics_parameters: IDL.Func(
2856
+ [],
2857
+ [NetworkEconomics],
2858
+ ['query']
2859
+ ),
2860
+ get_neuron_ids: IDL.Func([], [IDL.Vec(IDL.Nat64)], ['query']),
2861
+ get_neuron_info: IDL.Func([IDL.Nat64], [Result_5], ['query']),
2862
+ get_neuron_info_by_id_or_subaccount: IDL.Func(
2863
+ [NeuronIdOrSubaccount],
2864
+ [Result_5],
2865
+ ['query']
2866
+ ),
2867
+ get_neurons_fund_audit_info: IDL.Func(
2868
+ [GetNeuronsFundAuditInfoRequest],
2869
+ [GetNeuronsFundAuditInfoResponse],
2870
+ ['query']
2871
+ ),
2872
+ get_node_provider_by_caller: IDL.Func(
2873
+ [IDL.Null],
2874
+ [Result_7],
2875
+ ['query']
2876
+ ),
2877
+ get_pending_proposals: IDL.Func([], [IDL.Vec(ProposalInfo)], ['query']),
2878
+ get_proposal_info: IDL.Func(
2879
+ [IDL.Nat64],
2880
+ [IDL.Opt(ProposalInfo)],
2881
+ ['query']
2882
+ ),
2883
+ get_restore_aging_summary: IDL.Func(
2884
+ [],
2885
+ [RestoreAgingSummary],
2886
+ ['query']
2887
+ ),
2888
+ list_known_neurons: IDL.Func([], [ListKnownNeuronsResponse], ['query']),
2889
+ list_neurons: IDL.Func([ListNeurons], [ListNeuronsResponse], ['query']),
2890
+ list_node_provider_rewards: IDL.Func(
2891
+ [ListNodeProviderRewardsRequest],
2892
+ [ListNodeProviderRewardsResponse],
2893
+ ['query']
2894
+ ),
2895
+ list_node_providers: IDL.Func(
2896
+ [],
2897
+ [ListNodeProvidersResponse],
2898
+ ['query']
2899
+ ),
2900
+ list_proposals: IDL.Func(
2901
+ [ListProposalInfo],
2902
+ [ListProposalInfoResponse],
2903
+ ['query']
2904
+ ),
2905
+ manage_neuron: IDL.Func(
2906
+ [ManageNeuronRequest],
2907
+ [ManageNeuronResponse],
2908
+ []
2909
+ ),
2910
+ settle_community_fund_participation: IDL.Func(
2911
+ [SettleCommunityFundParticipation],
2912
+ [Result],
2913
+ []
2914
+ ),
2915
+ settle_neurons_fund_participation: IDL.Func(
2916
+ [SettleNeuronsFundParticipationRequest],
2917
+ [SettleNeuronsFundParticipationResponse],
2918
+ []
2919
+ ),
2920
+ simulate_manage_neuron: IDL.Func(
2921
+ [ManageNeuronRequest],
2922
+ [ManageNeuronResponse],
2923
+ []
2924
+ ),
2925
+ transfer_gtc_neuron: IDL.Func([NeuronId, NeuronId], [Result], []),
2926
+ update_node_provider: IDL.Func([UpdateNodeProvider], [Result], [])
2927
+ });
2928
+ };
2929
+ export const init: init = ({ IDL }) => {
2930
+ const Proposal = IDL.Rec();
2931
+ const NeuronId = IDL.Record({ id: IDL.Nat64 });
2932
+ const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
2933
+ const KnownNeuronData = IDL.Record({
2934
+ name: IDL.Text,
2935
+ description: IDL.Opt(IDL.Text)
2936
+ });
2937
+ const KnownNeuron = IDL.Record({
2938
+ id: IDL.Opt(NeuronId),
2939
+ known_neuron_data: IDL.Opt(KnownNeuronData)
2940
+ });
2941
+ const Spawn = IDL.Record({
2942
+ percentage_to_spawn: IDL.Opt(IDL.Nat32),
2943
+ new_controller: IDL.Opt(IDL.Principal),
2944
+ nonce: IDL.Opt(IDL.Nat64)
2945
+ });
2946
+ const Split = IDL.Record({ amount_e8s: IDL.Nat64 });
2947
+ const Follow = IDL.Record({
2948
+ topic: IDL.Int32,
2949
+ followees: IDL.Vec(NeuronId)
2950
+ });
2951
+ const RefreshVotingPower = IDL.Record({});
2952
+ const ClaimOrRefreshNeuronFromAccount = IDL.Record({
2953
+ controller: IDL.Opt(IDL.Principal),
2954
+ memo: IDL.Nat64
2955
+ });
2956
+ const By = IDL.Variant({
2957
+ NeuronIdOrSubaccount: IDL.Record({}),
2958
+ MemoAndController: ClaimOrRefreshNeuronFromAccount,
2959
+ Memo: IDL.Nat64
2960
+ });
2961
+ const ClaimOrRefresh = IDL.Record({ by: IDL.Opt(By) });
2962
+ const RemoveHotKey = IDL.Record({
2963
+ hot_key_to_remove: IDL.Opt(IDL.Principal)
2964
+ });
2965
+ const AddHotKey = IDL.Record({ new_hot_key: IDL.Opt(IDL.Principal) });
2966
+ const ChangeAutoStakeMaturity = IDL.Record({
2967
+ requested_setting_for_auto_stake_maturity: IDL.Bool
2968
+ });
2969
+ const IncreaseDissolveDelay = IDL.Record({
2970
+ additional_dissolve_delay_seconds: IDL.Nat32
2971
+ });
2972
+ const SetVisibility = IDL.Record({ visibility: IDL.Opt(IDL.Int32) });
2973
+ const SetDissolveTimestamp = IDL.Record({
2974
+ dissolve_timestamp_seconds: IDL.Nat64
2975
+ });
2976
+ const Operation = IDL.Variant({
2977
+ RemoveHotKey: RemoveHotKey,
2978
+ AddHotKey: AddHotKey,
2979
+ ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
2980
+ StopDissolving: IDL.Record({}),
2981
+ StartDissolving: IDL.Record({}),
2982
+ IncreaseDissolveDelay: IncreaseDissolveDelay,
2983
+ SetVisibility: SetVisibility,
2984
+ JoinCommunityFund: IDL.Record({}),
2985
+ LeaveCommunityFund: IDL.Record({}),
2986
+ SetDissolveTimestamp: SetDissolveTimestamp
2987
+ });
2988
+ const Configure = IDL.Record({ operation: IDL.Opt(Operation) });
2989
+ const ProposalId = IDL.Record({ id: IDL.Nat64 });
2990
+ const RegisterVote = IDL.Record({
2991
+ vote: IDL.Int32,
2992
+ proposal: IDL.Opt(ProposalId)
2993
+ });
2994
+ const Merge = IDL.Record({ source_neuron_id: IDL.Opt(NeuronId) });
2995
+ const DisburseToNeuron = IDL.Record({
2996
+ dissolve_delay_seconds: IDL.Nat64,
2997
+ kyc_verified: IDL.Bool,
2998
+ amount_e8s: IDL.Nat64,
2999
+ new_controller: IDL.Opt(IDL.Principal),
3000
+ nonce: IDL.Nat64
3001
+ });
3002
+ const StakeMaturity = IDL.Record({
3003
+ percentage_to_stake: IDL.Opt(IDL.Nat32)
3004
+ });
3005
+ const MergeMaturity = IDL.Record({ percentage_to_merge: IDL.Nat32 });
3006
+ const AccountIdentifier = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
3007
+ const Amount = IDL.Record({ e8s: IDL.Nat64 });
3008
+ const Disburse = IDL.Record({
3009
+ to_account: IDL.Opt(AccountIdentifier),
3010
+ amount: IDL.Opt(Amount)
3011
+ });
3012
+ const Command = IDL.Variant({
3013
+ Spawn: Spawn,
3014
+ Split: Split,
3015
+ Follow: Follow,
3016
+ RefreshVotingPower: RefreshVotingPower,
3017
+ ClaimOrRefresh: ClaimOrRefresh,
3018
+ Configure: Configure,
3019
+ RegisterVote: RegisterVote,
3020
+ Merge: Merge,
3021
+ DisburseToNeuron: DisburseToNeuron,
3022
+ MakeProposal: Proposal,
3023
+ StakeMaturity: StakeMaturity,
3024
+ MergeMaturity: MergeMaturity,
3025
+ Disburse: Disburse
3026
+ });
3027
+ const NeuronIdOrSubaccount = IDL.Variant({
3028
+ Subaccount: IDL.Vec(IDL.Nat8),
3029
+ NeuronId: NeuronId
3030
+ });
3031
+ const ManageNeuron = IDL.Record({
3032
+ id: IDL.Opt(NeuronId),
3033
+ command: IDL.Opt(Command),
3034
+ neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount)
3035
+ });
3036
+ const Controllers = IDL.Record({ controllers: IDL.Vec(IDL.Principal) });
3037
+ const CanisterSettings = IDL.Record({
3038
+ freezing_threshold: IDL.Opt(IDL.Nat64),
3039
+ wasm_memory_threshold: IDL.Opt(IDL.Nat64),
3040
+ controllers: IDL.Opt(Controllers),
3041
+ log_visibility: IDL.Opt(IDL.Int32),
3042
+ wasm_memory_limit: IDL.Opt(IDL.Nat64),
3043
+ memory_allocation: IDL.Opt(IDL.Nat64),
3044
+ compute_allocation: IDL.Opt(IDL.Nat64)
3045
+ });
3046
+ const UpdateCanisterSettings = IDL.Record({
3047
+ canister_id: IDL.Opt(IDL.Principal),
3048
+ settings: IDL.Opt(CanisterSettings)
3049
+ });
3050
+ const InstallCode = IDL.Record({
3051
+ skip_stopping_before_installing: IDL.Opt(IDL.Bool),
3052
+ wasm_module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
3053
+ canister_id: IDL.Opt(IDL.Principal),
3054
+ arg_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
3055
+ install_mode: IDL.Opt(IDL.Int32)
3056
+ });
3057
+ const StopOrStartCanister = IDL.Record({
3058
+ action: IDL.Opt(IDL.Int32),
3059
+ canister_id: IDL.Opt(IDL.Principal)
3060
+ });
3061
+ const Percentage = IDL.Record({ basis_points: IDL.Opt(IDL.Nat64) });
3062
+ const Duration = IDL.Record({ seconds: IDL.Opt(IDL.Nat64) });
3063
+ const Tokens = IDL.Record({ e8s: IDL.Opt(IDL.Nat64) });
3064
+ const VotingRewardParameters = IDL.Record({
3065
+ reward_rate_transition_duration: IDL.Opt(Duration),
3066
+ initial_reward_rate: IDL.Opt(Percentage),
3067
+ final_reward_rate: IDL.Opt(Percentage)
3068
+ });
3069
+ const GovernanceParameters = IDL.Record({
3070
+ neuron_maximum_dissolve_delay_bonus: IDL.Opt(Percentage),
3071
+ neuron_maximum_age_for_age_bonus: IDL.Opt(Duration),
3072
+ neuron_maximum_dissolve_delay: IDL.Opt(Duration),
3073
+ neuron_minimum_dissolve_delay_to_vote: IDL.Opt(Duration),
3074
+ neuron_maximum_age_bonus: IDL.Opt(Percentage),
3075
+ neuron_minimum_stake: IDL.Opt(Tokens),
3076
+ proposal_wait_for_quiet_deadline_increase: IDL.Opt(Duration),
3077
+ proposal_initial_voting_period: IDL.Opt(Duration),
3078
+ proposal_rejection_fee: IDL.Opt(Tokens),
3079
+ voting_reward_parameters: IDL.Opt(VotingRewardParameters)
3080
+ });
3081
+ const Image = IDL.Record({ base64_encoding: IDL.Opt(IDL.Text) });
3082
+ const LedgerParameters = IDL.Record({
3083
+ transaction_fee: IDL.Opt(Tokens),
3084
+ token_symbol: IDL.Opt(IDL.Text),
3085
+ token_logo: IDL.Opt(Image),
3086
+ token_name: IDL.Opt(IDL.Text)
3087
+ });
3088
+ const Canister = IDL.Record({ id: IDL.Opt(IDL.Principal) });
3089
+ const NeuronBasketConstructionParameters = IDL.Record({
3090
+ dissolve_delay_interval: IDL.Opt(Duration),
3091
+ count: IDL.Opt(IDL.Nat64)
3092
+ });
3093
+ const GlobalTimeOfDay = IDL.Record({
3094
+ seconds_after_utc_midnight: IDL.Opt(IDL.Nat64)
3095
+ });
3096
+ const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
3097
+ const SwapParameters = IDL.Record({
3098
+ minimum_participants: IDL.Opt(IDL.Nat64),
3099
+ neurons_fund_participation: IDL.Opt(IDL.Bool),
3100
+ duration: IDL.Opt(Duration),
3101
+ neuron_basket_construction_parameters: IDL.Opt(
3102
+ NeuronBasketConstructionParameters
3103
+ ),
3104
+ confirmation_text: IDL.Opt(IDL.Text),
3105
+ maximum_participant_icp: IDL.Opt(Tokens),
3106
+ minimum_icp: IDL.Opt(Tokens),
3107
+ minimum_direct_participation_icp: IDL.Opt(Tokens),
3108
+ minimum_participant_icp: IDL.Opt(Tokens),
3109
+ start_time: IDL.Opt(GlobalTimeOfDay),
3110
+ maximum_direct_participation_icp: IDL.Opt(Tokens),
3111
+ maximum_icp: IDL.Opt(Tokens),
3112
+ neurons_fund_investment_icp: IDL.Opt(Tokens),
3113
+ restricted_countries: IDL.Opt(Countries)
3114
+ });
3115
+ const SwapDistribution = IDL.Record({ total: IDL.Opt(Tokens) });
3116
+ const NeuronDistribution = IDL.Record({
3117
+ controller: IDL.Opt(IDL.Principal),
3118
+ dissolve_delay: IDL.Opt(Duration),
3119
+ memo: IDL.Opt(IDL.Nat64),
3120
+ vesting_period: IDL.Opt(Duration),
3121
+ stake: IDL.Opt(Tokens)
3122
+ });
3123
+ const DeveloperDistribution = IDL.Record({
3124
+ developer_neurons: IDL.Vec(NeuronDistribution)
3125
+ });
3126
+ const InitialTokenDistribution = IDL.Record({
3127
+ treasury_distribution: IDL.Opt(SwapDistribution),
3128
+ developer_distribution: IDL.Opt(DeveloperDistribution),
3129
+ swap_distribution: IDL.Opt(SwapDistribution)
3130
+ });
3131
+ const CreateServiceNervousSystem = IDL.Record({
3132
+ url: IDL.Opt(IDL.Text),
3133
+ governance_parameters: IDL.Opt(GovernanceParameters),
3134
+ fallback_controller_principal_ids: IDL.Vec(IDL.Principal),
3135
+ logo: IDL.Opt(Image),
3136
+ name: IDL.Opt(IDL.Text),
3137
+ ledger_parameters: IDL.Opt(LedgerParameters),
3138
+ description: IDL.Opt(IDL.Text),
3139
+ dapp_canisters: IDL.Vec(Canister),
3140
+ swap_parameters: IDL.Opt(SwapParameters),
3141
+ initial_token_distribution: IDL.Opt(InitialTokenDistribution)
3142
+ });
3143
+ const ExecuteNnsFunction = IDL.Record({
3144
+ nns_function: IDL.Int32,
3145
+ payload: IDL.Vec(IDL.Nat8)
3146
+ });
3147
+ const NodeProvider = IDL.Record({
3148
+ id: IDL.Opt(IDL.Principal),
3149
+ reward_account: IDL.Opt(AccountIdentifier)
3150
+ });
3151
+ const RewardToNeuron = IDL.Record({ dissolve_delay_seconds: IDL.Nat64 });
3152
+ const RewardToAccount = IDL.Record({
3153
+ to_account: IDL.Opt(AccountIdentifier)
3154
+ });
3155
+ const RewardMode = IDL.Variant({
3156
+ RewardToNeuron: RewardToNeuron,
3157
+ RewardToAccount: RewardToAccount
3158
+ });
3159
+ const RewardNodeProvider = IDL.Record({
3160
+ node_provider: IDL.Opt(NodeProvider),
3161
+ reward_mode: IDL.Opt(RewardMode),
3162
+ amount_e8s: IDL.Nat64
3163
+ });
3164
+ const NeuronBasketConstructionParameters_1 = IDL.Record({
3165
+ dissolve_delay_interval_seconds: IDL.Nat64,
3166
+ count: IDL.Nat64
3167
+ });
3168
+ const Params = IDL.Record({
3169
+ min_participant_icp_e8s: IDL.Nat64,
3170
+ neuron_basket_construction_parameters: IDL.Opt(
3171
+ NeuronBasketConstructionParameters_1
3172
+ ),
3173
+ max_icp_e8s: IDL.Nat64,
3174
+ swap_due_timestamp_seconds: IDL.Nat64,
3175
+ min_participants: IDL.Nat32,
3176
+ sns_token_e8s: IDL.Nat64,
3177
+ sale_delay_seconds: IDL.Opt(IDL.Nat64),
3178
+ max_participant_icp_e8s: IDL.Nat64,
3179
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
3180
+ min_icp_e8s: IDL.Nat64,
3181
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
3182
+ });
3183
+ const OpenSnsTokenSwap = IDL.Record({
3184
+ community_fund_investment_e8s: IDL.Opt(IDL.Nat64),
3185
+ target_swap_canister_id: IDL.Opt(IDL.Principal),
3186
+ params: IDL.Opt(Params)
3187
+ });
3188
+ const TimeWindow = IDL.Record({
3189
+ start_timestamp_seconds: IDL.Nat64,
3190
+ end_timestamp_seconds: IDL.Nat64
3191
+ });
3192
+ const SetOpenTimeWindowRequest = IDL.Record({
3193
+ open_time_window: IDL.Opt(TimeWindow)
3194
+ });
3195
+ const SetSnsTokenSwapOpenTimeWindow = IDL.Record({
3196
+ request: IDL.Opt(SetOpenTimeWindowRequest),
3197
+ swap_canister_id: IDL.Opt(IDL.Principal)
3198
+ });
3199
+ const SetDefaultFollowees = IDL.Record({
3200
+ default_followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees))
3201
+ });
3202
+ const RewardNodeProviders = IDL.Record({
3203
+ use_registry_derived_rewards: IDL.Opt(IDL.Bool),
3204
+ rewards: IDL.Vec(RewardNodeProvider)
3205
+ });
3206
+ const VotingPowerEconomics = IDL.Record({
3207
+ start_reducing_voting_power_after_seconds: IDL.Opt(IDL.Nat64),
3208
+ clear_following_after_seconds: IDL.Opt(IDL.Nat64)
3209
+ });
3210
+ const Decimal = IDL.Record({ human_readable: IDL.Opt(IDL.Text) });
3211
+ const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
3212
+ contribution_threshold_xdr: IDL.Opt(Decimal),
3213
+ one_third_participation_milestone_xdr: IDL.Opt(Decimal),
3214
+ full_participation_milestone_xdr: IDL.Opt(Decimal)
3215
+ });
3216
+ const NeuronsFundEconomics = IDL.Record({
3217
+ maximum_icp_xdr_rate: IDL.Opt(Percentage),
3218
+ neurons_fund_matched_funding_curve_coefficients: IDL.Opt(
3219
+ NeuronsFundMatchedFundingCurveCoefficients
3220
+ ),
3221
+ max_theoretical_neurons_fund_participation_amount_xdr: IDL.Opt(Decimal),
3222
+ minimum_icp_xdr_rate: IDL.Opt(Percentage)
3223
+ });
3224
+ const NetworkEconomics = IDL.Record({
3225
+ neuron_minimum_stake_e8s: IDL.Nat64,
3226
+ voting_power_economics: IDL.Opt(VotingPowerEconomics),
3227
+ max_proposals_to_keep_per_topic: IDL.Nat32,
3228
+ neuron_management_fee_per_proposal_e8s: IDL.Nat64,
3229
+ reject_cost_e8s: IDL.Nat64,
3230
+ transaction_fee_e8s: IDL.Nat64,
3231
+ neuron_spawn_dissolve_delay_seconds: IDL.Nat64,
3232
+ minimum_icp_xdr_rate: IDL.Nat64,
3233
+ maximum_node_provider_rewards_e8s: IDL.Nat64,
3234
+ neurons_fund_economics: IDL.Opt(NeuronsFundEconomics)
3235
+ });
3236
+ const Principals = IDL.Record({ principals: IDL.Vec(IDL.Principal) });
3237
+ const Change = IDL.Variant({
3238
+ ToRemove: NodeProvider,
3239
+ ToAdd: NodeProvider
3240
+ });
3241
+ const AddOrRemoveNodeProvider = IDL.Record({ change: IDL.Opt(Change) });
3242
+ const Motion = IDL.Record({ motion_text: IDL.Text });
3243
+ const Action = IDL.Variant({
3244
+ RegisterKnownNeuron: KnownNeuron,
3245
+ ManageNeuron: ManageNeuron,
3246
+ UpdateCanisterSettings: UpdateCanisterSettings,
3247
+ InstallCode: InstallCode,
3248
+ StopOrStartCanister: StopOrStartCanister,
3249
+ CreateServiceNervousSystem: CreateServiceNervousSystem,
3250
+ ExecuteNnsFunction: ExecuteNnsFunction,
3251
+ RewardNodeProvider: RewardNodeProvider,
3252
+ OpenSnsTokenSwap: OpenSnsTokenSwap,
3253
+ SetSnsTokenSwapOpenTimeWindow: SetSnsTokenSwapOpenTimeWindow,
3254
+ SetDefaultFollowees: SetDefaultFollowees,
3255
+ RewardNodeProviders: RewardNodeProviders,
3256
+ ManageNetworkEconomics: NetworkEconomics,
3257
+ ApproveGenesisKyc: Principals,
3258
+ AddOrRemoveNodeProvider: AddOrRemoveNodeProvider,
3259
+ Motion: Motion
3260
+ });
3261
+ Proposal.fill(
3262
+ IDL.Record({
3263
+ url: IDL.Text,
3264
+ title: IDL.Opt(IDL.Text),
3265
+ action: IDL.Opt(Action),
3266
+ summary: IDL.Text
3267
+ })
3268
+ );
3269
+ const MakingSnsProposal = IDL.Record({
3270
+ proposal: IDL.Opt(Proposal),
3271
+ caller: IDL.Opt(IDL.Principal),
3272
+ proposer_id: IDL.Opt(NeuronId)
3273
+ });
3274
+ const XdrConversionRate = IDL.Record({
3275
+ xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
3276
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
3277
+ });
3278
+ const MonthlyNodeProviderRewards = IDL.Record({
3279
+ minimum_xdr_permyriad_per_icp: IDL.Opt(IDL.Nat64),
3280
+ registry_version: IDL.Opt(IDL.Nat64),
3281
+ node_providers: IDL.Vec(NodeProvider),
3282
+ timestamp: IDL.Nat64,
3283
+ rewards: IDL.Vec(RewardNodeProvider),
3284
+ xdr_conversion_rate: IDL.Opt(XdrConversionRate),
3285
+ maximum_node_provider_rewards_e8s: IDL.Opt(IDL.Nat64)
3286
+ });
3287
+ const NeuronSubsetMetrics = IDL.Record({
3288
+ total_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
3289
+ maturity_e8s_equivalent_buckets: IDL.Vec(
3290
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
3291
+ ),
3292
+ voting_power_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
3293
+ total_staked_e8s: IDL.Opt(IDL.Nat64),
3294
+ count: IDL.Opt(IDL.Nat64),
3295
+ deciding_voting_power_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
3296
+ total_staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
3297
+ total_potential_voting_power: IDL.Opt(IDL.Nat64),
3298
+ total_deciding_voting_power: IDL.Opt(IDL.Nat64),
3299
+ staked_maturity_e8s_equivalent_buckets: IDL.Vec(
3300
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
3301
+ ),
3302
+ staked_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
3303
+ total_voting_power: IDL.Opt(IDL.Nat64),
3304
+ potential_voting_power_buckets: IDL.Vec(
3305
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
3306
+ ),
3307
+ count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64))
3308
+ });
3309
+ const GovernanceCachedMetrics = IDL.Record({
3310
+ total_maturity_e8s_equivalent: IDL.Nat64,
3311
+ not_dissolving_neurons_e8s_buckets: IDL.Vec(
3312
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
3313
+ ),
3314
+ dissolving_neurons_staked_maturity_e8s_equivalent_sum: IDL.Nat64,
3315
+ garbage_collectable_neurons_count: IDL.Nat64,
3316
+ dissolving_neurons_staked_maturity_e8s_equivalent_buckets: IDL.Vec(
3317
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
3318
+ ),
3319
+ neurons_with_invalid_stake_count: IDL.Nat64,
3320
+ not_dissolving_neurons_count_buckets: IDL.Vec(
3321
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
3322
+ ),
3323
+ ect_neuron_count: IDL.Nat64,
3324
+ total_supply_icp: IDL.Nat64,
3325
+ neurons_with_less_than_6_months_dissolve_delay_count: IDL.Nat64,
3326
+ dissolved_neurons_count: IDL.Nat64,
3327
+ community_fund_total_maturity_e8s_equivalent: IDL.Nat64,
3328
+ total_staked_e8s_seed: IDL.Nat64,
3329
+ total_staked_maturity_e8s_equivalent_ect: IDL.Nat64,
3330
+ total_staked_e8s: IDL.Nat64,
3331
+ fully_lost_voting_power_neuron_subset_metrics:
3332
+ IDL.Opt(NeuronSubsetMetrics),
3333
+ not_dissolving_neurons_count: IDL.Nat64,
3334
+ total_locked_e8s: IDL.Nat64,
3335
+ neurons_fund_total_active_neurons: IDL.Nat64,
3336
+ total_voting_power_non_self_authenticating_controller: IDL.Opt(
3337
+ IDL.Nat64
3338
+ ),
3339
+ total_staked_maturity_e8s_equivalent: IDL.Nat64,
3340
+ not_dissolving_neurons_e8s_buckets_ect: IDL.Vec(
3341
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
3342
+ ),
3343
+ declining_voting_power_neuron_subset_metrics:
3344
+ IDL.Opt(NeuronSubsetMetrics),
3345
+ total_staked_e8s_ect: IDL.Nat64,
3346
+ not_dissolving_neurons_staked_maturity_e8s_equivalent_sum: IDL.Nat64,
3347
+ dissolved_neurons_e8s: IDL.Nat64,
3348
+ total_staked_e8s_non_self_authenticating_controller: IDL.Opt(IDL.Nat64),
3349
+ dissolving_neurons_e8s_buckets_seed: IDL.Vec(
3350
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
3351
+ ),
3352
+ neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
3353
+ not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets: IDL.Vec(
3354
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
3355
+ ),
3356
+ dissolving_neurons_count_buckets: IDL.Vec(
3357
+ IDL.Tuple(IDL.Nat64, IDL.Nat64)
3358
+ ),
3359
+ dissolving_neurons_e8s_buckets_ect: IDL.Vec(
3360
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
3361
+ ),
3362
+ non_self_authenticating_controller_neuron_subset_metrics:
3363
+ IDL.Opt(NeuronSubsetMetrics),
3364
+ dissolving_neurons_count: IDL.Nat64,
3365
+ dissolving_neurons_e8s_buckets: IDL.Vec(
3366
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
3367
+ ),
3368
+ total_staked_maturity_e8s_equivalent_seed: IDL.Nat64,
3369
+ community_fund_total_staked_e8s: IDL.Nat64,
3370
+ not_dissolving_neurons_e8s_buckets_seed: IDL.Vec(
3371
+ IDL.Tuple(IDL.Nat64, IDL.Float64)
3372
+ ),
3373
+ public_neuron_subset_metrics: IDL.Opt(NeuronSubsetMetrics),
3374
+ timestamp_seconds: IDL.Nat64,
3375
+ seed_neuron_count: IDL.Nat64
3376
+ });
3377
+ const RestoreAgingNeuronGroup = IDL.Record({
3378
+ count: IDL.Opt(IDL.Nat64),
3379
+ previous_total_stake_e8s: IDL.Opt(IDL.Nat64),
3380
+ current_total_stake_e8s: IDL.Opt(IDL.Nat64),
3381
+ group_type: IDL.Int32
3382
+ });
3383
+ const RestoreAgingSummary = IDL.Record({
3384
+ groups: IDL.Vec(RestoreAgingNeuronGroup),
3385
+ timestamp_seconds: IDL.Opt(IDL.Nat64)
3386
+ });
3387
+ const RewardEvent = IDL.Record({
3388
+ rounds_since_last_distribution: IDL.Opt(IDL.Nat64),
3389
+ day_after_genesis: IDL.Nat64,
3390
+ actual_timestamp_seconds: IDL.Nat64,
3391
+ total_available_e8s_equivalent: IDL.Nat64,
3392
+ latest_round_available_e8s_equivalent: IDL.Opt(IDL.Nat64),
3393
+ distributed_e8s_equivalent: IDL.Nat64,
3394
+ settled_proposals: IDL.Vec(ProposalId)
3395
+ });
3396
+ const NeuronStakeTransfer = IDL.Record({
3397
+ to_subaccount: IDL.Vec(IDL.Nat8),
3398
+ neuron_stake_e8s: IDL.Nat64,
3399
+ from: IDL.Opt(IDL.Principal),
3400
+ memo: IDL.Nat64,
3401
+ from_subaccount: IDL.Vec(IDL.Nat8),
3402
+ transfer_timestamp: IDL.Nat64,
3403
+ block_height: IDL.Nat64
3404
+ });
3405
+ const Followers = IDL.Record({ followers: IDL.Vec(NeuronId) });
3406
+ const FollowersMap = IDL.Record({
3407
+ followers_map: IDL.Vec(IDL.Tuple(IDL.Nat64, Followers))
3408
+ });
3409
+ const Progress = IDL.Variant({ LastNeuronId: NeuronId });
3410
+ const Migration = IDL.Record({
3411
+ status: IDL.Opt(IDL.Int32),
3412
+ failure_reason: IDL.Opt(IDL.Text),
3413
+ progress: IDL.Opt(Progress)
3414
+ });
3415
+ const Migrations = IDL.Record({
3416
+ neuron_indexes_migration: IDL.Opt(Migration),
3417
+ copy_inactive_neurons_to_stable_memory_migration: IDL.Opt(Migration)
3418
+ });
3419
+ const GovernanceError = IDL.Record({
3420
+ error_message: IDL.Text,
3421
+ error_type: IDL.Int32
3422
+ });
3423
+ const Ballot = IDL.Record({ vote: IDL.Int32, voting_power: IDL.Nat64 });
3424
+ const SwapParticipationLimits = IDL.Record({
3425
+ min_participant_icp_e8s: IDL.Opt(IDL.Nat64),
3426
+ max_participant_icp_e8s: IDL.Opt(IDL.Nat64),
3427
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
3428
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64)
3429
+ });
3430
+ const NeuronsFundNeuronPortion = IDL.Record({
3431
+ controller: IDL.Opt(IDL.Principal),
3432
+ hotkeys: IDL.Vec(IDL.Principal),
3433
+ is_capped: IDL.Opt(IDL.Bool),
3434
+ maturity_equivalent_icp_e8s: IDL.Opt(IDL.Nat64),
3435
+ nns_neuron_id: IDL.Opt(NeuronId),
3436
+ amount_icp_e8s: IDL.Opt(IDL.Nat64)
3437
+ });
3438
+ const NeuronsFundSnapshot = IDL.Record({
3439
+ neurons_fund_neuron_portions: IDL.Vec(NeuronsFundNeuronPortion)
3440
+ });
3441
+ const IdealMatchedParticipationFunction = IDL.Record({
3442
+ serialized_representation: IDL.Opt(IDL.Text)
3443
+ });
3444
+ const NeuronsFundParticipation = IDL.Record({
3445
+ total_maturity_equivalent_icp_e8s: IDL.Opt(IDL.Nat64),
3446
+ intended_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
3447
+ direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
3448
+ swap_participation_limits: IDL.Opt(SwapParticipationLimits),
3449
+ max_neurons_fund_swap_participation_icp_e8s: IDL.Opt(IDL.Nat64),
3450
+ neurons_fund_reserves: IDL.Opt(NeuronsFundSnapshot),
3451
+ ideal_matched_participation_function: IDL.Opt(
3452
+ IdealMatchedParticipationFunction
3453
+ ),
3454
+ allocated_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64)
3455
+ });
3456
+ const NeuronsFundData = IDL.Record({
3457
+ final_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
3458
+ initial_neurons_fund_participation: IDL.Opt(NeuronsFundParticipation),
3459
+ neurons_fund_refunds: IDL.Opt(NeuronsFundSnapshot)
3460
+ });
3461
+ const CanisterStatusResultV2 = IDL.Record({
3462
+ status: IDL.Opt(IDL.Int32),
3463
+ freezing_threshold: IDL.Opt(IDL.Nat64),
3464
+ controllers: IDL.Vec(IDL.Principal),
3465
+ memory_size: IDL.Opt(IDL.Nat64),
3466
+ cycles: IDL.Opt(IDL.Nat64),
3467
+ idle_cycles_burned_per_day: IDL.Opt(IDL.Nat64),
3468
+ module_hash: IDL.Vec(IDL.Nat8)
3469
+ });
3470
+ const CanisterSummary = IDL.Record({
3471
+ status: IDL.Opt(CanisterStatusResultV2),
3472
+ canister_id: IDL.Opt(IDL.Principal)
3473
+ });
3474
+ const SwapBackgroundInformation = IDL.Record({
3475
+ ledger_index_canister_summary: IDL.Opt(CanisterSummary),
3476
+ fallback_controller_principal_ids: IDL.Vec(IDL.Principal),
3477
+ ledger_archive_canister_summaries: IDL.Vec(CanisterSummary),
3478
+ ledger_canister_summary: IDL.Opt(CanisterSummary),
3479
+ swap_canister_summary: IDL.Opt(CanisterSummary),
3480
+ governance_canister_summary: IDL.Opt(CanisterSummary),
3481
+ root_canister_summary: IDL.Opt(CanisterSummary),
3482
+ dapp_canister_summaries: IDL.Vec(CanisterSummary)
3483
+ });
3484
+ const DerivedProposalInformation = IDL.Record({
3485
+ swap_background_information: IDL.Opt(SwapBackgroundInformation)
3486
+ });
3487
+ const Tally = IDL.Record({
3488
+ no: IDL.Nat64,
3489
+ yes: IDL.Nat64,
3490
+ total: IDL.Nat64,
3491
+ timestamp_seconds: IDL.Nat64
3492
+ });
3493
+ const WaitForQuietState = IDL.Record({
3494
+ current_deadline_timestamp_seconds: IDL.Nat64
3495
+ });
3496
+ const ProposalData = IDL.Record({
3497
+ id: IDL.Opt(ProposalId),
3498
+ failure_reason: IDL.Opt(GovernanceError),
3499
+ ballots: IDL.Vec(IDL.Tuple(IDL.Nat64, Ballot)),
3500
+ proposal_timestamp_seconds: IDL.Nat64,
3501
+ reward_event_round: IDL.Nat64,
3502
+ failed_timestamp_seconds: IDL.Nat64,
3503
+ neurons_fund_data: IDL.Opt(NeuronsFundData),
3504
+ reject_cost_e8s: IDL.Nat64,
3505
+ derived_proposal_information: IDL.Opt(DerivedProposalInformation),
3506
+ latest_tally: IDL.Opt(Tally),
3507
+ total_potential_voting_power: IDL.Opt(IDL.Nat64),
3508
+ sns_token_swap_lifecycle: IDL.Opt(IDL.Int32),
3509
+ decided_timestamp_seconds: IDL.Nat64,
3510
+ proposal: IDL.Opt(Proposal),
3511
+ proposer: IDL.Opt(NeuronId),
3512
+ wait_for_quiet_state: IDL.Opt(WaitForQuietState),
3513
+ executed_timestamp_seconds: IDL.Nat64,
3514
+ original_total_community_fund_maturity_e8s_equivalent: IDL.Opt(
3515
+ IDL.Nat64
3516
+ )
3517
+ });
3518
+ const Command_2 = IDL.Variant({
3519
+ Spawn: NeuronId,
3520
+ Split: Split,
3521
+ Configure: Configure,
3522
+ Merge: Merge,
3523
+ DisburseToNeuron: DisburseToNeuron,
3524
+ SyncCommand: IDL.Record({}),
3525
+ ClaimOrRefreshNeuron: ClaimOrRefresh,
3526
+ MergeMaturity: MergeMaturity,
3527
+ Disburse: Disburse
3528
+ });
3529
+ const NeuronInFlightCommand = IDL.Record({
3530
+ command: IDL.Opt(Command_2),
3531
+ timestamp: IDL.Nat64
3532
+ });
3533
+ const BallotInfo = IDL.Record({
3534
+ vote: IDL.Int32,
3535
+ proposal_id: IDL.Opt(ProposalId)
3536
+ });
3537
+ const DissolveState = IDL.Variant({
3538
+ DissolveDelaySeconds: IDL.Nat64,
3539
+ WhenDissolvedTimestampSeconds: IDL.Nat64
3540
+ });
3541
+ const Neuron = IDL.Record({
3542
+ id: IDL.Opt(NeuronId),
3543
+ staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
3544
+ controller: IDL.Opt(IDL.Principal),
3545
+ recent_ballots: IDL.Vec(BallotInfo),
3546
+ voting_power_refreshed_timestamp_seconds: IDL.Opt(IDL.Nat64),
3547
+ kyc_verified: IDL.Bool,
3548
+ potential_voting_power: IDL.Opt(IDL.Nat64),
3549
+ neuron_type: IDL.Opt(IDL.Int32),
3550
+ not_for_profit: IDL.Bool,
3551
+ maturity_e8s_equivalent: IDL.Nat64,
3552
+ deciding_voting_power: IDL.Opt(IDL.Nat64),
3553
+ cached_neuron_stake_e8s: IDL.Nat64,
3554
+ created_timestamp_seconds: IDL.Nat64,
3555
+ auto_stake_maturity: IDL.Opt(IDL.Bool),
3556
+ aging_since_timestamp_seconds: IDL.Nat64,
3557
+ hot_keys: IDL.Vec(IDL.Principal),
3558
+ account: IDL.Vec(IDL.Nat8),
3559
+ joined_community_fund_timestamp_seconds: IDL.Opt(IDL.Nat64),
3560
+ dissolve_state: IDL.Opt(DissolveState),
3561
+ followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
3562
+ neuron_fees_e8s: IDL.Nat64,
3563
+ visibility: IDL.Opt(IDL.Int32),
3564
+ transfer: IDL.Opt(NeuronStakeTransfer),
3565
+ known_neuron_data: IDL.Opt(KnownNeuronData),
3566
+ spawn_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
3567
+ });
3568
+ const Governance = IDL.Record({
3569
+ default_followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
3570
+ making_sns_proposal: IDL.Opt(MakingSnsProposal),
3571
+ most_recent_monthly_node_provider_rewards: IDL.Opt(
3572
+ MonthlyNodeProviderRewards
3573
+ ),
3574
+ maturity_modulation_last_updated_at_timestamp_seconds: IDL.Opt(
3575
+ IDL.Nat64
3576
+ ),
3577
+ wait_for_quiet_threshold_seconds: IDL.Nat64,
3578
+ metrics: IDL.Opt(GovernanceCachedMetrics),
3579
+ neuron_management_voting_period_seconds: IDL.Opt(IDL.Nat64),
3580
+ node_providers: IDL.Vec(NodeProvider),
3581
+ cached_daily_maturity_modulation_basis_points: IDL.Opt(IDL.Int32),
3582
+ economics: IDL.Opt(NetworkEconomics),
3583
+ restore_aging_summary: IDL.Opt(RestoreAgingSummary),
3584
+ spawning_neurons: IDL.Opt(IDL.Bool),
3585
+ latest_reward_event: IDL.Opt(RewardEvent),
3586
+ to_claim_transfers: IDL.Vec(NeuronStakeTransfer),
3587
+ short_voting_period_seconds: IDL.Nat64,
3588
+ topic_followee_index: IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
3589
+ migrations: IDL.Opt(Migrations),
3590
+ proposals: IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
3591
+ xdr_conversion_rate: IDL.Opt(XdrConversionRate),
3592
+ in_flight_commands: IDL.Vec(
3593
+ IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)
3594
+ ),
3595
+ neurons: IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
3596
+ genesis_timestamp_seconds: IDL.Nat64
3597
+ });
3598
+ return [Governance];
3599
+ };