@dfinity/sns 3.2.2 → 3.2.3-next-2024-11-14

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 (40) hide show
  1. package/LICENSE +1 -1
  2. package/dist/candid/sns_governance.certified.idl.js +157 -20
  3. package/dist/candid/sns_governance.d.ts +80 -1
  4. package/dist/candid/sns_governance.did +85 -8
  5. package/dist/candid/sns_governance.idl.js +157 -20
  6. package/dist/candid/sns_governance_test.certified.idl.js +166 -20
  7. package/dist/candid/sns_governance_test.d.ts +88 -1
  8. package/dist/candid/sns_governance_test.did +87 -2
  9. package/dist/candid/sns_governance_test.idl.js +166 -20
  10. package/dist/candid/sns_root.certified.idl.js +15 -0
  11. package/dist/candid/sns_root.d.ts +11 -0
  12. package/dist/candid/sns_root.did +14 -1
  13. package/dist/candid/sns_root.idl.js +15 -0
  14. package/dist/candid/sns_swap.certified.idl.js +9 -0
  15. package/dist/candid/sns_swap.d.ts +11 -0
  16. package/dist/candid/sns_swap.did +14 -1
  17. package/dist/candid/sns_swap.idl.js +9 -0
  18. package/dist/cjs/index.cjs.js +1 -1
  19. package/dist/cjs/index.cjs.js.map +3 -3
  20. package/dist/esm/chunk-BNILACKH.js +2 -0
  21. package/dist/esm/chunk-BNILACKH.js.map +7 -0
  22. package/dist/esm/chunk-GCMQLWR5.js +2 -0
  23. package/dist/esm/chunk-GCMQLWR5.js.map +7 -0
  24. package/dist/esm/{chunk-7V3B657R.js → chunk-XGUZCIOP.js} +2 -2
  25. package/dist/esm/chunk-XKKPAZAY.js +2 -0
  26. package/dist/esm/chunk-XKKPAZAY.js.map +7 -0
  27. package/dist/esm/governance.canister.js +1 -1
  28. package/dist/esm/index.js +1 -1
  29. package/dist/esm/index.js.map +3 -3
  30. package/dist/esm/root.canister.js +1 -1
  31. package/dist/esm/sns.js +1 -1
  32. package/dist/esm/swap.canister.js +1 -1
  33. package/package.json +7 -7
  34. package/dist/esm/chunk-5YPS4ZYR.js +0 -2
  35. package/dist/esm/chunk-5YPS4ZYR.js.map +0 -7
  36. package/dist/esm/chunk-JY2TPU5D.js +0 -2
  37. package/dist/esm/chunk-JY2TPU5D.js.map +0 -7
  38. package/dist/esm/chunk-ODQ7CAD7.js +0 -2
  39. package/dist/esm/chunk-ODQ7CAD7.js.map +0 -7
  40. /package/dist/esm/{chunk-7V3B657R.js.map → chunk-XGUZCIOP.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-5YPS4ZYR.js";export{a as SnsRootCanister};
1
+ import{a}from"./chunk-XKKPAZAY.js";export{a as SnsRootCanister};
2
2
  //# sourceMappingURL=root.canister.js.map
package/dist/esm/sns.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-7V3B657R.js";import"./chunk-JY2TPU5D.js";import"./chunk-5YPS4ZYR.js";import"./chunk-Q55ZUKOX.js";import"./chunk-4INNMFYU.js";import"./chunk-ODQ7CAD7.js";export{a as initSnsWrapper};
1
+ import{a}from"./chunk-XGUZCIOP.js";import"./chunk-GCMQLWR5.js";import"./chunk-XKKPAZAY.js";import"./chunk-Q55ZUKOX.js";import"./chunk-4INNMFYU.js";import"./chunk-BNILACKH.js";export{a as initSnsWrapper};
2
2
  //# sourceMappingURL=sns.js.map
@@ -1,2 +1,2 @@
1
- import{d as a}from"./chunk-ODQ7CAD7.js";export{a as SnsSwapCanister};
1
+ import{d as a}from"./chunk-BNILACKH.js";export{a as SnsSwapCanister};
2
2
  //# sourceMappingURL=swap.canister.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/sns",
3
- "version": "3.2.2",
3
+ "version": "3.2.3-next-2024-11-14",
4
4
  "description": "A library for interfacing with a Service Nervous System (SNS) project.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/cjs/index.cjs.js",
@@ -36,13 +36,13 @@
36
36
  "sns"
37
37
  ],
38
38
  "peerDependencies": {
39
- "@dfinity/agent": "^2.0.0",
40
- "@dfinity/candid": "^2.0.0",
41
- "@dfinity/ledger-icrc": "^2.6.1",
42
- "@dfinity/principal": "^2.0.0",
43
- "@dfinity/utils": "^2.5.2"
39
+ "@dfinity/agent": "*",
40
+ "@dfinity/candid": "*",
41
+ "@dfinity/ledger-icrc": "*",
42
+ "@dfinity/principal": "*",
43
+ "@dfinity/utils": "*"
44
44
  },
45
45
  "dependencies": {
46
46
  "@noble/hashes": "^1.3.2"
47
47
  }
48
- }
48
+ }
@@ -1,2 +0,0 @@
1
- import{Canister as f,createServices as F}from"@dfinity/utils";var V=({IDL:t})=>{let S=t.Record({dapp_canister_ids:t.Vec(t.Principal),testflight:t.Bool,archive_canister_ids:t.Vec(t.Principal),governance_canister_id:t.Opt(t.Principal),index_canister_id:t.Opt(t.Principal),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal)}),i=t.Record({canister_id:t.Principal}),s=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),r=t.Variant({controllers:t.Null,public:t.Null}),a=t.Record({freezing_threshold:t.Opt(t.Nat),controllers:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat),log_visibility:t.Opt(r),wasm_memory_limit:t.Opt(t.Nat),memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),c=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:a,idle_cycles_burned_per_day:t.Opt(t.Nat),module_hash:t.Opt(t.Vec(t.Nat8)),reserved_cycles:t.Opt(t.Nat)}),o=t.Variant({reinstall:t.Null,upgrade:t.Null,install:t.Null}),p=t.Record({arg:t.Vec(t.Nat8),wasm_module:t.Vec(t.Nat8),stop_before_installing:t.Bool,mode:o,canister_id:t.Principal,memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),l=t.Record({update_canister_list:t.Opt(t.Bool)}),_=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),wasm_memory_limit:t.Opt(t.Nat),memory_allocation:t.Nat,compute_allocation:t.Nat}),d=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:_,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),e=t.Record({status:t.Opt(d),canister_id:t.Opt(t.Principal)}),u=t.Record({root:t.Opt(e),swap:t.Opt(e),ledger:t.Opt(e),index:t.Opt(e),governance:t.Opt(e),dapps:t.Vec(e),archives:t.Vec(e)}),m=t.Record({root:t.Opt(t.Principal),swap:t.Opt(t.Principal),ledger:t.Opt(t.Principal),index:t.Opt(t.Principal),governance:t.Opt(t.Principal),dapps:t.Vec(t.Principal),archives:t.Vec(t.Principal)}),O=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),R=t.Record({failure_reason:t.Opt(t.Text)}),g=t.Record({canister_id:t.Opt(t.Principal)}),n=t.Record({canister_ids:t.Vec(t.Principal)}),N=t.Record({canister_ids:t.Opt(n),controller_principal_ids:t.Vec(t.Principal)}),y=t.Record({code:t.Opt(t.Int32),description:t.Text}),P=t.Record({err:t.Opt(y),dapp_canister_id:t.Opt(t.Principal)}),C=t.Record({failed_updates:t.Vec(P)});return t.Service({canister_status:t.Func([i],[c],[]),change_canister:t.Func([p],[],[]),get_build_metadata:t.Func([],[t.Text],[]),get_sns_canisters_summary:t.Func([l],[u],[]),list_sns_canisters:t.Func([t.Record({})],[m],[]),manage_dapp_canister_settings:t.Func([O],[R],[]),register_dapp_canister:t.Func([g],[t.Record({})],[]),register_dapp_canisters:t.Func([n],[t.Record({})],[]),set_dapp_controllers:t.Func([N],[C],[])})};var h=({IDL:t})=>{let S=t.Record({dapp_canister_ids:t.Vec(t.Principal),testflight:t.Bool,archive_canister_ids:t.Vec(t.Principal),governance_canister_id:t.Opt(t.Principal),index_canister_id:t.Opt(t.Principal),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal)}),i=t.Record({canister_id:t.Principal}),s=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),r=t.Variant({controllers:t.Null,public:t.Null}),a=t.Record({freezing_threshold:t.Opt(t.Nat),controllers:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat),log_visibility:t.Opt(r),wasm_memory_limit:t.Opt(t.Nat),memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),c=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:a,idle_cycles_burned_per_day:t.Opt(t.Nat),module_hash:t.Opt(t.Vec(t.Nat8)),reserved_cycles:t.Opt(t.Nat)}),o=t.Variant({reinstall:t.Null,upgrade:t.Null,install:t.Null}),p=t.Record({arg:t.Vec(t.Nat8),wasm_module:t.Vec(t.Nat8),stop_before_installing:t.Bool,mode:o,canister_id:t.Principal,memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),l=t.Record({update_canister_list:t.Opt(t.Bool)}),_=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),wasm_memory_limit:t.Opt(t.Nat),memory_allocation:t.Nat,compute_allocation:t.Nat}),d=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:_,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),e=t.Record({status:t.Opt(d),canister_id:t.Opt(t.Principal)}),u=t.Record({root:t.Opt(e),swap:t.Opt(e),ledger:t.Opt(e),index:t.Opt(e),governance:t.Opt(e),dapps:t.Vec(e),archives:t.Vec(e)}),m=t.Record({root:t.Opt(t.Principal),swap:t.Opt(t.Principal),ledger:t.Opt(t.Principal),index:t.Opt(t.Principal),governance:t.Opt(t.Principal),dapps:t.Vec(t.Principal),archives:t.Vec(t.Principal)}),O=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),R=t.Record({failure_reason:t.Opt(t.Text)}),g=t.Record({canister_id:t.Opt(t.Principal)}),n=t.Record({canister_ids:t.Vec(t.Principal)}),N=t.Record({canister_ids:t.Opt(n),controller_principal_ids:t.Vec(t.Principal)}),y=t.Record({code:t.Opt(t.Int32),description:t.Text}),P=t.Record({err:t.Opt(y),dapp_canister_id:t.Opt(t.Principal)}),C=t.Record({failed_updates:t.Vec(P)});return t.Service({canister_status:t.Func([i],[c],[]),change_canister:t.Func([p],[],[]),get_build_metadata:t.Func([],[t.Text],["query"]),get_sns_canisters_summary:t.Func([l],[u],[]),list_sns_canisters:t.Func([t.Record({})],[m],["query"]),manage_dapp_canister_settings:t.Func([O],[R],[]),register_dapp_canister:t.Func([g],[t.Record({})],[]),register_dapp_canisters:t.Func([n],[t.Record({})],[]),set_dapp_controllers:t.Func([N],[C],[])})};var v=class t extends f{constructor(){super(...arguments);this.listSnsCanisters=async({certified:i=!0})=>this.caller({certified:i}).list_sns_canisters({})}static create(i){let{service:s,certifiedService:r,canisterId:a}=F({options:i,idlFactory:h,certifiedIdlFactory:V});return new t(a,s,r)}};export{v as a};
2
- //# sourceMappingURL=chunk-5YPS4ZYR.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/root.canister.ts", "../../candid/sns_root.certified.idl.js", "../../candid/sns_root.idl.js"],
4
- "sourcesContent": ["import { Canister, createServices } from \"@dfinity/utils\";\nimport type {\n ListSnsCanistersResponse,\n _SERVICE as SnsRootService,\n} from \"../candid/sns_root\";\nimport { idlFactory as certifiedIdlFactory } from \"../candid/sns_root.certified.idl\";\nimport { idlFactory } from \"../candid/sns_root.idl\";\nimport type { SnsCanisterOptions } from \"./types/canister.options\";\n\nexport class SnsRootCanister extends Canister<SnsRootService> {\n static create(options: SnsCanisterOptions<SnsRootService>) {\n const { service, certifiedService, canisterId } =\n createServices<SnsRootService>({\n options,\n idlFactory,\n certifiedIdlFactory,\n });\n\n return new SnsRootCanister(canisterId, service, certifiedService);\n }\n\n /**\n * List the canisters that are part of the Sns.\n *\n * Source code: https://github.com/dfinity/ic/blob/master/rs/sns/root/src/lib.rs\n *\n * @param {Object} params\n * @param {boolean} [params.certified=true] - Query or update calls\n *\n * @returns {ListSnsCanistersResponse} - A list of canisters ('root' | 'governance' | 'ledger' | 'dapps' | 'swap' | 'archives')\n */\n listSnsCanisters = async ({\n certified = true,\n }: {\n certified?: boolean;\n }): Promise<ListSnsCanistersResponse> => {\n return this.caller({ certified }).list_sns_canisters({});\n };\n}\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_root.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n const CanisterIdRecord = IDL.Record({ 'canister_id' : IDL.Principal });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const LogVisibility = IDL.Variant({\n 'controllers' : IDL.Null,\n 'public' : IDL.Null,\n });\n const DefiniteCanisterSettings = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat),\n 'controllers' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat),\n 'log_visibility' : IDL.Opt(LogVisibility),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const CanisterStatusResult = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettings,\n 'idle_cycles_burned_per_day' : IDL.Opt(IDL.Nat),\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'reserved_cycles' : IDL.Opt(IDL.Nat),\n });\n const CanisterInstallMode = IDL.Variant({\n 'reinstall' : IDL.Null,\n 'upgrade' : IDL.Null,\n 'install' : IDL.Null,\n });\n const ChangeCanisterRequest = IDL.Record({\n 'arg' : IDL.Vec(IDL.Nat8),\n 'wasm_module' : IDL.Vec(IDL.Nat8),\n 'stop_before_installing' : IDL.Bool,\n 'mode' : CanisterInstallMode,\n 'canister_id' : IDL.Principal,\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const GetSnsCanistersSummaryRequest = IDL.Record({\n 'update_canister_list' : IDL.Opt(IDL.Bool),\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const CanisterSummary = IDL.Record({\n 'status' : IDL.Opt(CanisterStatusResultV2),\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const GetSnsCanistersSummaryResponse = IDL.Record({\n 'root' : IDL.Opt(CanisterSummary),\n 'swap' : IDL.Opt(CanisterSummary),\n 'ledger' : IDL.Opt(CanisterSummary),\n 'index' : IDL.Opt(CanisterSummary),\n 'governance' : IDL.Opt(CanisterSummary),\n 'dapps' : IDL.Vec(CanisterSummary),\n 'archives' : IDL.Vec(CanisterSummary),\n });\n const ListSnsCanistersResponse = IDL.Record({\n 'root' : IDL.Opt(IDL.Principal),\n 'swap' : IDL.Opt(IDL.Principal),\n 'ledger' : IDL.Opt(IDL.Principal),\n 'index' : IDL.Opt(IDL.Principal),\n 'governance' : IDL.Opt(IDL.Principal),\n 'dapps' : IDL.Vec(IDL.Principal),\n 'archives' : IDL.Vec(IDL.Principal),\n });\n const ManageDappCanisterSettingsRequest = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat64),\n 'canister_ids' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat64),\n 'log_visibility' : IDL.Opt(IDL.Int32),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat64),\n 'memory_allocation' : IDL.Opt(IDL.Nat64),\n 'compute_allocation' : IDL.Opt(IDL.Nat64),\n });\n const ManageDappCanisterSettingsResponse = IDL.Record({\n 'failure_reason' : IDL.Opt(IDL.Text),\n });\n const RegisterDappCanisterRequest = IDL.Record({\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const RegisterDappCanistersRequest = IDL.Record({\n 'canister_ids' : IDL.Vec(IDL.Principal),\n });\n const SetDappControllersRequest = IDL.Record({\n 'canister_ids' : IDL.Opt(RegisterDappCanistersRequest),\n 'controller_principal_ids' : IDL.Vec(IDL.Principal),\n });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n return IDL.Service({\n 'canister_status' : IDL.Func(\n [CanisterIdRecord],\n [CanisterStatusResult],\n [],\n ),\n 'change_canister' : IDL.Func([ChangeCanisterRequest], [], []),\n 'get_build_metadata' : IDL.Func([], [IDL.Text], []),\n 'get_sns_canisters_summary' : IDL.Func(\n [GetSnsCanistersSummaryRequest],\n [GetSnsCanistersSummaryResponse],\n [],\n ),\n 'list_sns_canisters' : IDL.Func(\n [IDL.Record({})],\n [ListSnsCanistersResponse],\n [],\n ),\n 'manage_dapp_canister_settings' : IDL.Func(\n [ManageDappCanisterSettingsRequest],\n [ManageDappCanisterSettingsResponse],\n [],\n ),\n 'register_dapp_canister' : IDL.Func(\n [RegisterDappCanisterRequest],\n [IDL.Record({})],\n [],\n ),\n 'register_dapp_canisters' : IDL.Func(\n [RegisterDappCanistersRequest],\n [IDL.Record({})],\n [],\n ),\n 'set_dapp_controllers' : IDL.Func(\n [SetDappControllersRequest],\n [SetDappControllersResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n return [SnsRootCanister];\n};\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_root.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n const CanisterIdRecord = IDL.Record({ 'canister_id' : IDL.Principal });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const LogVisibility = IDL.Variant({\n 'controllers' : IDL.Null,\n 'public' : IDL.Null,\n });\n const DefiniteCanisterSettings = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat),\n 'controllers' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat),\n 'log_visibility' : IDL.Opt(LogVisibility),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const CanisterStatusResult = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettings,\n 'idle_cycles_burned_per_day' : IDL.Opt(IDL.Nat),\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'reserved_cycles' : IDL.Opt(IDL.Nat),\n });\n const CanisterInstallMode = IDL.Variant({\n 'reinstall' : IDL.Null,\n 'upgrade' : IDL.Null,\n 'install' : IDL.Null,\n });\n const ChangeCanisterRequest = IDL.Record({\n 'arg' : IDL.Vec(IDL.Nat8),\n 'wasm_module' : IDL.Vec(IDL.Nat8),\n 'stop_before_installing' : IDL.Bool,\n 'mode' : CanisterInstallMode,\n 'canister_id' : IDL.Principal,\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const GetSnsCanistersSummaryRequest = IDL.Record({\n 'update_canister_list' : IDL.Opt(IDL.Bool),\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const CanisterSummary = IDL.Record({\n 'status' : IDL.Opt(CanisterStatusResultV2),\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const GetSnsCanistersSummaryResponse = IDL.Record({\n 'root' : IDL.Opt(CanisterSummary),\n 'swap' : IDL.Opt(CanisterSummary),\n 'ledger' : IDL.Opt(CanisterSummary),\n 'index' : IDL.Opt(CanisterSummary),\n 'governance' : IDL.Opt(CanisterSummary),\n 'dapps' : IDL.Vec(CanisterSummary),\n 'archives' : IDL.Vec(CanisterSummary),\n });\n const ListSnsCanistersResponse = IDL.Record({\n 'root' : IDL.Opt(IDL.Principal),\n 'swap' : IDL.Opt(IDL.Principal),\n 'ledger' : IDL.Opt(IDL.Principal),\n 'index' : IDL.Opt(IDL.Principal),\n 'governance' : IDL.Opt(IDL.Principal),\n 'dapps' : IDL.Vec(IDL.Principal),\n 'archives' : IDL.Vec(IDL.Principal),\n });\n const ManageDappCanisterSettingsRequest = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat64),\n 'canister_ids' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat64),\n 'log_visibility' : IDL.Opt(IDL.Int32),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat64),\n 'memory_allocation' : IDL.Opt(IDL.Nat64),\n 'compute_allocation' : IDL.Opt(IDL.Nat64),\n });\n const ManageDappCanisterSettingsResponse = IDL.Record({\n 'failure_reason' : IDL.Opt(IDL.Text),\n });\n const RegisterDappCanisterRequest = IDL.Record({\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const RegisterDappCanistersRequest = IDL.Record({\n 'canister_ids' : IDL.Vec(IDL.Principal),\n });\n const SetDappControllersRequest = IDL.Record({\n 'canister_ids' : IDL.Opt(RegisterDappCanistersRequest),\n 'controller_principal_ids' : IDL.Vec(IDL.Principal),\n });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n return IDL.Service({\n 'canister_status' : IDL.Func(\n [CanisterIdRecord],\n [CanisterStatusResult],\n [],\n ),\n 'change_canister' : IDL.Func([ChangeCanisterRequest], [], []),\n 'get_build_metadata' : IDL.Func([], [IDL.Text], ['query']),\n 'get_sns_canisters_summary' : IDL.Func(\n [GetSnsCanistersSummaryRequest],\n [GetSnsCanistersSummaryResponse],\n [],\n ),\n 'list_sns_canisters' : IDL.Func(\n [IDL.Record({})],\n [ListSnsCanistersResponse],\n ['query'],\n ),\n 'manage_dapp_canister_settings' : IDL.Func(\n [ManageDappCanisterSettingsRequest],\n [ManageDappCanisterSettingsResponse],\n [],\n ),\n 'register_dapp_canister' : IDL.Func(\n [RegisterDappCanisterRequest],\n [IDL.Record({})],\n [],\n ),\n 'register_dapp_canisters' : IDL.Func(\n [RegisterDappCanistersRequest],\n [IDL.Record({})],\n [],\n ),\n 'set_dapp_controllers' : IDL.Func(\n [SetDappControllersRequest],\n [SetDappControllersResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n return [SnsRootCanister];\n};\n"],
5
- "mappings": "AAAA,OAAS,Y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ClC,CAACC,CAAkC,EACnC,CAAC,CACH,EACF,uBAA2BhB,EAAI,KAC3B,CAACiB,CAA2B,EAC5B,CAACjB,EAAI,OAAO,CAAC,CAAC,CAAC,EACf,CAAC,CACH,EACF,wBAA4BA,EAAI,KAC5B,CAACkB,CAA4B,EAC7B,CAAClB,EAAI,OAAO,CAAC,CAAC,CAAC,EACf,CAAC,CACH,EACF,qBAAyBA,EAAI,KACzB,CAACmB,CAAyB,EAC1B,CAACG,CAA0B,EAC3B,CAAC,CACH,CACJ,CAAC,CACH,EF5JO,IAAMC,EAAN,MAAMC,UAAwBC,CAAyB,CAAvD,kCAsBL,sBAAmB,MAAO,CACxB,UAAAC,EAAY,EACd,IAGS,KAAK,OAAO,CAAE,UAAAA,CAAU,CAAC,EAAE,mBAAmB,CAAC,CAAC,EA1BzD,OAAO,OAAOC,EAA6C,CACzD,GAAM,CAAE,QAAAC,EAAS,iBAAAC,EAAkB,WAAAC,CAAW,EAC5CC,EAA+B,CAC7B,QAAAJ,EACA,WAAAK,EACA,oBAAAA,CACF,CAAC,EAEH,OAAO,IAAIR,EAAgBM,EAAYF,EAASC,CAAgB,CAClE,CAmBF",
6
- "names": ["Canister", "createServices", "idlFactory", "IDL", "SnsRootCanister", "CanisterIdRecord", "CanisterStatusType", "LogVisibility", "DefiniteCanisterSettings", "CanisterStatusResult", "CanisterInstallMode", "ChangeCanisterRequest", "GetSnsCanistersSummaryRequest", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "CanisterSummary", "GetSnsCanistersSummaryResponse", "ListSnsCanistersResponse", "ManageDappCanisterSettingsRequest", "ManageDappCanisterSettingsResponse", "RegisterDappCanisterRequest", "RegisterDappCanistersRequest", "SetDappControllersRequest", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "idlFactory", "IDL", "SnsRootCanister", "CanisterIdRecord", "CanisterStatusType", "LogVisibility", "DefiniteCanisterSettings", "CanisterStatusResult", "CanisterInstallMode", "ChangeCanisterRequest", "GetSnsCanistersSummaryRequest", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "CanisterSummary", "GetSnsCanistersSummaryResponse", "ListSnsCanistersResponse", "ManageDappCanisterSettingsRequest", "ManageDappCanisterSettingsResponse", "RegisterDappCanisterRequest", "RegisterDappCanistersRequest", "SetDappControllersRequest", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "SnsRootCanister", "_SnsRootCanister", "Canister", "certified", "options", "service", "certifiedService", "canisterId", "createServices", "idlFactory"]
7
- }
@@ -1,2 +0,0 @@
1
- import{a as u}from"./chunk-4INNMFYU.js";import{assertPercentageNumber as bt,Canister as Ut,createServices as Bt,fromNullable as P,toNullable as Q}from"@dfinity/utils";var ct=({IDL:e})=>{let o=e.Record({validator_canister_id:e.Opt(e.Principal),target_canister_id:e.Opt(e.Principal),validator_method_name:e.Opt(e.Text),target_method_name:e.Opt(e.Text)}),t=e.Variant({NativeNervousSystemFunction:e.Record({}),GenericNervousSystemFunction:o}),s=e.Record({id:e.Nat64,name:e.Text,description:e.Opt(e.Text),function_type:e.Opt(t)}),i=e.Record({not_dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),garbage_collectable_neurons_count:e.Nat64,neurons_with_invalid_stake_count:e.Nat64,not_dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:e.Nat64,dissolved_neurons_count:e.Nat64,total_staked_e8s:e.Nat64,total_supply_governance_tokens:e.Nat64,not_dissolving_neurons_count:e.Nat64,dissolved_neurons_e8s:e.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:e.Nat64,dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),dissolving_neurons_count:e.Nat64,dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),timestamp_seconds:e.Nat64}),r=e.Record({current_basis_points:e.Opt(e.Int32),updated_at_timestamp_seconds:e.Opt(e.Nat64)}),a=e.Record({id:e.Vec(e.Nat8)}),c=e.Record({followees:e.Vec(a)}),p=e.Record({followees:e.Vec(e.Tuple(e.Nat64,c))}),l=e.Record({permissions:e.Vec(e.Int32)}),W=e.Record({final_reward_rate_basis_points:e.Opt(e.Nat64),initial_reward_rate_basis_points:e.Opt(e.Nat64),reward_rate_transition_duration_seconds:e.Opt(e.Nat64),round_duration_seconds:e.Opt(e.Nat64)}),N=e.Record({default_followees:e.Opt(p),max_dissolve_delay_seconds:e.Opt(e.Nat64),max_dissolve_delay_bonus_percentage:e.Opt(e.Nat64),max_followees_per_function:e.Opt(e.Nat64),neuron_claimer_permissions:e.Opt(l),neuron_minimum_stake_e8s:e.Opt(e.Nat64),max_neuron_age_for_age_bonus:e.Opt(e.Nat64),initial_voting_period_seconds:e.Opt(e.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),reject_cost_e8s:e.Opt(e.Nat64),max_proposals_to_keep_per_action:e.Opt(e.Nat32),wait_for_quiet_deadline_increase_seconds:e.Opt(e.Nat64),max_number_of_neurons:e.Opt(e.Nat64),transaction_fee_e8s:e.Opt(e.Nat64),max_number_of_proposals_with_ballots:e.Opt(e.Nat64),max_age_bonus_percentage:e.Opt(e.Nat64),neuron_grantable_permissions:e.Opt(l),voting_rewards_parameters:e.Opt(W),maturity_modulation_disabled:e.Opt(e.Bool),max_number_of_principals_per_neuron:e.Opt(e.Nat64)}),O=e.Record({archive_wasm_hash:e.Vec(e.Nat8),root_wasm_hash:e.Vec(e.Nat8),swap_wasm_hash:e.Vec(e.Nat8),ledger_wasm_hash:e.Vec(e.Nat8),governance_wasm_hash:e.Vec(e.Nat8),index_wasm_hash:e.Vec(e.Nat8)}),_=e.Record({id:e.Nat64}),w=e.Record({rounds_since_last_distribution:e.Opt(e.Nat64),actual_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Opt(e.Nat64),total_available_e8s_equivalent:e.Opt(e.Nat64),distributed_e8s_equivalent:e.Nat64,round:e.Nat64,settled_proposals:e.Vec(_)}),b=e.Record({mark_failed_at_seconds:e.Nat64,checking_upgrade_lock:e.Nat64,proposal_id:e.Nat64,target_version:e.Opt(O)}),m=e.Record({error_message:e.Text,error_type:e.Int32}),g=e.Record({subaccount:e.Vec(e.Nat8)}),d=e.Record({owner:e.Opt(e.Principal),subaccount:e.Opt(g)}),M=e.Record({human_readable:e.Opt(e.Text)}),$=e.Record({e8s:e.Opt(e.Nat64)}),J=e.Record({xdrs_per_icp:e.Opt(M),icps_per_token:e.Opt(M),tokens:e.Opt($)}),X=e.Record({token:e.Opt(e.Int32),account:e.Opt(d),valuation_factors:e.Opt(J),timestamp_seconds:e.Opt(e.Nat64)}),T=e.Record({valuation:e.Opt(X)}),H=e.Variant({TransferSnsTreasuryFunds:T,MintSnsTokens:T}),K=e.Record({vote:e.Int32,cast_timestamp_seconds:e.Nat64,voting_power:e.Nat64}),V=e.Record({basis_points:e.Opt(e.Nat64)}),Y=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),Z=e.Record({freezing_threshold:e.Opt(e.Nat64),canister_ids:e.Vec(e.Principal),reserved_cycles_limit:e.Opt(e.Nat64),log_visibility:e.Opt(e.Int32),wasm_memory_limit:e.Opt(e.Nat64),memory_allocation:e.Opt(e.Nat64),compute_allocation:e.Opt(e.Nat64)}),D=e.Record({canister_ids:e.Vec(e.Principal)}),I=e.Record({from_treasury:e.Int32,to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(g),memo:e.Opt(e.Nat64),amount_e8s:e.Nat64}),L=e.Record({new_canister_wasm:e.Vec(e.Nat8),mode:e.Opt(e.Int32),canister_id:e.Opt(e.Principal),canister_upgrade_arg:e.Opt(e.Vec(e.Nat8))}),ee=e.Record({canister_ids:e.Vec(e.Principal),new_controllers:e.Vec(e.Principal)}),te=e.Record({to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(g),memo:e.Opt(e.Nat64),amount_e8s:e.Opt(e.Nat64)}),x=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),se=e.Record({function_id:e.Nat64,payload:e.Vec(e.Nat8)}),oe=e.Record({token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat64),token_logo:e.Opt(e.Text),token_name:e.Opt(e.Text)}),ne=e.Record({motion_text:e.Text}),ae=e.Variant({ManageNervousSystemParameters:N,AddGenericNervousSystemFunction:s,ManageDappCanisterSettings:Z,RemoveGenericNervousSystemFunction:e.Nat64,UpgradeSnsToNextVersion:e.Record({}),RegisterDappCanisters:D,TransferSnsTreasuryFunds:I,UpgradeSnsControlledCanister:L,DeregisterDappCanisters:ee,MintSnsTokens:te,Unspecified:e.Record({}),ManageSnsMetadata:x,ExecuteGenericNervousSystemFunction:se,ManageLedgerParameters:oe,Motion:ne}),R=e.Record({url:e.Text,title:e.Text,action:e.Opt(ae),summary:e.Text}),re=e.Record({current_deadline_timestamp_seconds:e.Nat64}),y=e.Record({id:e.Opt(_),payload_text_rendering:e.Opt(e.Text),action:e.Nat64,failure_reason:e.Opt(m),action_auxiliary:e.Opt(H),ballots:e.Vec(e.Tuple(e.Text,K)),minimum_yes_proportion_of_total:e.Opt(V),reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,reward_event_end_timestamp_seconds:e.Opt(e.Nat64),proposal_creation_timestamp_seconds:e.Nat64,initial_voting_period_seconds:e.Nat64,reject_cost_e8s:e.Nat64,latest_tally:e.Opt(Y),wait_for_quiet_deadline_increase_seconds:e.Nat64,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(R),proposer:e.Opt(a),wait_for_quiet_state:e.Opt(re),minimum_yes_proportion_of_exercised:e.Opt(V),is_eligible_for_rewards:e.Bool,executed_timestamp_seconds:e.Nat64}),h=e.Record({memo:e.Nat64,amount_e8s:e.Nat64}),F=e.Record({function_id:e.Nat64,followees:e.Vec(a)}),C=e.Record({to_account:e.Opt(d),percentage_to_disburse:e.Nat32}),ie=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),ce=e.Record({additional_dissolve_delay_seconds:e.Nat32}),_e=e.Record({dissolve_timestamp_seconds:e.Nat64}),de=e.Variant({ChangeAutoStakeMaturity:ie,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:ce,SetDissolveTimestamp:_e}),k=e.Record({operation:e.Opt(de)}),A=e.Record({vote:e.Int32,proposal:e.Opt(_)}),ue=e.Record({amount_to_be_disbursed_e8s:e.Nat64,to_account:e.Opt(d)}),pe=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),le=e.Variant({MemoAndController:pe,NeuronId:e.Record({})}),q=e.Record({by:e.Opt(le)}),G=e.Record({permissions_to_remove:e.Opt(l),principal_id:e.Opt(e.Principal)}),E=e.Record({permissions_to_add:e.Opt(l),principal_id:e.Opt(e.Principal)}),U=e.Record({percentage_to_merge:e.Nat32}),me=e.Record({e8s:e.Nat64}),B=e.Record({to_account:e.Opt(d),amount:e.Opt(me)}),Ne=e.Variant({Split:h,Follow:F,DisburseMaturity:C,Configure:k,RegisterVote:A,SyncCommand:e.Record({}),MakeProposal:R,FinalizeDisburseMaturity:ue,ClaimOrRefreshNeuron:q,RemoveNeuronPermissions:G,AddNeuronPermissions:E,MergeMaturity:U,Disburse:B}),Oe=e.Record({command:e.Opt(Ne),timestamp:e.Nat64}),ge=e.Record({principal:e.Opt(e.Principal),permission_type:e.Vec(e.Int32)}),Re=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),ye=e.Record({timestamp_of_disbursement_seconds:e.Nat64,amount_e8s:e.Nat64,account_to_disburse_to:e.Opt(d),finalize_disbursement_timestamp_seconds:e.Opt(e.Nat64)}),v=e.Record({id:e.Opt(a),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),permissions:e.Vec(ge),maturity_e8s_equivalent:e.Nat64,cached_neuron_stake_e8s:e.Nat64,created_timestamp_seconds:e.Nat64,source_nns_neuron_id:e.Opt(e.Nat64),auto_stake_maturity:e.Opt(e.Bool),aging_since_timestamp_seconds:e.Nat64,dissolve_state:e.Opt(Re),voting_power_percentage_multiplier:e.Nat64,vesting_period_seconds:e.Opt(e.Nat64),disburse_maturity_in_progress:e.Vec(ye),followees:e.Vec(e.Tuple(e.Nat64,c)),neuron_fees_e8s:e.Nat64}),Tt=e.Record({root_canister_id:e.Opt(e.Principal),id_to_nervous_system_functions:e.Vec(e.Tuple(e.Nat64,s)),metrics:e.Opt(i),maturity_modulation:e.Opt(r),mode:e.Int32,parameters:e.Opt(N),is_finalizing_disburse_maturity:e.Opt(e.Bool),deployed_version:e.Opt(O),sns_initialization_parameters:e.Text,latest_reward_event:e.Opt(w),pending_version:e.Opt(b),swap_canister_id:e.Opt(e.Principal),ledger_canister_id:e.Opt(e.Principal),proposals:e.Vec(e.Tuple(e.Nat64,y)),in_flight_commands:e.Vec(e.Tuple(e.Text,Oe)),sns_metadata:e.Opt(x),migrated_root_wasm_memory_limit:e.Opt(e.Bool),neurons:e.Vec(e.Tuple(e.Text,v)),genesis_timestamp_seconds:e.Nat64}),ve=e.Record({principals:e.Vec(e.Principal)}),Se=e.Record({nns_neuron_hotkeys:e.Opt(ve),nns_neuron_controller:e.Opt(e.Principal),nns_neuron_id:e.Opt(e.Nat64)}),fe=e.Variant({NeuronsFund:Se,Direct:e.Record({})}),Pe=e.Record({neuron_ids:e.Vec(a)}),we=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Opt(e.Nat64),participant:e.Opt(fe),stake_e8s:e.Opt(e.Nat64),followees:e.Opt(Pe),neuron_id:e.Opt(a)}),be=e.Record({neuron_recipes:e.Vec(we)}),Me=e.Record({neuron_recipes:e.Opt(be)}),Te=e.Record({id:e.Opt(a),status:e.Int32}),Ve=e.Record({swap_neurons:e.Vec(Te)}),xe=e.Variant({Ok:Ve,Err:e.Int32}),he=e.Record({claim_swap_neurons_result:e.Opt(xe)}),Fe=e.Record({maturity_modulation:e.Opt(r)}),Ce=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),ke=e.Record({mode:e.Opt(e.Int32)}),Ae=e.Record({neuron_id:e.Opt(a)}),qe=e.Variant({Error:m,Neuron:v}),Ge=e.Record({result:e.Opt(qe)}),z=e.Record({proposal_id:e.Opt(_)}),Ee=e.Variant({Error:m,Proposal:y}),Ue=e.Record({result:e.Opt(Ee)}),Be=e.Variant({stopped:e.Null,stopping:e.Null,running:e.Null}),ze=e.Record({freezing_threshold:e.Nat,controllers:e.Vec(e.Principal),wasm_memory_limit:e.Opt(e.Nat),memory_allocation:e.Nat,compute_allocation:e.Nat}),je=e.Record({status:Be,memory_size:e.Nat,cycles:e.Nat,settings:ze,idle_cycles_burned_per_day:e.Nat,module_hash:e.Opt(e.Vec(e.Nat8))}),Qe=e.Record({deployed_version:e.Opt(O),pending_version:e.Opt(b)}),We=e.Record({sns_initialization_parameters:e.Text}),$e=e.Record({reserved_ids:e.Vec(e.Nat64),functions:e.Vec(s)}),Je=e.Record({of_principal:e.Opt(e.Principal),limit:e.Nat32,start_page_at:e.Opt(a)}),Xe=e.Record({neurons:e.Vec(v)}),He=e.Record({include_reward_status:e.Vec(e.Int32),before_proposal:e.Opt(_),limit:e.Nat32,exclude_type:e.Vec(e.Nat64),include_status:e.Vec(e.Int32)}),Ke=e.Record({include_ballots_by_caller:e.Opt(e.Bool),proposals:e.Vec(y)}),Ye=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),Ze=e.Variant({Split:h,Follow:F,DisburseMaturity:C,ClaimOrRefresh:q,Configure:k,RegisterVote:A,MakeProposal:R,StakeMaturity:Ye,RemoveNeuronPermissions:G,AddNeuronPermissions:E,MergeMaturity:U,Disburse:B}),De=e.Record({subaccount:e.Vec(e.Nat8),command:e.Opt(Ze)}),Ie=e.Record({created_neuron_id:e.Opt(a)}),Le=e.Record({amount_disbursed_e8s:e.Nat64,amount_deducted_e8s:e.Opt(e.Nat64)}),et=e.Record({refreshed_neuron_id:e.Opt(a)}),tt=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),st=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),ot=e.Record({transfer_block_height:e.Nat64}),nt=e.Variant({Error:m,Split:Ie,Follow:e.Record({}),DisburseMaturity:Le,ClaimOrRefresh:et,Configure:e.Record({}),RegisterVote:e.Record({}),MakeProposal:z,RemoveNeuronPermission:e.Record({}),StakeMaturity:tt,MergeMaturity:st,Disburse:ot,AddNeuronPermission:e.Record({})}),at=e.Record({command:e.Opt(nt)}),rt=e.Record({mode:e.Int32});return e.Service({claim_swap_neurons:e.Func([Me],[he],[]),fail_stuck_upgrade_in_progress:e.Func([e.Record({})],[e.Record({})],[]),get_build_metadata:e.Func([],[e.Text],[]),get_latest_reward_event:e.Func([],[w],[]),get_maturity_modulation:e.Func([e.Record({})],[Fe],[]),get_metadata:e.Func([e.Record({})],[Ce],[]),get_mode:e.Func([e.Record({})],[ke],[]),get_nervous_system_parameters:e.Func([e.Null],[N],[]),get_neuron:e.Func([Ae],[Ge],[]),get_proposal:e.Func([z],[Ue],[]),get_root_canister_status:e.Func([e.Null],[je],[]),get_running_sns_version:e.Func([e.Record({})],[Qe],[]),get_sns_initialization_parameters:e.Func([e.Record({})],[We],[]),list_nervous_system_functions:e.Func([],[$e],[]),list_neurons:e.Func([Je],[Xe],[]),list_proposals:e.Func([He],[Ke],[]),manage_neuron:e.Func([De],[at],[]),set_mode:e.Func([rt],[e.Record({})],[])})};var _t=({IDL:e})=>{let o=e.Record({validator_canister_id:e.Opt(e.Principal),target_canister_id:e.Opt(e.Principal),validator_method_name:e.Opt(e.Text),target_method_name:e.Opt(e.Text)}),t=e.Variant({NativeNervousSystemFunction:e.Record({}),GenericNervousSystemFunction:o}),s=e.Record({id:e.Nat64,name:e.Text,description:e.Opt(e.Text),function_type:e.Opt(t)}),i=e.Record({not_dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),garbage_collectable_neurons_count:e.Nat64,neurons_with_invalid_stake_count:e.Nat64,not_dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:e.Nat64,dissolved_neurons_count:e.Nat64,total_staked_e8s:e.Nat64,total_supply_governance_tokens:e.Nat64,not_dissolving_neurons_count:e.Nat64,dissolved_neurons_e8s:e.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:e.Nat64,dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),dissolving_neurons_count:e.Nat64,dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),timestamp_seconds:e.Nat64}),r=e.Record({current_basis_points:e.Opt(e.Int32),updated_at_timestamp_seconds:e.Opt(e.Nat64)}),a=e.Record({id:e.Vec(e.Nat8)}),c=e.Record({followees:e.Vec(a)}),p=e.Record({followees:e.Vec(e.Tuple(e.Nat64,c))}),l=e.Record({permissions:e.Vec(e.Int32)}),W=e.Record({final_reward_rate_basis_points:e.Opt(e.Nat64),initial_reward_rate_basis_points:e.Opt(e.Nat64),reward_rate_transition_duration_seconds:e.Opt(e.Nat64),round_duration_seconds:e.Opt(e.Nat64)}),N=e.Record({default_followees:e.Opt(p),max_dissolve_delay_seconds:e.Opt(e.Nat64),max_dissolve_delay_bonus_percentage:e.Opt(e.Nat64),max_followees_per_function:e.Opt(e.Nat64),neuron_claimer_permissions:e.Opt(l),neuron_minimum_stake_e8s:e.Opt(e.Nat64),max_neuron_age_for_age_bonus:e.Opt(e.Nat64),initial_voting_period_seconds:e.Opt(e.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),reject_cost_e8s:e.Opt(e.Nat64),max_proposals_to_keep_per_action:e.Opt(e.Nat32),wait_for_quiet_deadline_increase_seconds:e.Opt(e.Nat64),max_number_of_neurons:e.Opt(e.Nat64),transaction_fee_e8s:e.Opt(e.Nat64),max_number_of_proposals_with_ballots:e.Opt(e.Nat64),max_age_bonus_percentage:e.Opt(e.Nat64),neuron_grantable_permissions:e.Opt(l),voting_rewards_parameters:e.Opt(W),maturity_modulation_disabled:e.Opt(e.Bool),max_number_of_principals_per_neuron:e.Opt(e.Nat64)}),O=e.Record({archive_wasm_hash:e.Vec(e.Nat8),root_wasm_hash:e.Vec(e.Nat8),swap_wasm_hash:e.Vec(e.Nat8),ledger_wasm_hash:e.Vec(e.Nat8),governance_wasm_hash:e.Vec(e.Nat8),index_wasm_hash:e.Vec(e.Nat8)}),_=e.Record({id:e.Nat64}),w=e.Record({rounds_since_last_distribution:e.Opt(e.Nat64),actual_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Opt(e.Nat64),total_available_e8s_equivalent:e.Opt(e.Nat64),distributed_e8s_equivalent:e.Nat64,round:e.Nat64,settled_proposals:e.Vec(_)}),b=e.Record({mark_failed_at_seconds:e.Nat64,checking_upgrade_lock:e.Nat64,proposal_id:e.Nat64,target_version:e.Opt(O)}),m=e.Record({error_message:e.Text,error_type:e.Int32}),g=e.Record({subaccount:e.Vec(e.Nat8)}),d=e.Record({owner:e.Opt(e.Principal),subaccount:e.Opt(g)}),M=e.Record({human_readable:e.Opt(e.Text)}),$=e.Record({e8s:e.Opt(e.Nat64)}),J=e.Record({xdrs_per_icp:e.Opt(M),icps_per_token:e.Opt(M),tokens:e.Opt($)}),X=e.Record({token:e.Opt(e.Int32),account:e.Opt(d),valuation_factors:e.Opt(J),timestamp_seconds:e.Opt(e.Nat64)}),T=e.Record({valuation:e.Opt(X)}),H=e.Variant({TransferSnsTreasuryFunds:T,MintSnsTokens:T}),K=e.Record({vote:e.Int32,cast_timestamp_seconds:e.Nat64,voting_power:e.Nat64}),V=e.Record({basis_points:e.Opt(e.Nat64)}),Y=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),Z=e.Record({freezing_threshold:e.Opt(e.Nat64),canister_ids:e.Vec(e.Principal),reserved_cycles_limit:e.Opt(e.Nat64),log_visibility:e.Opt(e.Int32),wasm_memory_limit:e.Opt(e.Nat64),memory_allocation:e.Opt(e.Nat64),compute_allocation:e.Opt(e.Nat64)}),D=e.Record({canister_ids:e.Vec(e.Principal)}),I=e.Record({from_treasury:e.Int32,to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(g),memo:e.Opt(e.Nat64),amount_e8s:e.Nat64}),L=e.Record({new_canister_wasm:e.Vec(e.Nat8),mode:e.Opt(e.Int32),canister_id:e.Opt(e.Principal),canister_upgrade_arg:e.Opt(e.Vec(e.Nat8))}),ee=e.Record({canister_ids:e.Vec(e.Principal),new_controllers:e.Vec(e.Principal)}),te=e.Record({to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(g),memo:e.Opt(e.Nat64),amount_e8s:e.Opt(e.Nat64)}),x=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),se=e.Record({function_id:e.Nat64,payload:e.Vec(e.Nat8)}),oe=e.Record({token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat64),token_logo:e.Opt(e.Text),token_name:e.Opt(e.Text)}),ne=e.Record({motion_text:e.Text}),ae=e.Variant({ManageNervousSystemParameters:N,AddGenericNervousSystemFunction:s,ManageDappCanisterSettings:Z,RemoveGenericNervousSystemFunction:e.Nat64,UpgradeSnsToNextVersion:e.Record({}),RegisterDappCanisters:D,TransferSnsTreasuryFunds:I,UpgradeSnsControlledCanister:L,DeregisterDappCanisters:ee,MintSnsTokens:te,Unspecified:e.Record({}),ManageSnsMetadata:x,ExecuteGenericNervousSystemFunction:se,ManageLedgerParameters:oe,Motion:ne}),R=e.Record({url:e.Text,title:e.Text,action:e.Opt(ae),summary:e.Text}),re=e.Record({current_deadline_timestamp_seconds:e.Nat64}),y=e.Record({id:e.Opt(_),payload_text_rendering:e.Opt(e.Text),action:e.Nat64,failure_reason:e.Opt(m),action_auxiliary:e.Opt(H),ballots:e.Vec(e.Tuple(e.Text,K)),minimum_yes_proportion_of_total:e.Opt(V),reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,reward_event_end_timestamp_seconds:e.Opt(e.Nat64),proposal_creation_timestamp_seconds:e.Nat64,initial_voting_period_seconds:e.Nat64,reject_cost_e8s:e.Nat64,latest_tally:e.Opt(Y),wait_for_quiet_deadline_increase_seconds:e.Nat64,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(R),proposer:e.Opt(a),wait_for_quiet_state:e.Opt(re),minimum_yes_proportion_of_exercised:e.Opt(V),is_eligible_for_rewards:e.Bool,executed_timestamp_seconds:e.Nat64}),h=e.Record({memo:e.Nat64,amount_e8s:e.Nat64}),F=e.Record({function_id:e.Nat64,followees:e.Vec(a)}),C=e.Record({to_account:e.Opt(d),percentage_to_disburse:e.Nat32}),ie=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),ce=e.Record({additional_dissolve_delay_seconds:e.Nat32}),_e=e.Record({dissolve_timestamp_seconds:e.Nat64}),de=e.Variant({ChangeAutoStakeMaturity:ie,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:ce,SetDissolveTimestamp:_e}),k=e.Record({operation:e.Opt(de)}),A=e.Record({vote:e.Int32,proposal:e.Opt(_)}),ue=e.Record({amount_to_be_disbursed_e8s:e.Nat64,to_account:e.Opt(d)}),pe=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),le=e.Variant({MemoAndController:pe,NeuronId:e.Record({})}),q=e.Record({by:e.Opt(le)}),G=e.Record({permissions_to_remove:e.Opt(l),principal_id:e.Opt(e.Principal)}),E=e.Record({permissions_to_add:e.Opt(l),principal_id:e.Opt(e.Principal)}),U=e.Record({percentage_to_merge:e.Nat32}),me=e.Record({e8s:e.Nat64}),B=e.Record({to_account:e.Opt(d),amount:e.Opt(me)}),Ne=e.Variant({Split:h,Follow:F,DisburseMaturity:C,Configure:k,RegisterVote:A,SyncCommand:e.Record({}),MakeProposal:R,FinalizeDisburseMaturity:ue,ClaimOrRefreshNeuron:q,RemoveNeuronPermissions:G,AddNeuronPermissions:E,MergeMaturity:U,Disburse:B}),Oe=e.Record({command:e.Opt(Ne),timestamp:e.Nat64}),ge=e.Record({principal:e.Opt(e.Principal),permission_type:e.Vec(e.Int32)}),Re=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),ye=e.Record({timestamp_of_disbursement_seconds:e.Nat64,amount_e8s:e.Nat64,account_to_disburse_to:e.Opt(d),finalize_disbursement_timestamp_seconds:e.Opt(e.Nat64)}),v=e.Record({id:e.Opt(a),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),permissions:e.Vec(ge),maturity_e8s_equivalent:e.Nat64,cached_neuron_stake_e8s:e.Nat64,created_timestamp_seconds:e.Nat64,source_nns_neuron_id:e.Opt(e.Nat64),auto_stake_maturity:e.Opt(e.Bool),aging_since_timestamp_seconds:e.Nat64,dissolve_state:e.Opt(Re),voting_power_percentage_multiplier:e.Nat64,vesting_period_seconds:e.Opt(e.Nat64),disburse_maturity_in_progress:e.Vec(ye),followees:e.Vec(e.Tuple(e.Nat64,c)),neuron_fees_e8s:e.Nat64}),Tt=e.Record({root_canister_id:e.Opt(e.Principal),id_to_nervous_system_functions:e.Vec(e.Tuple(e.Nat64,s)),metrics:e.Opt(i),maturity_modulation:e.Opt(r),mode:e.Int32,parameters:e.Opt(N),is_finalizing_disburse_maturity:e.Opt(e.Bool),deployed_version:e.Opt(O),sns_initialization_parameters:e.Text,latest_reward_event:e.Opt(w),pending_version:e.Opt(b),swap_canister_id:e.Opt(e.Principal),ledger_canister_id:e.Opt(e.Principal),proposals:e.Vec(e.Tuple(e.Nat64,y)),in_flight_commands:e.Vec(e.Tuple(e.Text,Oe)),sns_metadata:e.Opt(x),migrated_root_wasm_memory_limit:e.Opt(e.Bool),neurons:e.Vec(e.Tuple(e.Text,v)),genesis_timestamp_seconds:e.Nat64}),ve=e.Record({principals:e.Vec(e.Principal)}),Se=e.Record({nns_neuron_hotkeys:e.Opt(ve),nns_neuron_controller:e.Opt(e.Principal),nns_neuron_id:e.Opt(e.Nat64)}),fe=e.Variant({NeuronsFund:Se,Direct:e.Record({})}),Pe=e.Record({neuron_ids:e.Vec(a)}),we=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Opt(e.Nat64),participant:e.Opt(fe),stake_e8s:e.Opt(e.Nat64),followees:e.Opt(Pe),neuron_id:e.Opt(a)}),be=e.Record({neuron_recipes:e.Vec(we)}),Me=e.Record({neuron_recipes:e.Opt(be)}),Te=e.Record({id:e.Opt(a),status:e.Int32}),Ve=e.Record({swap_neurons:e.Vec(Te)}),xe=e.Variant({Ok:Ve,Err:e.Int32}),he=e.Record({claim_swap_neurons_result:e.Opt(xe)}),Fe=e.Record({maturity_modulation:e.Opt(r)}),Ce=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),ke=e.Record({mode:e.Opt(e.Int32)}),Ae=e.Record({neuron_id:e.Opt(a)}),qe=e.Variant({Error:m,Neuron:v}),Ge=e.Record({result:e.Opt(qe)}),z=e.Record({proposal_id:e.Opt(_)}),Ee=e.Variant({Error:m,Proposal:y}),Ue=e.Record({result:e.Opt(Ee)}),Be=e.Variant({stopped:e.Null,stopping:e.Null,running:e.Null}),ze=e.Record({freezing_threshold:e.Nat,controllers:e.Vec(e.Principal),wasm_memory_limit:e.Opt(e.Nat),memory_allocation:e.Nat,compute_allocation:e.Nat}),je=e.Record({status:Be,memory_size:e.Nat,cycles:e.Nat,settings:ze,idle_cycles_burned_per_day:e.Nat,module_hash:e.Opt(e.Vec(e.Nat8))}),Qe=e.Record({deployed_version:e.Opt(O),pending_version:e.Opt(b)}),We=e.Record({sns_initialization_parameters:e.Text}),$e=e.Record({reserved_ids:e.Vec(e.Nat64),functions:e.Vec(s)}),Je=e.Record({of_principal:e.Opt(e.Principal),limit:e.Nat32,start_page_at:e.Opt(a)}),Xe=e.Record({neurons:e.Vec(v)}),He=e.Record({include_reward_status:e.Vec(e.Int32),before_proposal:e.Opt(_),limit:e.Nat32,exclude_type:e.Vec(e.Nat64),include_status:e.Vec(e.Int32)}),Ke=e.Record({include_ballots_by_caller:e.Opt(e.Bool),proposals:e.Vec(y)}),Ye=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),Ze=e.Variant({Split:h,Follow:F,DisburseMaturity:C,ClaimOrRefresh:q,Configure:k,RegisterVote:A,MakeProposal:R,StakeMaturity:Ye,RemoveNeuronPermissions:G,AddNeuronPermissions:E,MergeMaturity:U,Disburse:B}),De=e.Record({subaccount:e.Vec(e.Nat8),command:e.Opt(Ze)}),Ie=e.Record({created_neuron_id:e.Opt(a)}),Le=e.Record({amount_disbursed_e8s:e.Nat64,amount_deducted_e8s:e.Opt(e.Nat64)}),et=e.Record({refreshed_neuron_id:e.Opt(a)}),tt=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),st=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),ot=e.Record({transfer_block_height:e.Nat64}),nt=e.Variant({Error:m,Split:Ie,Follow:e.Record({}),DisburseMaturity:Le,ClaimOrRefresh:et,Configure:e.Record({}),RegisterVote:e.Record({}),MakeProposal:z,RemoveNeuronPermission:e.Record({}),StakeMaturity:tt,MergeMaturity:st,Disburse:ot,AddNeuronPermission:e.Record({})}),at=e.Record({command:e.Opt(nt)}),rt=e.Record({mode:e.Int32});return e.Service({claim_swap_neurons:e.Func([Me],[he],[]),fail_stuck_upgrade_in_progress:e.Func([e.Record({})],[e.Record({})],[]),get_build_metadata:e.Func([],[e.Text],["query"]),get_latest_reward_event:e.Func([],[w],["query"]),get_maturity_modulation:e.Func([e.Record({})],[Fe],[]),get_metadata:e.Func([e.Record({})],[Ce],["query"]),get_mode:e.Func([e.Record({})],[ke],["query"]),get_nervous_system_parameters:e.Func([e.Null],[N],["query"]),get_neuron:e.Func([Ae],[Ge],["query"]),get_proposal:e.Func([z],[Ue],["query"]),get_root_canister_status:e.Func([e.Null],[je],[]),get_running_sns_version:e.Func([e.Record({})],[Qe],["query"]),get_sns_initialization_parameters:e.Func([e.Record({})],[We],["query"]),list_nervous_system_functions:e.Func([],[$e],["query"]),list_neurons:e.Func([Je],[Xe],["query"]),list_proposals:e.Func([He],[Ke],["query"]),manage_neuron:e.Func([De],[at],[]),set_mode:e.Func([rt],[e.Record({})],[])})};import{fromNullable as n,toNullable as S}from"@dfinity/utils";var f=({neuronId:{id:e},command:o})=>({subaccount:e,command:[o]}),j=({neuronId:e,operation:o})=>f({neuronId:e,command:{Configure:{operation:[o]}}}),dt=({owner:e,subaccount:o})=>({owner:S(e),subaccount:o===void 0?[]:S({subaccount:o})}),ut=({neuronId:e,permissions:o,principal:t})=>f({neuronId:e,command:{AddNeuronPermissions:{permissions_to_add:[{permissions:Int32Array.from(o)}],principal_id:[t]}}}),pt=({neuronId:e,permissions:o,principal:t})=>f({neuronId:e,command:{RemoveNeuronPermissions:{permissions_to_remove:[{permissions:Int32Array.from(o)}],principal_id:[t]}}}),lt=({neuronId:e,memo:o,amount:t})=>f({neuronId:e,command:{Split:{memo:o,amount_e8s:t}}}),mt=({neuronId:e,amount:o,toAccount:t})=>f({neuronId:e,command:{Disburse:{to_account:t===void 0?[]:S(dt(t)),amount:o===void 0?[]:[{e8s:o}]}}}),Nt=e=>j({neuronId:e,operation:{StartDissolving:{}}}),Ot=e=>j({neuronId:e,operation:{StopDissolving:{}}}),gt=({neuronId:e,percentageToStake:o})=>f({neuronId:e,command:{StakeMaturity:{percentage_to_stake:S(o)}}}),Rt=({neuronId:e,percentageToDisburse:o,toAccount:t})=>f({neuronId:e,command:{DisburseMaturity:{to_account:t===void 0?[]:S(dt(t)),percentage_to_disburse:o}}}),yt=({neuronId:e,autoStake:o})=>j({neuronId:e,operation:{ChangeAutoStakeMaturity:{requested_setting_for_auto_stake_maturity:o}}}),vt=({neuronId:e,dissolveTimestampSeconds:o})=>j({neuronId:e,operation:{SetDissolveTimestamp:{dissolve_timestamp_seconds:o}}}),St=({neuronId:e,additionalDissolveDelaySeconds:o})=>j({neuronId:e,operation:{IncreaseDissolveDelay:{additional_dissolve_delay_seconds:o}}}),ft=({neuronId:e,functionId:o,followees:t})=>({subaccount:e.id,command:[{Follow:{function_id:o,followees:t}}]}),Pt=({neuronId:e,proposalId:o,vote:t})=>({subaccount:e.id,command:[{RegisterVote:{vote:t,proposal:[o]}}]}),it=({subaccount:e,memo:o,controller:t})=>({subaccount:e,command:[{ClaimOrRefresh:{by:[o===void 0?{NeuronId:{}}:{MemoAndController:{memo:o,controller:S(t)}}]}}]}),wt=({excludeType:e,beforeProposal:o,includeRewardStatus:t,includeStatus:s,limit:i})=>({exclude_type:BigUint64Array.from(e??[]),before_proposal:S(o),include_reward_status:Int32Array.from(t??[]),include_status:Int32Array.from(s??[]),limit:i??10}),$t=e=>{if("ManageNervousSystemParameters"in e)return{ManageNervousSystemParameters:Gt(e.ManageNervousSystemParameters)};if("AddGenericNervousSystemFunction"in e)return{AddGenericNervousSystemFunction:At(e.AddGenericNervousSystemFunction)};if("RemoveGenericNervousSystemFunction"in e)return{RemoveGenericNervousSystemFunction:e.RemoveGenericNervousSystemFunction};if("UpgradeSnsToNextVersion"in e)return{UpgradeSnsToNextVersion:e.UpgradeSnsToNextVersion};if("RegisterDappCanisters"in e)return{RegisterDappCanisters:e.RegisterDappCanisters};if("TransferSnsTreasuryFunds"in e)return{TransferSnsTreasuryFunds:Ft(e.TransferSnsTreasuryFunds)};if("UpgradeSnsControlledCanister"in e)return{UpgradeSnsControlledCanister:ht(e.UpgradeSnsControlledCanister)};if("DeregisterDappCanisters"in e)return{DeregisterDappCanisters:e.DeregisterDappCanisters};if("Unspecified"in e)return{Unspecified:e.Unspecified};if("ManageSnsMetadata"in e)return{ManageSnsMetadata:xt(e.ManageSnsMetadata)};if("ExecuteGenericNervousSystemFunction"in e)return{ExecuteGenericNervousSystemFunction:e.ExecuteGenericNervousSystemFunction};if("Motion"in e)return{Motion:e.Motion};throw new Error(`Unknown action type ${JSON.stringify(e)}`)},xt=e=>({url:n(e.url),logo:n(e.logo),name:n(e.name),description:n(e.description)}),ht=e=>({new_canister_wasm:e.new_canister_wasm,canister_id:n(e.canister_id),canister_upgrade_arg:n(e.canister_upgrade_arg),mode:n(e.mode)}),Ft=e=>({from_treasury:e.from_treasury,to_principal:n(e.to_principal),to_subaccount:n(e.to_subaccount),memo:n(e.memo),amount_e8s:e.amount_e8s}),Ct=e=>({validator_canister_id:n(e.validator_canister_id),target_canister_id:n(e.target_canister_id),validator_method_name:n(e.validator_method_name),target_method_name:n(e.target_method_name)}),kt=e=>{if(e!==void 0){if("NativeNervousSystemFunction"in e)return{NativeNervousSystemFunction:e.NativeNervousSystemFunction};if("GenericNervousSystemFunction"in e)return{GenericNervousSystemFunction:Ct(e.GenericNervousSystemFunction)};throw new Error(`Unknown FunctionType ${JSON.stringify(e)}`)}},At=e=>({id:e.id,name:e.name,description:n(e.description),function_type:kt(n(e.function_type))}),qt=e=>e&&{final_reward_rate_basis_points:n(e.final_reward_rate_basis_points),initial_reward_rate_basis_points:n(e.initial_reward_rate_basis_points),reward_rate_transition_duration_seconds:n(e.reward_rate_transition_duration_seconds),round_duration_seconds:n(e.round_duration_seconds)},Gt=e=>({default_followees:n(e.default_followees),max_dissolve_delay_seconds:n(e.max_dissolve_delay_seconds),max_dissolve_delay_bonus_percentage:n(e.max_dissolve_delay_bonus_percentage),max_followees_per_function:n(e.max_followees_per_function),neuron_claimer_permissions:n(e.neuron_claimer_permissions),neuron_minimum_stake_e8s:n(e.neuron_minimum_stake_e8s),max_neuron_age_for_age_bonus:n(e.max_neuron_age_for_age_bonus),initial_voting_period_seconds:n(e.initial_voting_period_seconds),neuron_minimum_dissolve_delay_to_vote_seconds:n(e.neuron_minimum_dissolve_delay_to_vote_seconds),reject_cost_e8s:n(e.reject_cost_e8s),max_proposals_to_keep_per_action:n(e.max_proposals_to_keep_per_action),wait_for_quiet_deadline_increase_seconds:n(e.wait_for_quiet_deadline_increase_seconds),max_number_of_neurons:n(e.max_number_of_neurons),transaction_fee_e8s:n(e.transaction_fee_e8s),max_number_of_proposals_with_ballots:n(e.max_number_of_proposals_with_ballots),max_age_bonus_percentage:n(e.max_age_bonus_percentage),neuron_grantable_permissions:n(e.neuron_grantable_permissions),voting_rewards_parameters:qt(n(e.voting_rewards_parameters)),max_number_of_principals_per_neuron:n(e.max_number_of_principals_per_neuron)});var Mt=class e extends Ut{constructor(){super(...arguments);this.listNeurons=async t=>{let{principal:s,limit:i,beforeNeuronId:r}=t,{neurons:a}=await this.caller(t).list_neurons({of_principal:Q(s),limit:i??100,start_page_at:Q(r)});return a};this.listProposals=async t=>{let{certified:s}=t;return await this.caller({certified:s}).list_proposals(wt(t))};this.getProposal=async t=>{let{proposalId:s}=t,{result:i}=await this.caller(t).get_proposal({proposal_id:Q(s)}),r=P(i);if(r===void 0||"Error"in r)throw new u(r?.Error.error_message??"Response type not supported");return r.Proposal};this.listNervousSystemFunctions=async t=>this.caller(t).list_nervous_system_functions();this.metadata=t=>this.caller(t).get_metadata({});this.nervousSystemParameters=t=>this.caller(t).get_nervous_system_parameters(null);this.getNeuron=async t=>{let{neuronId:s}=t,{result:i}=await this.caller(t).get_neuron({neuron_id:Q(s)}),r=P(i);if(r===void 0||"Error"in r)throw new u(r?.Error.error_message??"Response type not supported");return r.Neuron};this.queryNeuron=async t=>{try{return await this.getNeuron(t)}catch(s){if(s instanceof Error&&s.message.includes("No neuron for given NeuronId"))return;throw s}};this.manageNeuron=async t=>{let s=await this.caller({certified:!0}).manage_neuron(t);return this.assertManageNeuronError(s),s};this.addNeuronPermissions=async t=>{let s=ut(t);await this.manageNeuron(s)};this.removeNeuronPermissions=async t=>{let s=pt(t);await this.manageNeuron(s)};this.splitNeuron=async t=>{let s=lt(t),{command:i}=await this.manageNeuron(s),r=P(i),a=c=>`Split neuron failed (${c})`;if(r===void 0)throw new u(a("no response"));if("Split"in r){let c=r.Split,p=P(c.created_neuron_id);if(p!==void 0)return p;throw new u(a("no id"))}throw new u(a("unknown"))};this.disburse=async t=>{let s=mt(t);await this.manageNeuron(s)};this.startDissolving=async t=>{let s=Nt(t);await this.manageNeuron(s)};this.stopDissolving=async t=>{let s=Ot(t);await this.manageNeuron(s)};this.stakeMaturity=async({neuronId:t,percentageToStake:s})=>{bt(s??100);let i=gt({neuronId:t,percentageToStake:s});await this.manageNeuron(i)};this.disburseMaturity=async t=>{bt(t.percentageToDisburse);let s=Rt(t);await this.manageNeuron(s)};this.autoStakeMaturity=async t=>{let s=yt(t);await this.manageNeuron(s)};this.setDissolveTimestamp=async t=>{let s=vt(t);await this.manageNeuron(s)};this.increaseDissolveDelay=async t=>{let s=St(t);await this.manageNeuron(s)};this.setTopicFollowees=async t=>{let s=ft(t);await this.manageNeuron(s)};this.registerVote=async t=>{let s=Pt(t);await this.manageNeuron(s)};this.refreshNeuron=async t=>{let s=it({subaccount:t.id});await this.manageNeuron(s)};this.claimNeuron=async({memo:t,controller:s,subaccount:i})=>{let r=it({subaccount:i,memo:t,controller:s}),{command:a}=await this.manageNeuron(r),c=P(a);if(c===void 0)throw new u("Claim neuron failed");if("ClaimOrRefresh"in c){let p=P(c.ClaimOrRefresh.refreshed_neuron_id);if(p===void 0)throw new u("Claim neuron failed");return p}throw new u("Claim neuron failed")};this.assertManageNeuronError=({command:t})=>{let s=t[0];if(s!==void 0&&"Error"in s)throw new u(s.Error.error_message)}}static create(t){let{service:s,certifiedService:i,canisterId:r}=Bt({options:t,idlFactory:_t,certifiedIdlFactory:ct});return new e(r,s,i)}};export{$t as a,Mt as b};
2
- //# sourceMappingURL=chunk-JY2TPU5D.js.map