@dfinity/nns 5.1.2 → 5.2.0-next-2024-07-30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -35
- package/dist/candid/genesis_token.did +1 -1
- package/dist/candid/governance.certified.idl.js +145 -21
- package/dist/candid/governance.d.ts +71 -6
- package/dist/candid/governance.did +64 -5
- package/dist/candid/governance.idl.js +145 -21
- package/dist/candid/governance_test.certified.idl.js +145 -21
- package/dist/candid/governance_test.d.ts +71 -6
- package/dist/candid/governance_test.did +64 -5
- package/dist/candid/governance_test.idl.js +145 -21
- package/dist/candid/old_list_neurons_service.certified.idl.d.ts +2 -0
- package/dist/candid/old_list_neurons_service.certified.idl.js +78 -0
- package/dist/candid/sns_wasm.certified.idl.js +3 -0
- package/dist/candid/sns_wasm.d.ts +5 -0
- package/dist/candid/sns_wasm.did +4 -1
- package/dist/candid/sns_wasm.idl.js +3 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +4 -4
- package/dist/esm/chunk-R4CH4PKK.js +2 -0
- package/dist/esm/chunk-R4CH4PKK.js.map +7 -0
- package/dist/esm/chunk-REL225EW.js +19 -0
- package/dist/esm/chunk-REL225EW.js.map +7 -0
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/sns_wasm.canister.js +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +9 -2
- package/dist/types/canisters/governance/response.converters.d.ts +8 -1
- package/dist/types/enums/governance.enums.d.ts +18 -1
- package/dist/types/governance.canister.d.ts +11 -2
- package/dist/types/governance_test.canister.d.ts +2 -1
- package/dist/types/types/governance.options.d.ts +2 -0
- package/dist/types/types/governance_converters.d.ts +43 -1
- package/package.json +7 -7
- package/dist/esm/chunk-AN6DZS5M.js +0 -19
- package/dist/esm/chunk-AN6DZS5M.js.map +0 -7
- package/dist/esm/chunk-RRSEQTKA.js +0 -2
- package/dist/esm/chunk-RRSEQTKA.js.map +0 -7
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e as ie}from"./chunk-KCY3PAEP.js";import{createServices as de}from"@dfinity/utils";var ce=({IDL:e})=>{let r=e.Record({allowed_principals:e.Vec(e.Principal),access_controls_enabled:e.Bool,sns_subnet_ids:e.Vec(e.Principal)}),n=e.Record({wasm:e.Vec(e.Nat8),proposal_id:e.Opt(e.Nat64),canister_type:e.Int32}),o=e.Record({hash:e.Vec(e.Nat8),wasm:e.Opt(n)}),t=e.Record({message:e.Text}),_=e.Variant({Error:t,Hash:e.Vec(e.Nat8)}),d=e.Record({result:e.Opt(_)}),l=e.Record({dissolve_delay_interval_seconds:e.Nat64,count:e.Nat64}),a=e.Record({id:e.Opt(e.Principal)}),u=e.Record({canisters:e.Vec(a)}),O=e.Record({slope_numerator:e.Opt(e.Nat64),intercept_icp_e8s:e.Opt(e.Nat64),from_direct_participation_icp_e8s:e.Opt(e.Nat64),slope_denominator:e.Opt(e.Nat64),to_direct_participation_icp_e8s:e.Opt(e.Nat64)}),R=e.Record({serialized_representation:e.Opt(e.Text)}),m=e.Record({coefficient_intervals:e.Vec(O),max_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64),min_direct_participation_threshold_icp_e8s:e.Opt(e.Nat64),ideal_matched_participation_function:e.Opt(R)}),N=e.Record({principals:e.Vec(e.Principal)}),P=e.Record({has_created_neuron_recipes:e.Opt(e.Bool),hotkeys:e.Opt(N),nns_neuron_id:e.Nat64,amount_icp_e8s:e.Nat64}),V=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Text,cf_neurons:e.Vec(P)}),h=e.Record({participants:e.Vec(V)}),w=e.Record({total_e8s:e.Nat64}),i=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Nat64,memo:e.Nat64,stake_e8s:e.Nat64,vesting_period_seconds:e.Opt(e.Nat64)}),y=e.Record({developer_neurons:e.Vec(i)}),v=e.Record({airdrop_neurons:e.Vec(i)}),x=e.Record({total_e8s:e.Nat64,initial_swap_amount_e8s:e.Nat64}),S=e.Record({treasury_distribution:e.Opt(w),developer_distribution:e.Opt(y),airdrop_distribution:e.Opt(v),swap_distribution:e.Opt(x)}),g=e.Variant({FractionalDeveloperVotingPower:S}),b=e.Record({iso_codes:e.Vec(e.Text)}),T=e.Record({url:e.Opt(e.Text),max_dissolve_delay_seconds:e.Opt(e.Nat64),max_dissolve_delay_bonus_percentage:e.Opt(e.Nat64),nns_proposal_id:e.Opt(e.Nat64),neurons_fund_participation:e.Opt(e.Bool),min_participant_icp_e8s:e.Opt(e.Nat64),neuron_basket_construction_parameters:e.Opt(l),fallback_controller_principal_ids:e.Vec(e.Text),token_symbol:e.Opt(e.Text),final_reward_rate_basis_points:e.Opt(e.Nat64),max_icp_e8s:e.Opt(e.Nat64),neuron_minimum_stake_e8s:e.Opt(e.Nat64),confirmation_text:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),swap_start_timestamp_seconds:e.Opt(e.Nat64),swap_due_timestamp_seconds:e.Opt(e.Nat64),initial_voting_period_seconds:e.Opt(e.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),description:e.Opt(e.Text),max_neuron_age_seconds_for_age_bonus:e.Opt(e.Nat64),min_participants:e.Opt(e.Nat64),initial_reward_rate_basis_points:e.Opt(e.Nat64),wait_for_quiet_deadline_increase_seconds:e.Opt(e.Nat64),transaction_fee_e8s:e.Opt(e.Nat64),dapp_canisters:e.Opt(u),neurons_fund_participation_constraints:e.Opt(m),neurons_fund_participants:e.Opt(h),max_age_bonus_percentage:e.Opt(e.Nat64),initial_token_distribution:e.Opt(g),reward_rate_transition_duration_seconds:e.Opt(e.Nat64),token_logo:e.Opt(e.Text),token_name:e.Opt(e.Text),max_participant_icp_e8s:e.Opt(e.Nat64),min_direct_participation_icp_e8s:e.Opt(e.Nat64),proposal_reject_cost_e8s:e.Opt(e.Nat64),restricted_countries:e.Opt(b),min_icp_e8s:e.Opt(e.Nat64),max_direct_participation_icp_e8s:e.Opt(e.Nat64)}),f=e.Record({sns_init_payload:e.Opt(T)}),F=e.Record({restored_dapp_canisters:e.Vec(a),nns_controlled_dapp_canisters:e.Vec(a),sns_controlled_dapp_canisters:e.Vec(a)}),q=e.Record({root:e.Opt(e.Principal),swap:e.Opt(e.Principal),ledger:e.Opt(e.Principal),index:e.Opt(e.Principal),governance:e.Opt(e.Principal)}),W=e.Record({dapp_canisters_transfer_result:e.Opt(F),subnet_id:e.Opt(e.Principal),error:e.Opt(t),canisters:e.Opt(q)}),c=e.Record({allowed_principals:e.Vec(e.Principal)}),C=e.Record({proposal_id:e.Nat64}),p=e.Record({root_canister_id:e.Opt(e.Principal),governance_canister_id:e.Opt(e.Principal),index_canister_id:e.Opt(e.Principal),swap_canister_id:e.Opt(e.Principal),ledger_canister_id:e.Opt(e.Principal)}),k=e.Variant({Error:t,DeployedSns:p}),G=e.Record({get_deployed_sns_by_proposal_id_result:e.Opt(k)}),s=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)}),A=e.Record({governance_canister_id:e.Opt(e.Principal),current_version:e.Opt(s)}),U=e.Record({next_version:e.Opt(s)}),E=e.Record({hash:e.Vec(e.Nat8)}),B=e.Record({proposal_id:e.Opt(e.Nat64)}),M=e.Record({sns_subnet_ids:e.Vec(e.Principal)}),j=e.Record({hash:e.Vec(e.Nat8)}),z=e.Record({wasm:e.Opt(n)}),H=e.Record({hash:e.Opt(e.Vec(e.Nat8))}),J=e.Record({contents:e.Opt(e.Vec(e.Nat8)),name:e.Opt(e.Text),visibility:e.Opt(e.Text)}),K=e.Record({sections:e.Vec(J)}),Q=e.Variant({Ok:K,Error:t}),X=e.Record({result:e.Opt(Q)}),Y=e.Record({next_version:e.Opt(s),current_version:e.Opt(s)}),Z=e.Record({upgrade_path:e.Vec(Y),sns_governance_canister_id:e.Opt(e.Principal)}),$=e.Record({error:e.Opt(t)}),D=e.Record({instances:e.Vec(p)}),I=e.Record({limit:e.Nat32,starting_at:e.Opt(s),sns_governance_canister_id:e.Opt(e.Principal)}),L=e.Record({archive_wasm_hash:e.Text,root_wasm_hash:e.Text,swap_wasm_hash:e.Text,ledger_wasm_hash:e.Text,governance_wasm_hash:e.Text,index_wasm_hash:e.Text}),ee=e.Record({pretty_version:e.Opt(L),version:e.Opt(s)}),te=e.Record({steps:e.Vec(ee)}),se=e.Record({added_principals:e.Vec(e.Principal),removed_principals:e.Vec(e.Principal)}),ne=e.Variant({Error:t,AllowedPrincipals:c}),ae=e.Record({update_allowed_principals_result:e.Opt(ne)}),re=e.Record({sns_subnet_ids_to_add:e.Vec(e.Principal),sns_subnet_ids_to_remove:e.Vec(e.Principal)}),oe=e.Record({error:e.Opt(t)});return e.Service({add_wasm:e.Func([o],[d],[]),deploy_new_sns:e.Func([f],[W],[]),get_allowed_principals:e.Func([e.Record({})],[c],[]),get_deployed_sns_by_proposal_id:e.Func([C],[G],[]),get_latest_sns_version_pretty:e.Func([e.Null],[e.Vec(e.Tuple(e.Text,e.Text))],[]),get_next_sns_version:e.Func([A],[U],[]),get_proposal_id_that_added_wasm:e.Func([E],[B],[]),get_sns_subnet_ids:e.Func([e.Record({})],[M],[]),get_wasm:e.Func([j],[z],[]),get_wasm_metadata:e.Func([H],[X],[]),insert_upgrade_path_entries:e.Func([Z],[$],[]),list_deployed_snses:e.Func([e.Record({})],[D],[]),list_upgrade_steps:e.Func([I],[te],[]),update_allowed_principals:e.Func([se],[ae],[]),update_sns_subnet_list:e.Func([re],[oe],[])})};var pe=({IDL:e})=>{let r=e.Record({allowed_principals:e.Vec(e.Principal),access_controls_enabled:e.Bool,sns_subnet_ids:e.Vec(e.Principal)}),n=e.Record({wasm:e.Vec(e.Nat8),proposal_id:e.Opt(e.Nat64),canister_type:e.Int32}),o=e.Record({hash:e.Vec(e.Nat8),wasm:e.Opt(n)}),t=e.Record({message:e.Text}),_=e.Variant({Error:t,Hash:e.Vec(e.Nat8)}),d=e.Record({result:e.Opt(_)}),l=e.Record({dissolve_delay_interval_seconds:e.Nat64,count:e.Nat64}),a=e.Record({id:e.Opt(e.Principal)}),u=e.Record({canisters:e.Vec(a)}),O=e.Record({slope_numerator:e.Opt(e.Nat64),intercept_icp_e8s:e.Opt(e.Nat64),from_direct_participation_icp_e8s:e.Opt(e.Nat64),slope_denominator:e.Opt(e.Nat64),to_direct_participation_icp_e8s:e.Opt(e.Nat64)}),R=e.Record({serialized_representation:e.Opt(e.Text)}),m=e.Record({coefficient_intervals:e.Vec(O),max_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64),min_direct_participation_threshold_icp_e8s:e.Opt(e.Nat64),ideal_matched_participation_function:e.Opt(R)}),N=e.Record({principals:e.Vec(e.Principal)}),P=e.Record({has_created_neuron_recipes:e.Opt(e.Bool),hotkeys:e.Opt(N),nns_neuron_id:e.Nat64,amount_icp_e8s:e.Nat64}),V=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Text,cf_neurons:e.Vec(P)}),h=e.Record({participants:e.Vec(V)}),w=e.Record({total_e8s:e.Nat64}),i=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Nat64,memo:e.Nat64,stake_e8s:e.Nat64,vesting_period_seconds:e.Opt(e.Nat64)}),y=e.Record({developer_neurons:e.Vec(i)}),v=e.Record({airdrop_neurons:e.Vec(i)}),x=e.Record({total_e8s:e.Nat64,initial_swap_amount_e8s:e.Nat64}),S=e.Record({treasury_distribution:e.Opt(w),developer_distribution:e.Opt(y),airdrop_distribution:e.Opt(v),swap_distribution:e.Opt(x)}),g=e.Variant({FractionalDeveloperVotingPower:S}),b=e.Record({iso_codes:e.Vec(e.Text)}),T=e.Record({url:e.Opt(e.Text),max_dissolve_delay_seconds:e.Opt(e.Nat64),max_dissolve_delay_bonus_percentage:e.Opt(e.Nat64),nns_proposal_id:e.Opt(e.Nat64),neurons_fund_participation:e.Opt(e.Bool),min_participant_icp_e8s:e.Opt(e.Nat64),neuron_basket_construction_parameters:e.Opt(l),fallback_controller_principal_ids:e.Vec(e.Text),token_symbol:e.Opt(e.Text),final_reward_rate_basis_points:e.Opt(e.Nat64),max_icp_e8s:e.Opt(e.Nat64),neuron_minimum_stake_e8s:e.Opt(e.Nat64),confirmation_text:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),swap_start_timestamp_seconds:e.Opt(e.Nat64),swap_due_timestamp_seconds:e.Opt(e.Nat64),initial_voting_period_seconds:e.Opt(e.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),description:e.Opt(e.Text),max_neuron_age_seconds_for_age_bonus:e.Opt(e.Nat64),min_participants:e.Opt(e.Nat64),initial_reward_rate_basis_points:e.Opt(e.Nat64),wait_for_quiet_deadline_increase_seconds:e.Opt(e.Nat64),transaction_fee_e8s:e.Opt(e.Nat64),dapp_canisters:e.Opt(u),neurons_fund_participation_constraints:e.Opt(m),neurons_fund_participants:e.Opt(h),max_age_bonus_percentage:e.Opt(e.Nat64),initial_token_distribution:e.Opt(g),reward_rate_transition_duration_seconds:e.Opt(e.Nat64),token_logo:e.Opt(e.Text),token_name:e.Opt(e.Text),max_participant_icp_e8s:e.Opt(e.Nat64),min_direct_participation_icp_e8s:e.Opt(e.Nat64),proposal_reject_cost_e8s:e.Opt(e.Nat64),restricted_countries:e.Opt(b),min_icp_e8s:e.Opt(e.Nat64),max_direct_participation_icp_e8s:e.Opt(e.Nat64)}),f=e.Record({sns_init_payload:e.Opt(T)}),F=e.Record({restored_dapp_canisters:e.Vec(a),nns_controlled_dapp_canisters:e.Vec(a),sns_controlled_dapp_canisters:e.Vec(a)}),q=e.Record({root:e.Opt(e.Principal),swap:e.Opt(e.Principal),ledger:e.Opt(e.Principal),index:e.Opt(e.Principal),governance:e.Opt(e.Principal)}),W=e.Record({dapp_canisters_transfer_result:e.Opt(F),subnet_id:e.Opt(e.Principal),error:e.Opt(t),canisters:e.Opt(q)}),c=e.Record({allowed_principals:e.Vec(e.Principal)}),C=e.Record({proposal_id:e.Nat64}),p=e.Record({root_canister_id:e.Opt(e.Principal),governance_canister_id:e.Opt(e.Principal),index_canister_id:e.Opt(e.Principal),swap_canister_id:e.Opt(e.Principal),ledger_canister_id:e.Opt(e.Principal)}),k=e.Variant({Error:t,DeployedSns:p}),G=e.Record({get_deployed_sns_by_proposal_id_result:e.Opt(k)}),s=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)}),A=e.Record({governance_canister_id:e.Opt(e.Principal),current_version:e.Opt(s)}),U=e.Record({next_version:e.Opt(s)}),E=e.Record({hash:e.Vec(e.Nat8)}),B=e.Record({proposal_id:e.Opt(e.Nat64)}),M=e.Record({sns_subnet_ids:e.Vec(e.Principal)}),j=e.Record({hash:e.Vec(e.Nat8)}),z=e.Record({wasm:e.Opt(n)}),H=e.Record({hash:e.Opt(e.Vec(e.Nat8))}),J=e.Record({contents:e.Opt(e.Vec(e.Nat8)),name:e.Opt(e.Text),visibility:e.Opt(e.Text)}),K=e.Record({sections:e.Vec(J)}),Q=e.Variant({Ok:K,Error:t}),X=e.Record({result:e.Opt(Q)}),Y=e.Record({next_version:e.Opt(s),current_version:e.Opt(s)}),Z=e.Record({upgrade_path:e.Vec(Y),sns_governance_canister_id:e.Opt(e.Principal)}),$=e.Record({error:e.Opt(t)}),D=e.Record({instances:e.Vec(p)}),I=e.Record({limit:e.Nat32,starting_at:e.Opt(s),sns_governance_canister_id:e.Opt(e.Principal)}),L=e.Record({archive_wasm_hash:e.Text,root_wasm_hash:e.Text,swap_wasm_hash:e.Text,ledger_wasm_hash:e.Text,governance_wasm_hash:e.Text,index_wasm_hash:e.Text}),ee=e.Record({pretty_version:e.Opt(L),version:e.Opt(s)}),te=e.Record({steps:e.Vec(ee)}),se=e.Record({added_principals:e.Vec(e.Principal),removed_principals:e.Vec(e.Principal)}),ne=e.Variant({Error:t,AllowedPrincipals:c}),ae=e.Record({update_allowed_principals_result:e.Opt(ne)}),re=e.Record({sns_subnet_ids_to_add:e.Vec(e.Principal),sns_subnet_ids_to_remove:e.Vec(e.Principal)}),oe=e.Record({error:e.Opt(t)});return e.Service({add_wasm:e.Func([o],[d],[]),deploy_new_sns:e.Func([f],[W],[]),get_allowed_principals:e.Func([e.Record({})],[c],["query"]),get_deployed_sns_by_proposal_id:e.Func([C],[G],["query"]),get_latest_sns_version_pretty:e.Func([e.Null],[e.Vec(e.Tuple(e.Text,e.Text))],["query"]),get_next_sns_version:e.Func([A],[U],["query"]),get_proposal_id_that_added_wasm:e.Func([E],[B],["query"]),get_sns_subnet_ids:e.Func([e.Record({})],[M],["query"]),get_wasm:e.Func([j],[z],["query"]),get_wasm_metadata:e.Func([H],[X],["query"]),insert_upgrade_path_entries:e.Func([Z],[$],[]),list_deployed_snses:e.Func([e.Record({})],[D],["query"]),list_upgrade_steps:e.Func([I],[te],["query"]),update_allowed_principals:e.Func([se],[ae],[]),update_sns_subnet_list:e.Func([re],[oe],[])})};var _e=class e{constructor(r,n){this.service=r;this.certifiedService=n;this.listSnses=async({certified:r=!0})=>{let n=r?this.certifiedService:this.service,{instances:o}=await n.list_deployed_snses({});return o}}static create(r={}){let{service:n,certifiedService:o}=de({options:{...r,canisterId:r.canisterId??ie},idlFactory:pe,certifiedIdlFactory:ce});return new e(n,o)}};export{_e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-R4CH4PKK.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/sns_wasm.canister.ts", "../../candid/sns_wasm.certified.idl.js", "../../candid/sns_wasm.idl.js"],
|
|
4
|
+
"sourcesContent": ["import { createServices, type CanisterOptions } from \"@dfinity/utils\";\nimport type {\n DeployedSns,\n _SERVICE as SnsWasmService,\n} from \"../candid/sns_wasm\";\nimport { idlFactory as certifiedIdlFactory } from \"../candid/sns_wasm.certified.idl\";\nimport { idlFactory } from \"../candid/sns_wasm.idl\";\nimport { MAINNET_SNS_WASM_CANISTER_ID } from \"./constants/canister_ids\";\n\nexport class SnsWasmCanister {\n private constructor(\n private readonly service: SnsWasmService,\n private readonly certifiedService: SnsWasmService,\n ) {}\n\n public static create(options: CanisterOptions<SnsWasmService> = {}) {\n const { service, certifiedService } = createServices<SnsWasmService>({\n options: {\n ...options,\n canisterId: options.canisterId ?? MAINNET_SNS_WASM_CANISTER_ID,\n },\n idlFactory,\n certifiedIdlFactory,\n });\n\n return new SnsWasmCanister(service, certifiedService);\n }\n\n public listSnses = async ({\n certified = true,\n }: {\n certified?: boolean;\n }): Promise<DeployedSns[]> => {\n const service = certified ? this.certifiedService : this.service;\n\n const { instances } = await service.list_deployed_snses({});\n return instances;\n };\n}\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/sns_wasm.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsWasmCanisterInitPayload = IDL.Record({\n 'allowed_principals' : IDL.Vec(IDL.Principal),\n 'access_controls_enabled' : IDL.Bool,\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n const SnsWasm = IDL.Record({\n 'wasm' : IDL.Vec(IDL.Nat8),\n 'proposal_id' : IDL.Opt(IDL.Nat64),\n 'canister_type' : IDL.Int32,\n });\n const AddWasmRequest = IDL.Record({\n 'hash' : IDL.Vec(IDL.Nat8),\n 'wasm' : IDL.Opt(SnsWasm),\n });\n const SnsWasmError = IDL.Record({ 'message' : IDL.Text });\n const Result = IDL.Variant({\n 'Error' : SnsWasmError,\n 'Hash' : IDL.Vec(IDL.Nat8),\n });\n const AddWasmResponse = IDL.Record({ 'result' : IDL.Opt(Result) });\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\n const Canister = IDL.Record({ 'id' : IDL.Opt(IDL.Principal) });\n const DappCanisters = IDL.Record({ 'canisters' : IDL.Vec(Canister) });\n const LinearScalingCoefficient = IDL.Record({\n 'slope_numerator' : IDL.Opt(IDL.Nat64),\n 'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'slope_denominator' : IDL.Opt(IDL.Nat64),\n 'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const IdealMatchedParticipationFunction = IDL.Record({\n 'serialized_representation' : IDL.Opt(IDL.Text),\n });\n const NeuronsFundParticipationConstraints = IDL.Record({\n 'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),\n 'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'ideal_matched_participation_function' : IDL.Opt(\n IdealMatchedParticipationFunction\n ),\n });\n const Principals = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });\n const CfNeuron = IDL.Record({\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n 'hotkeys' : IDL.Opt(Principals),\n 'nns_neuron_id' : IDL.Nat64,\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const CfParticipant = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'hotkey_principal' : IDL.Text,\n 'cf_neurons' : IDL.Vec(CfNeuron),\n });\n const NeuronsFundParticipants = IDL.Record({\n 'participants' : IDL.Vec(CfParticipant),\n });\n const TreasuryDistribution = IDL.Record({ 'total_e8s' : IDL.Nat64 });\n const NeuronDistribution = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'dissolve_delay_seconds' : IDL.Nat64,\n 'memo' : IDL.Nat64,\n 'stake_e8s' : IDL.Nat64,\n 'vesting_period_seconds' : IDL.Opt(IDL.Nat64),\n });\n const DeveloperDistribution = IDL.Record({\n 'developer_neurons' : IDL.Vec(NeuronDistribution),\n });\n const AirdropDistribution = IDL.Record({\n 'airdrop_neurons' : IDL.Vec(NeuronDistribution),\n });\n const SwapDistribution = IDL.Record({\n 'total_e8s' : IDL.Nat64,\n 'initial_swap_amount_e8s' : IDL.Nat64,\n });\n const FractionalDeveloperVotingPower = IDL.Record({\n 'treasury_distribution' : IDL.Opt(TreasuryDistribution),\n 'developer_distribution' : IDL.Opt(DeveloperDistribution),\n 'airdrop_distribution' : IDL.Opt(AirdropDistribution),\n 'swap_distribution' : IDL.Opt(SwapDistribution),\n });\n const InitialTokenDistribution = IDL.Variant({\n 'FractionalDeveloperVotingPower' : FractionalDeveloperVotingPower,\n });\n const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const SnsInitPayload = IDL.Record({\n 'url' : IDL.Opt(IDL.Text),\n 'max_dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),\n 'max_dissolve_delay_bonus_percentage' : IDL.Opt(IDL.Nat64),\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation' : IDL.Opt(IDL.Bool),\n 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),\n 'token_symbol' : IDL.Opt(IDL.Text),\n 'final_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),\n 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'logo' : IDL.Opt(IDL.Text),\n 'name' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'initial_voting_period_seconds' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),\n 'description' : IDL.Opt(IDL.Text),\n 'max_neuron_age_seconds_for_age_bonus' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat64),\n 'initial_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),\n 'wait_for_quiet_deadline_increase_seconds' : IDL.Opt(IDL.Nat64),\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'dapp_canisters' : IDL.Opt(DappCanisters),\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),\n 'max_age_bonus_percentage' : IDL.Opt(IDL.Nat64),\n 'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),\n 'reward_rate_transition_duration_seconds' : IDL.Opt(IDL.Nat64),\n 'token_logo' : IDL.Opt(IDL.Text),\n 'token_name' : IDL.Opt(IDL.Text),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),\n 'restricted_countries' : IDL.Opt(Countries),\n 'min_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const DeployNewSnsRequest = IDL.Record({\n 'sns_init_payload' : IDL.Opt(SnsInitPayload),\n });\n const DappCanistersTransferResult = IDL.Record({\n 'restored_dapp_canisters' : IDL.Vec(Canister),\n 'nns_controlled_dapp_canisters' : IDL.Vec(Canister),\n 'sns_controlled_dapp_canisters' : IDL.Vec(Canister),\n });\n const SnsCanisterIds = 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 });\n const DeployNewSnsResponse = IDL.Record({\n 'dapp_canisters_transfer_result' : IDL.Opt(DappCanistersTransferResult),\n 'subnet_id' : IDL.Opt(IDL.Principal),\n 'error' : IDL.Opt(SnsWasmError),\n 'canisters' : IDL.Opt(SnsCanisterIds),\n });\n const GetAllowedPrincipalsResponse = IDL.Record({\n 'allowed_principals' : IDL.Vec(IDL.Principal),\n });\n const GetDeployedSnsByProposalIdRequest = IDL.Record({\n 'proposal_id' : IDL.Nat64,\n });\n const DeployedSns = IDL.Record({\n 'root_canister_id' : IDL.Opt(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 GetDeployedSnsByProposalIdResult = IDL.Variant({\n 'Error' : SnsWasmError,\n 'DeployedSns' : DeployedSns,\n });\n const GetDeployedSnsByProposalIdResponse = IDL.Record({\n 'get_deployed_sns_by_proposal_id_result' : IDL.Opt(\n GetDeployedSnsByProposalIdResult\n ),\n });\n const SnsVersion = IDL.Record({\n 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'root_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'index_wasm_hash' : IDL.Vec(IDL.Nat8),\n });\n const GetNextSnsVersionRequest = IDL.Record({\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'current_version' : IDL.Opt(SnsVersion),\n });\n const GetNextSnsVersionResponse = IDL.Record({\n 'next_version' : IDL.Opt(SnsVersion),\n });\n const GetProposalIdThatAddedWasmRequest = IDL.Record({\n 'hash' : IDL.Vec(IDL.Nat8),\n });\n const GetProposalIdThatAddedWasmResponse = IDL.Record({\n 'proposal_id' : IDL.Opt(IDL.Nat64),\n });\n const GetSnsSubnetIdsResponse = IDL.Record({\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n const GetWasmRequest = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });\n const GetWasmResponse = IDL.Record({ 'wasm' : IDL.Opt(SnsWasm) });\n const GetWasmMetadataRequest = IDL.Record({\n 'hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const MetadataSection = IDL.Record({\n 'contents' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'name' : IDL.Opt(IDL.Text),\n 'visibility' : IDL.Opt(IDL.Text),\n });\n const Ok = IDL.Record({ 'sections' : IDL.Vec(MetadataSection) });\n const Result_1 = IDL.Variant({ 'Ok' : Ok, 'Error' : SnsWasmError });\n const GetWasmMetadataResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });\n const SnsUpgrade = IDL.Record({\n 'next_version' : IDL.Opt(SnsVersion),\n 'current_version' : IDL.Opt(SnsVersion),\n });\n const InsertUpgradePathEntriesRequest = IDL.Record({\n 'upgrade_path' : IDL.Vec(SnsUpgrade),\n 'sns_governance_canister_id' : IDL.Opt(IDL.Principal),\n });\n const InsertUpgradePathEntriesResponse = IDL.Record({\n 'error' : IDL.Opt(SnsWasmError),\n });\n const ListDeployedSnsesResponse = IDL.Record({\n 'instances' : IDL.Vec(DeployedSns),\n });\n const ListUpgradeStepsRequest = IDL.Record({\n 'limit' : IDL.Nat32,\n 'starting_at' : IDL.Opt(SnsVersion),\n 'sns_governance_canister_id' : IDL.Opt(IDL.Principal),\n });\n const PrettySnsVersion = IDL.Record({\n 'archive_wasm_hash' : IDL.Text,\n 'root_wasm_hash' : IDL.Text,\n 'swap_wasm_hash' : IDL.Text,\n 'ledger_wasm_hash' : IDL.Text,\n 'governance_wasm_hash' : IDL.Text,\n 'index_wasm_hash' : IDL.Text,\n });\n const ListUpgradeStep = IDL.Record({\n 'pretty_version' : IDL.Opt(PrettySnsVersion),\n 'version' : IDL.Opt(SnsVersion),\n });\n const ListUpgradeStepsResponse = IDL.Record({\n 'steps' : IDL.Vec(ListUpgradeStep),\n });\n const UpdateAllowedPrincipalsRequest = IDL.Record({\n 'added_principals' : IDL.Vec(IDL.Principal),\n 'removed_principals' : IDL.Vec(IDL.Principal),\n });\n const UpdateAllowedPrincipalsResult = IDL.Variant({\n 'Error' : SnsWasmError,\n 'AllowedPrincipals' : GetAllowedPrincipalsResponse,\n });\n const UpdateAllowedPrincipalsResponse = IDL.Record({\n 'update_allowed_principals_result' : IDL.Opt(UpdateAllowedPrincipalsResult),\n });\n const UpdateSnsSubnetListRequest = IDL.Record({\n 'sns_subnet_ids_to_add' : IDL.Vec(IDL.Principal),\n 'sns_subnet_ids_to_remove' : IDL.Vec(IDL.Principal),\n });\n const UpdateSnsSubnetListResponse = IDL.Record({\n 'error' : IDL.Opt(SnsWasmError),\n });\n return IDL.Service({\n 'add_wasm' : IDL.Func([AddWasmRequest], [AddWasmResponse], []),\n 'deploy_new_sns' : IDL.Func(\n [DeployNewSnsRequest],\n [DeployNewSnsResponse],\n [],\n ),\n 'get_allowed_principals' : IDL.Func(\n [IDL.Record({})],\n [GetAllowedPrincipalsResponse],\n [],\n ),\n 'get_deployed_sns_by_proposal_id' : IDL.Func(\n [GetDeployedSnsByProposalIdRequest],\n [GetDeployedSnsByProposalIdResponse],\n [],\n ),\n 'get_latest_sns_version_pretty' : IDL.Func(\n [IDL.Null],\n [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],\n [],\n ),\n 'get_next_sns_version' : IDL.Func(\n [GetNextSnsVersionRequest],\n [GetNextSnsVersionResponse],\n [],\n ),\n 'get_proposal_id_that_added_wasm' : IDL.Func(\n [GetProposalIdThatAddedWasmRequest],\n [GetProposalIdThatAddedWasmResponse],\n [],\n ),\n 'get_sns_subnet_ids' : IDL.Func(\n [IDL.Record({})],\n [GetSnsSubnetIdsResponse],\n [],\n ),\n 'get_wasm' : IDL.Func([GetWasmRequest], [GetWasmResponse], []),\n 'get_wasm_metadata' : IDL.Func(\n [GetWasmMetadataRequest],\n [GetWasmMetadataResponse],\n [],\n ),\n 'insert_upgrade_path_entries' : IDL.Func(\n [InsertUpgradePathEntriesRequest],\n [InsertUpgradePathEntriesResponse],\n [],\n ),\n 'list_deployed_snses' : IDL.Func(\n [IDL.Record({})],\n [ListDeployedSnsesResponse],\n [],\n ),\n 'list_upgrade_steps' : IDL.Func(\n [ListUpgradeStepsRequest],\n [ListUpgradeStepsResponse],\n [],\n ),\n 'update_allowed_principals' : IDL.Func(\n [UpdateAllowedPrincipalsRequest],\n [UpdateAllowedPrincipalsResponse],\n [],\n ),\n 'update_sns_subnet_list' : IDL.Func(\n [UpdateSnsSubnetListRequest],\n [UpdateSnsSubnetListResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsWasmCanisterInitPayload = IDL.Record({\n 'allowed_principals' : IDL.Vec(IDL.Principal),\n 'access_controls_enabled' : IDL.Bool,\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n return [SnsWasmCanisterInitPayload];\n};\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/sns_wasm.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsWasmCanisterInitPayload = IDL.Record({\n 'allowed_principals' : IDL.Vec(IDL.Principal),\n 'access_controls_enabled' : IDL.Bool,\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n const SnsWasm = IDL.Record({\n 'wasm' : IDL.Vec(IDL.Nat8),\n 'proposal_id' : IDL.Opt(IDL.Nat64),\n 'canister_type' : IDL.Int32,\n });\n const AddWasmRequest = IDL.Record({\n 'hash' : IDL.Vec(IDL.Nat8),\n 'wasm' : IDL.Opt(SnsWasm),\n });\n const SnsWasmError = IDL.Record({ 'message' : IDL.Text });\n const Result = IDL.Variant({\n 'Error' : SnsWasmError,\n 'Hash' : IDL.Vec(IDL.Nat8),\n });\n const AddWasmResponse = IDL.Record({ 'result' : IDL.Opt(Result) });\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\n const Canister = IDL.Record({ 'id' : IDL.Opt(IDL.Principal) });\n const DappCanisters = IDL.Record({ 'canisters' : IDL.Vec(Canister) });\n const LinearScalingCoefficient = IDL.Record({\n 'slope_numerator' : IDL.Opt(IDL.Nat64),\n 'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'slope_denominator' : IDL.Opt(IDL.Nat64),\n 'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const IdealMatchedParticipationFunction = IDL.Record({\n 'serialized_representation' : IDL.Opt(IDL.Text),\n });\n const NeuronsFundParticipationConstraints = IDL.Record({\n 'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),\n 'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'ideal_matched_participation_function' : IDL.Opt(\n IdealMatchedParticipationFunction\n ),\n });\n const Principals = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });\n const CfNeuron = IDL.Record({\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n 'hotkeys' : IDL.Opt(Principals),\n 'nns_neuron_id' : IDL.Nat64,\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const CfParticipant = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'hotkey_principal' : IDL.Text,\n 'cf_neurons' : IDL.Vec(CfNeuron),\n });\n const NeuronsFundParticipants = IDL.Record({\n 'participants' : IDL.Vec(CfParticipant),\n });\n const TreasuryDistribution = IDL.Record({ 'total_e8s' : IDL.Nat64 });\n const NeuronDistribution = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'dissolve_delay_seconds' : IDL.Nat64,\n 'memo' : IDL.Nat64,\n 'stake_e8s' : IDL.Nat64,\n 'vesting_period_seconds' : IDL.Opt(IDL.Nat64),\n });\n const DeveloperDistribution = IDL.Record({\n 'developer_neurons' : IDL.Vec(NeuronDistribution),\n });\n const AirdropDistribution = IDL.Record({\n 'airdrop_neurons' : IDL.Vec(NeuronDistribution),\n });\n const SwapDistribution = IDL.Record({\n 'total_e8s' : IDL.Nat64,\n 'initial_swap_amount_e8s' : IDL.Nat64,\n });\n const FractionalDeveloperVotingPower = IDL.Record({\n 'treasury_distribution' : IDL.Opt(TreasuryDistribution),\n 'developer_distribution' : IDL.Opt(DeveloperDistribution),\n 'airdrop_distribution' : IDL.Opt(AirdropDistribution),\n 'swap_distribution' : IDL.Opt(SwapDistribution),\n });\n const InitialTokenDistribution = IDL.Variant({\n 'FractionalDeveloperVotingPower' : FractionalDeveloperVotingPower,\n });\n const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const SnsInitPayload = IDL.Record({\n 'url' : IDL.Opt(IDL.Text),\n 'max_dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),\n 'max_dissolve_delay_bonus_percentage' : IDL.Opt(IDL.Nat64),\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation' : IDL.Opt(IDL.Bool),\n 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),\n 'token_symbol' : IDL.Opt(IDL.Text),\n 'final_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),\n 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'logo' : IDL.Opt(IDL.Text),\n 'name' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'initial_voting_period_seconds' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),\n 'description' : IDL.Opt(IDL.Text),\n 'max_neuron_age_seconds_for_age_bonus' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat64),\n 'initial_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),\n 'wait_for_quiet_deadline_increase_seconds' : IDL.Opt(IDL.Nat64),\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'dapp_canisters' : IDL.Opt(DappCanisters),\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),\n 'max_age_bonus_percentage' : IDL.Opt(IDL.Nat64),\n 'initial_token_distribution' : IDL.Opt(InitialTokenDistribution),\n 'reward_rate_transition_duration_seconds' : IDL.Opt(IDL.Nat64),\n 'token_logo' : IDL.Opt(IDL.Text),\n 'token_name' : IDL.Opt(IDL.Text),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'proposal_reject_cost_e8s' : IDL.Opt(IDL.Nat64),\n 'restricted_countries' : IDL.Opt(Countries),\n 'min_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const DeployNewSnsRequest = IDL.Record({\n 'sns_init_payload' : IDL.Opt(SnsInitPayload),\n });\n const DappCanistersTransferResult = IDL.Record({\n 'restored_dapp_canisters' : IDL.Vec(Canister),\n 'nns_controlled_dapp_canisters' : IDL.Vec(Canister),\n 'sns_controlled_dapp_canisters' : IDL.Vec(Canister),\n });\n const SnsCanisterIds = 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 });\n const DeployNewSnsResponse = IDL.Record({\n 'dapp_canisters_transfer_result' : IDL.Opt(DappCanistersTransferResult),\n 'subnet_id' : IDL.Opt(IDL.Principal),\n 'error' : IDL.Opt(SnsWasmError),\n 'canisters' : IDL.Opt(SnsCanisterIds),\n });\n const GetAllowedPrincipalsResponse = IDL.Record({\n 'allowed_principals' : IDL.Vec(IDL.Principal),\n });\n const GetDeployedSnsByProposalIdRequest = IDL.Record({\n 'proposal_id' : IDL.Nat64,\n });\n const DeployedSns = IDL.Record({\n 'root_canister_id' : IDL.Opt(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 GetDeployedSnsByProposalIdResult = IDL.Variant({\n 'Error' : SnsWasmError,\n 'DeployedSns' : DeployedSns,\n });\n const GetDeployedSnsByProposalIdResponse = IDL.Record({\n 'get_deployed_sns_by_proposal_id_result' : IDL.Opt(\n GetDeployedSnsByProposalIdResult\n ),\n });\n const SnsVersion = IDL.Record({\n 'archive_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'root_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'swap_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'governance_wasm_hash' : IDL.Vec(IDL.Nat8),\n 'index_wasm_hash' : IDL.Vec(IDL.Nat8),\n });\n const GetNextSnsVersionRequest = IDL.Record({\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'current_version' : IDL.Opt(SnsVersion),\n });\n const GetNextSnsVersionResponse = IDL.Record({\n 'next_version' : IDL.Opt(SnsVersion),\n });\n const GetProposalIdThatAddedWasmRequest = IDL.Record({\n 'hash' : IDL.Vec(IDL.Nat8),\n });\n const GetProposalIdThatAddedWasmResponse = IDL.Record({\n 'proposal_id' : IDL.Opt(IDL.Nat64),\n });\n const GetSnsSubnetIdsResponse = IDL.Record({\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n const GetWasmRequest = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });\n const GetWasmResponse = IDL.Record({ 'wasm' : IDL.Opt(SnsWasm) });\n const GetWasmMetadataRequest = IDL.Record({\n 'hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const MetadataSection = IDL.Record({\n 'contents' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'name' : IDL.Opt(IDL.Text),\n 'visibility' : IDL.Opt(IDL.Text),\n });\n const Ok = IDL.Record({ 'sections' : IDL.Vec(MetadataSection) });\n const Result_1 = IDL.Variant({ 'Ok' : Ok, 'Error' : SnsWasmError });\n const GetWasmMetadataResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });\n const SnsUpgrade = IDL.Record({\n 'next_version' : IDL.Opt(SnsVersion),\n 'current_version' : IDL.Opt(SnsVersion),\n });\n const InsertUpgradePathEntriesRequest = IDL.Record({\n 'upgrade_path' : IDL.Vec(SnsUpgrade),\n 'sns_governance_canister_id' : IDL.Opt(IDL.Principal),\n });\n const InsertUpgradePathEntriesResponse = IDL.Record({\n 'error' : IDL.Opt(SnsWasmError),\n });\n const ListDeployedSnsesResponse = IDL.Record({\n 'instances' : IDL.Vec(DeployedSns),\n });\n const ListUpgradeStepsRequest = IDL.Record({\n 'limit' : IDL.Nat32,\n 'starting_at' : IDL.Opt(SnsVersion),\n 'sns_governance_canister_id' : IDL.Opt(IDL.Principal),\n });\n const PrettySnsVersion = IDL.Record({\n 'archive_wasm_hash' : IDL.Text,\n 'root_wasm_hash' : IDL.Text,\n 'swap_wasm_hash' : IDL.Text,\n 'ledger_wasm_hash' : IDL.Text,\n 'governance_wasm_hash' : IDL.Text,\n 'index_wasm_hash' : IDL.Text,\n });\n const ListUpgradeStep = IDL.Record({\n 'pretty_version' : IDL.Opt(PrettySnsVersion),\n 'version' : IDL.Opt(SnsVersion),\n });\n const ListUpgradeStepsResponse = IDL.Record({\n 'steps' : IDL.Vec(ListUpgradeStep),\n });\n const UpdateAllowedPrincipalsRequest = IDL.Record({\n 'added_principals' : IDL.Vec(IDL.Principal),\n 'removed_principals' : IDL.Vec(IDL.Principal),\n });\n const UpdateAllowedPrincipalsResult = IDL.Variant({\n 'Error' : SnsWasmError,\n 'AllowedPrincipals' : GetAllowedPrincipalsResponse,\n });\n const UpdateAllowedPrincipalsResponse = IDL.Record({\n 'update_allowed_principals_result' : IDL.Opt(UpdateAllowedPrincipalsResult),\n });\n const UpdateSnsSubnetListRequest = IDL.Record({\n 'sns_subnet_ids_to_add' : IDL.Vec(IDL.Principal),\n 'sns_subnet_ids_to_remove' : IDL.Vec(IDL.Principal),\n });\n const UpdateSnsSubnetListResponse = IDL.Record({\n 'error' : IDL.Opt(SnsWasmError),\n });\n return IDL.Service({\n 'add_wasm' : IDL.Func([AddWasmRequest], [AddWasmResponse], []),\n 'deploy_new_sns' : IDL.Func(\n [DeployNewSnsRequest],\n [DeployNewSnsResponse],\n [],\n ),\n 'get_allowed_principals' : IDL.Func(\n [IDL.Record({})],\n [GetAllowedPrincipalsResponse],\n ['query'],\n ),\n 'get_deployed_sns_by_proposal_id' : IDL.Func(\n [GetDeployedSnsByProposalIdRequest],\n [GetDeployedSnsByProposalIdResponse],\n ['query'],\n ),\n 'get_latest_sns_version_pretty' : IDL.Func(\n [IDL.Null],\n [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],\n ['query'],\n ),\n 'get_next_sns_version' : IDL.Func(\n [GetNextSnsVersionRequest],\n [GetNextSnsVersionResponse],\n ['query'],\n ),\n 'get_proposal_id_that_added_wasm' : IDL.Func(\n [GetProposalIdThatAddedWasmRequest],\n [GetProposalIdThatAddedWasmResponse],\n ['query'],\n ),\n 'get_sns_subnet_ids' : IDL.Func(\n [IDL.Record({})],\n [GetSnsSubnetIdsResponse],\n ['query'],\n ),\n 'get_wasm' : IDL.Func([GetWasmRequest], [GetWasmResponse], ['query']),\n 'get_wasm_metadata' : IDL.Func(\n [GetWasmMetadataRequest],\n [GetWasmMetadataResponse],\n ['query'],\n ),\n 'insert_upgrade_path_entries' : IDL.Func(\n [InsertUpgradePathEntriesRequest],\n [InsertUpgradePathEntriesResponse],\n [],\n ),\n 'list_deployed_snses' : IDL.Func(\n [IDL.Record({})],\n [ListDeployedSnsesResponse],\n ['query'],\n ),\n 'list_upgrade_steps' : IDL.Func(\n [ListUpgradeStepsRequest],\n [ListUpgradeStepsResponse],\n ['query'],\n ),\n 'update_allowed_principals' : IDL.Func(\n [UpdateAllowedPrincipalsRequest],\n [UpdateAllowedPrincipalsResponse],\n [],\n ),\n 'update_sns_subnet_list' : IDL.Func(\n [UpdateSnsSubnetListRequest],\n [UpdateSnsSubnetListResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsWasmCanisterInitPayload = IDL.Record({\n 'allowed_principals' : IDL.Vec(IDL.Principal),\n 'access_controls_enabled' : IDL.Bool,\n 'sns_subnet_ids' : IDL.Vec(IDL.Principal),\n });\n return [SnsWasmCanisterInitPayload];\n};\n"],
|
|
5
|
+
"mappings": "yCAAA,OAAS,kBAAAA,OAA4C,iBCC9C,IAAMC,GAAa,CAAC,CAAE,IAAAC,CAAI,IAAM,CACrC,IAAMC,EAA6BD,EAAI,OAAO,CAC5C,mBAAuBA,EAAI,IAAIA,EAAI,SAAS,EAC5C,wBAA4BA,EAAI,KAChC,eAAmBA,EAAI,IAAIA,EAAI,SAAS,CAC1C,CAAC,EACKE,EAAUF,EAAI,OAAO,CACzB,KAASA,EAAI,IAAIA,EAAI,IAAI,EACzB,YAAgBA,EAAI,IAAIA,EAAI,KAAK,EACjC,cAAkBA,EAAI,KACxB,CAAC,EACKG,EAAiBH,EAAI,OAAO,CAChC,KAASA,EAAI,IAAIA,EAAI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EACzB,CAAC,OAAO,CACV,EACF,0BAA8BvD,EAAI,KAC9B,CAACwD,EAA8B,EAC/B,CAACE,EAA+B,EAChC,CAAC,CACH,EACF,uBAA2B1D,EAAI,KAC3B,CAAC2D,EAA0B,EAC3B,CAACC,EAA2B,EAC5B,CAAC,CACH,CACJ,CAAC,CACH,EFtUO,IAAMC,GAAN,MAAMC,CAAgB,CACnB,YACWC,EACAC,EACjB,CAFiB,aAAAD,EACA,sBAAAC,EAgBnB,KAAO,UAAY,MAAO,CACxB,UAAAC,EAAY,EACd,IAE8B,CAC5B,IAAMF,EAAUE,EAAY,KAAK,iBAAmB,KAAK,QAEnD,CAAE,UAAAC,CAAU,EAAI,MAAMH,EAAQ,oBAAoB,CAAC,CAAC,EAC1D,OAAOG,CACT,CAxBG,CAEH,OAAc,OAAOC,EAA2C,CAAC,EAAG,CAClE,GAAM,CAAE,QAAAJ,EAAS,iBAAAC,CAAiB,EAAII,GAA+B,CACnE,QAAS,CACP,GAAGD,EACH,WAAYA,EAAQ,YAAcE,EACpC,EACA,WAAAC,GACA,oBAAAA,EACF,CAAC,EAED,OAAO,IAAIR,EAAgBC,EAASC,CAAgB,CACtD,CAYF",
|
|
6
|
+
"names": ["createServices", "idlFactory", "IDL", "SnsWasmCanisterInitPayload", "SnsWasm", "AddWasmRequest", "SnsWasmError", "Result", "AddWasmResponse", "NeuronBasketConstructionParameters", "Canister", "DappCanisters", "LinearScalingCoefficient", "IdealMatchedParticipationFunction", "NeuronsFundParticipationConstraints", "Principals", "CfNeuron", "CfParticipant", "NeuronsFundParticipants", "TreasuryDistribution", "NeuronDistribution", "DeveloperDistribution", "AirdropDistribution", "SwapDistribution", "FractionalDeveloperVotingPower", "InitialTokenDistribution", "Countries", "SnsInitPayload", "DeployNewSnsRequest", "DappCanistersTransferResult", "SnsCanisterIds", "DeployNewSnsResponse", "GetAllowedPrincipalsResponse", "GetDeployedSnsByProposalIdRequest", "DeployedSns", "GetDeployedSnsByProposalIdResult", "GetDeployedSnsByProposalIdResponse", "SnsVersion", "GetNextSnsVersionRequest", "GetNextSnsVersionResponse", "GetProposalIdThatAddedWasmRequest", "GetProposalIdThatAddedWasmResponse", "GetSnsSubnetIdsResponse", "GetWasmRequest", "GetWasmResponse", "GetWasmMetadataRequest", "MetadataSection", "Ok", "Result_1", "GetWasmMetadataResponse", "SnsUpgrade", "InsertUpgradePathEntriesRequest", "InsertUpgradePathEntriesResponse", "ListDeployedSnsesResponse", "ListUpgradeStepsRequest", "PrettySnsVersion", "ListUpgradeStep", "ListUpgradeStepsResponse", "UpdateAllowedPrincipalsRequest", "UpdateAllowedPrincipalsResult", "UpdateAllowedPrincipalsResponse", "UpdateSnsSubnetListRequest", "UpdateSnsSubnetListResponse", "idlFactory", "IDL", "SnsWasmCanisterInitPayload", "SnsWasm", "AddWasmRequest", "SnsWasmError", "Result", "AddWasmResponse", "NeuronBasketConstructionParameters", "Canister", "DappCanisters", "LinearScalingCoefficient", "IdealMatchedParticipationFunction", "NeuronsFundParticipationConstraints", "Principals", "CfNeuron", "CfParticipant", "NeuronsFundParticipants", "TreasuryDistribution", "NeuronDistribution", "DeveloperDistribution", "AirdropDistribution", "SwapDistribution", "FractionalDeveloperVotingPower", "InitialTokenDistribution", "Countries", "SnsInitPayload", "DeployNewSnsRequest", "DappCanistersTransferResult", "SnsCanisterIds", "DeployNewSnsResponse", "GetAllowedPrincipalsResponse", "GetDeployedSnsByProposalIdRequest", "DeployedSns", "GetDeployedSnsByProposalIdResult", "GetDeployedSnsByProposalIdResponse", "SnsVersion", "GetNextSnsVersionRequest", "GetNextSnsVersionResponse", "GetProposalIdThatAddedWasmRequest", "GetProposalIdThatAddedWasmResponse", "GetSnsSubnetIdsResponse", "GetWasmRequest", "GetWasmResponse", "GetWasmMetadataRequest", "MetadataSection", "Ok", "Result_1", "GetWasmMetadataResponse", "SnsUpgrade", "InsertUpgradePathEntriesRequest", "InsertUpgradePathEntriesResponse", "ListDeployedSnsesResponse", "ListUpgradeStepsRequest", "PrettySnsVersion", "ListUpgradeStep", "ListUpgradeStepsResponse", "UpdateAllowedPrincipalsRequest", "UpdateAllowedPrincipalsResult", "UpdateAllowedPrincipalsResponse", "UpdateSnsSubnetListRequest", "UpdateSnsSubnetListResponse", "SnsWasmCanister", "_SnsWasmCanister", "service", "certifiedService", "certified", "instances", "options", "createServices", "MAINNET_SNS_WASM_CANISTER_ID", "idlFactory"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{a as He,b as Yr,c as So}from"./chunk-KCY3PAEP.js";var Mo=He(Ie=>{"use strict";Ie.byteLength=ei;Ie.toByteArray=ni;Ie.fromByteArray=ii;var B=[],P=[],Lr=typeof Uint8Array<"u"?Uint8Array:Array,to="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(pe=0,Ao=to.length;pe<Ao;++pe)B[pe]=to[pe],P[to.charCodeAt(pe)]=pe;var pe,Ao;P[45]=62;P[95]=63;function Vo(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var o=n===t?0:4-n%4;return[n,o]}function ei(e){var t=Vo(e),n=t[0],o=t[1];return(n+o)*3/4-o}function ti(e,t,n){return(t+n)*3/4-n}function ni(e){var t,n=Vo(e),o=n[0],r=n[1],i=new Lr(ti(e,o,r)),s=0,c=r>0?o-4:o,u;for(u=0;u<c;u+=4)t=P[e.charCodeAt(u)]<<18|P[e.charCodeAt(u+1)]<<12|P[e.charCodeAt(u+2)]<<6|P[e.charCodeAt(u+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return r===2&&(t=P[e.charCodeAt(u)]<<2|P[e.charCodeAt(u+1)]>>4,i[s++]=t&255),r===1&&(t=P[e.charCodeAt(u)]<<10|P[e.charCodeAt(u+1)]<<4|P[e.charCodeAt(u+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function oi(e){return B[e>>18&63]+B[e>>12&63]+B[e>>6&63]+B[e&63]}function ri(e,t,n){for(var o,r=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),r.push(oi(o));return r.join("")}function ii(e){for(var t,n=e.length,o=n%3,r=[],i=16383,s=0,c=n-o;s<c;s+=i)r.push(ri(e,s,s+i>c?c:s+i));return o===1?(t=e[n-1],r.push(B[t>>2]+B[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],r.push(B[t>>10]+B[t>>4&63]+B[t<<2&63]+"=")),r.join("")}});var Bo=He(no=>{no.read=function(e,t,n,o,r){var i,s,c=r*8-o-1,u=(1<<c)-1,l=u>>1,_=-7,p=n?r-1:0,N=n?-1:1,y=e[t+p];for(p+=N,i=y&(1<<-_)-1,y>>=-_,_+=c;_>0;i=i*256+e[t+p],p+=N,_-=8);for(s=i&(1<<-_)-1,i>>=-_,_+=o;_>0;s=s*256+e[t+p],p+=N,_-=8);if(i===0)i=1-l;else{if(i===u)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,o),i=i-l}return(y?-1:1)*s*Math.pow(2,i-o)};no.write=function(e,t,n,o,r,i){var s,c,u,l=i*8-r-1,_=(1<<l)-1,p=_>>1,N=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:i-1,M=o?1:-1,H=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,s=_):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+p>=1?t+=N/u:t+=N*Math.pow(2,1-p),t*u>=2&&(s++,u/=2),s+p>=_?(c=0,s=_):s+p>=1?(c=(t*u-1)*Math.pow(2,r),s=s+p):(c=t*Math.pow(2,p-1)*Math.pow(2,r),s=0));r>=8;e[n+y]=c&255,y+=M,c/=256,r-=8);for(s=s<<r|c,l+=r;l>0;e[n+y]=s&255,y+=M,s/=256,l-=8);e[n+y-M]|=H*128}});var Do=He(Ne=>{"use strict";var oo=Mo(),me=Bo(),Eo=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ne.Buffer=a;Ne.SlowBuffer=pi;Ne.INSPECT_MAX_BYTES=50;var De=2147483647;Ne.kMaxLength=De;a.TYPED_ARRAY_SUPPORT=si();!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function si(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function J(e){if(e>De)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ao(e)}return Go(e,t,n)}a.poolSize=8192;function Go(e,t,n){if(typeof e=="string")return ci(e,t);if(ArrayBuffer.isView(e))return ui(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(E(e,ArrayBuffer)||e&&E(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(E(e,SharedArrayBuffer)||e&&E(e.buffer,SharedArrayBuffer)))return io(e,t,n);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return a.from(o,t,n);let r=di(e);if(r)return r;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}a.from=function(e,t,n){return Go(e,t,n)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function Ho(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ai(e,t,n){return Ho(e),e<=0?J(e):t!==void 0?typeof n=="string"?J(e).fill(t,n):J(e).fill(t):J(e)}a.alloc=function(e,t,n){return ai(e,t,n)};function ao(e){return Ho(e),J(e<0?0:co(e)|0)}a.allocUnsafe=function(e){return ao(e)};a.allocUnsafeSlow=function(e){return ao(e)};function ci(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let n=jo(e,t)|0,o=J(n),r=o.write(e,t);return r!==n&&(o=o.slice(0,r)),o}function ro(e){let t=e.length<0?0:co(e.length)|0,n=J(t);for(let o=0;o<t;o+=1)n[o]=e[o]&255;return n}function ui(e){if(E(e,Uint8Array)){let t=new Uint8Array(e);return io(t.buffer,t.byteOffset,t.byteLength)}return ro(e)}function io(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let o;return t===void 0&&n===void 0?o=new Uint8Array(e):n===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,n),Object.setPrototypeOf(o,a.prototype),o}function di(e){if(a.isBuffer(e)){let t=co(e.length)|0,n=J(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!="number"||po(e.length)?J(0):ro(e);if(e.type==="Buffer"&&Array.isArray(e.data))return ro(e.data)}function co(e){if(e>=De)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+De.toString(16)+" bytes");return e|0}function pi(e){return+e!=e&&(e=0),a.alloc(+e)}a.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==a.prototype};a.compare=function(t,n){if(E(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),E(n,Uint8Array)&&(n=a.from(n,n.offset,n.byteLength)),!a.isBuffer(t)||!a.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===n)return 0;let o=t.length,r=n.length;for(let i=0,s=Math.min(o,r);i<s;++i)if(t[i]!==n[i]){o=t[i],r=n[i];break}return o<r?-1:r<o?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,n){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);let o;if(n===void 0)for(n=0,o=0;o<t.length;++o)n+=t[o].length;let r=a.allocUnsafe(n),i=0;for(o=0;o<t.length;++o){let s=t[o];if(E(s,Uint8Array))i+s.length>r.length?(a.isBuffer(s)||(s=a.from(s)),s.copy(r,i)):Uint8Array.prototype.set.call(r,s,i);else if(a.isBuffer(s))s.copy(r,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length}return r};function jo(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||E(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let n=e.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&n===0)return 0;let r=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return so(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return Io(e).length;default:if(r)return o?-1:so(e).length;t=(""+t).toLowerCase(),r=!0}}a.byteLength=jo;function _i(e,t,n){let o=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return hi(this,t,n);case"utf8":case"utf-8":return $o(this,t,n);case"ascii":return Oi(this,t,n);case"latin1":case"binary":return Ri(this,t,n);case"base64":return yi(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vi(this,t,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}a.prototype._isBuffer=!0;function _e(e,t,n){let o=e[t];e[t]=e[n],e[n]=o}a.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<t;n+=2)_e(this,n,n+1);return this};a.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<t;n+=4)_e(this,n,n+3),_e(this,n+1,n+2);return this};a.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<t;n+=8)_e(this,n,n+7),_e(this,n+1,n+6),_e(this,n+2,n+5),_e(this,n+3,n+4);return this};a.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?$o(this,0,t):_i.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.inspect=function(){let t="",n=Ne.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"};Eo&&(a.prototype[Eo]=a.prototype.inspect);a.prototype.compare=function(t,n,o,r,i){if(E(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(n===void 0&&(n=0),o===void 0&&(o=t?t.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),n<0||o>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&n>=o)return 0;if(r>=i)return-1;if(n>=o)return 1;if(n>>>=0,o>>>=0,r>>>=0,i>>>=0,this===t)return 0;let s=i-r,c=o-n,u=Math.min(s,c),l=this.slice(r,i),_=t.slice(n,o);for(let p=0;p<u;++p)if(l[p]!==_[p]){s=l[p],c=_[p];break}return s<c?-1:c<s?1:0};function Wo(e,t,n,o,r){if(e.length===0)return-1;if(typeof n=="string"?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,po(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0)if(r)n=0;else return-1;if(typeof t=="string"&&(t=a.from(t,o)),a.isBuffer(t))return t.length===0?-1:qo(e,t,n,o,r);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):qo(e,[t],n,o,r);throw new TypeError("val must be string, number or Buffer")}function qo(e,t,n,o,r){let i=1,s=e.length,c=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,s/=2,c/=2,n/=2}function u(_,p){return i===1?_[p]:_.readUInt16BE(p*i)}let l;if(r){let _=-1;for(l=n;l<s;l++)if(u(e,l)===u(t,_===-1?0:l-_)){if(_===-1&&(_=l),l-_+1===c)return _*i}else _!==-1&&(l-=l-_),_=-1}else for(n+c>s&&(n=s-c),l=n;l>=0;l--){let _=!0;for(let p=0;p<c;p++)if(u(e,l+p)!==u(t,p)){_=!1;break}if(_)return l}return-1}a.prototype.includes=function(t,n,o){return this.indexOf(t,n,o)!==-1};a.prototype.indexOf=function(t,n,o){return Wo(this,t,n,o,!0)};a.prototype.lastIndexOf=function(t,n,o){return Wo(this,t,n,o,!1)};function li(e,t,n,o){n=Number(n)||0;let r=e.length-n;o?(o=Number(o),o>r&&(o=r)):o=r;let i=t.length;o>i/2&&(o=i/2);let s;for(s=0;s<o;++s){let c=parseInt(t.substr(s*2,2),16);if(po(c))return s;e[n+s]=c}return s}function mi(e,t,n,o){return Le(so(t,e.length-n),e,n,o)}function fi(e,t,n,o){return Le(ki(t),e,n,o)}function Ni(e,t,n,o){return Le(Io(t),e,n,o)}function gi(e,t,n,o){return Le(Ti(t,e.length-n),e,n,o)}a.prototype.write=function(t,n,o,r){if(n===void 0)r="utf8",o=this.length,n=0;else if(o===void 0&&typeof n=="string")r=n,o=this.length,n=0;else if(isFinite(n))n=n>>>0,isFinite(o)?(o=o>>>0,r===void 0&&(r="utf8")):(r=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-n;if((o===void 0||o>i)&&(o=i),t.length>0&&(o<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return li(this,t,n,o);case"utf8":case"utf-8":return mi(this,t,n,o);case"ascii":case"latin1":case"binary":return fi(this,t,n,o);case"base64":return Ni(this,t,n,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gi(this,t,n,o);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function yi(e,t,n){return t===0&&n===e.length?oo.fromByteArray(e):oo.fromByteArray(e.slice(t,n))}function $o(e,t,n){n=Math.min(e.length,n);let o=[],r=t;for(;r<n;){let i=e[r],s=null,c=i>239?4:i>223?3:i>191?2:1;if(r+c<=n){let u,l,_,p;switch(c){case 1:i<128&&(s=i);break;case 2:u=e[r+1],(u&192)===128&&(p=(i&31)<<6|u&63,p>127&&(s=p));break;case 3:u=e[r+1],l=e[r+2],(u&192)===128&&(l&192)===128&&(p=(i&15)<<12|(u&63)<<6|l&63,p>2047&&(p<55296||p>57343)&&(s=p));break;case 4:u=e[r+1],l=e[r+2],_=e[r+3],(u&192)===128&&(l&192)===128&&(_&192)===128&&(p=(i&15)<<18|(u&63)<<12|(l&63)<<6|_&63,p>65535&&p<1114112&&(s=p))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|s&1023),o.push(s),r+=c}return wi(o)}var Uo=4096;function wi(e){let t=e.length;if(t<=Uo)return String.fromCharCode.apply(String,e);let n="",o=0;for(;o<t;)n+=String.fromCharCode.apply(String,e.slice(o,o+=Uo));return n}function Oi(e,t,n){let o="";n=Math.min(e.length,n);for(let r=t;r<n;++r)o+=String.fromCharCode(e[r]&127);return o}function Ri(e,t,n){let o="";n=Math.min(e.length,n);for(let r=t;r<n;++r)o+=String.fromCharCode(e[r]);return o}function hi(e,t,n){let o=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>o)&&(n=o);let r="";for(let i=t;i<n;++i)r+=Pi[e[i]];return r}function vi(e,t,n){let o=e.slice(t,n),r="";for(let i=0;i<o.length-1;i+=2)r+=String.fromCharCode(o[i]+o[i+1]*256);return r}a.prototype.slice=function(t,n){let o=this.length;t=~~t,n=n===void 0?o:~~n,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),n<0?(n+=o,n<0&&(n=0)):n>o&&(n=o),n<t&&(n=t);let r=this.subarray(t,n);return Object.setPrototypeOf(r,a.prototype),r};function O(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(t,n,o){t=t>>>0,n=n>>>0,o||O(t,n,this.length);let r=this[t],i=1,s=0;for(;++s<n&&(i*=256);)r+=this[t+s]*i;return r};a.prototype.readUintBE=a.prototype.readUIntBE=function(t,n,o){t=t>>>0,n=n>>>0,o||O(t,n,this.length);let r=this[t+--n],i=1;for(;n>0&&(i*=256);)r+=this[t+--n]*i;return r};a.prototype.readUint8=a.prototype.readUInt8=function(t,n){return t=t>>>0,n||O(t,1,this.length),this[t]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,n){return t=t>>>0,n||O(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,n){return t=t>>>0,n||O(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,n){return t=t>>>0,n||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,n){return t=t>>>0,n||O(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readBigUInt64LE=D(function(t){t=t>>>0,fe(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&je(t,this.length-8);let r=n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+o*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))});a.prototype.readBigUInt64BE=D(function(t){t=t>>>0,fe(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&je(t,this.length-8);let r=n*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o;return(BigInt(r)<<BigInt(32))+BigInt(i)});a.prototype.readIntLE=function(t,n,o){t=t>>>0,n=n>>>0,o||O(t,n,this.length);let r=this[t],i=1,s=0;for(;++s<n&&(i*=256);)r+=this[t+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*n)),r};a.prototype.readIntBE=function(t,n,o){t=t>>>0,n=n>>>0,o||O(t,n,this.length);let r=n,i=1,s=this[t+--r];for(;r>0&&(i*=256);)s+=this[t+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*n)),s};a.prototype.readInt8=function(t,n){return t=t>>>0,n||O(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,n){t=t>>>0,n||O(t,2,this.length);let o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};a.prototype.readInt16BE=function(t,n){t=t>>>0,n||O(t,2,this.length);let o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};a.prototype.readInt32LE=function(t,n){return t=t>>>0,n||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,n){return t=t>>>0,n||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readBigInt64LE=D(function(t){t=t>>>0,fe(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&je(t,this.length-8);let r=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(o<<24);return(BigInt(r)<<BigInt(32))+BigInt(n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});a.prototype.readBigInt64BE=D(function(t){t=t>>>0,fe(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&je(t,this.length-8);let r=(n<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o)});a.prototype.readFloatLE=function(t,n){return t=t>>>0,n||O(t,4,this.length),me.read(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,n){return t=t>>>0,n||O(t,4,this.length),me.read(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,n){return t=t>>>0,n||O(t,8,this.length),me.read(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,n){return t=t>>>0,n||O(t,8,this.length),me.read(this,t,!1,52,8)};function x(e,t,n,o,r,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<i)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,n,o,r){if(t=+t,n=n>>>0,o=o>>>0,!r){let c=Math.pow(2,8*o)-1;x(this,t,n,o,c,0)}let i=1,s=0;for(this[n]=t&255;++s<o&&(i*=256);)this[n+s]=t/i&255;return n+o};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,n,o,r){if(t=+t,n=n>>>0,o=o>>>0,!r){let c=Math.pow(2,8*o)-1;x(this,t,n,o,c,0)}let i=o-1,s=1;for(this[n+i]=t&255;--i>=0&&(s*=256);)this[n+i]=t/s&255;return n+o};a.prototype.writeUint8=a.prototype.writeUInt8=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,1,255,0),this[n]=t&255,n+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,2,65535,0),this[n]=t&255,this[n+1]=t>>>8,n+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,2,65535,0),this[n]=t>>>8,this[n+1]=t&255,n+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,4,4294967295,0),this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255,n+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,4,4294967295,0),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4};function Xo(e,t,n,o,r){Zo(t,o,r,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i=i>>8,e[n++]=i,i=i>>8,e[n++]=i,i=i>>8,e[n++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s=s>>8,e[n++]=s,s=s>>8,e[n++]=s,s=s>>8,e[n++]=s,n}function zo(e,t,n,o,r){Zo(t,o,r,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i=i>>8,e[n+6]=i,i=i>>8,e[n+5]=i,i=i>>8,e[n+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s=s>>8,e[n+2]=s,s=s>>8,e[n+1]=s,s=s>>8,e[n]=s,n+8}a.prototype.writeBigUInt64LE=D(function(t,n=0){return Xo(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))});a.prototype.writeBigUInt64BE=D(function(t,n=0){return zo(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))});a.prototype.writeIntLE=function(t,n,o,r){if(t=+t,n=n>>>0,!r){let u=Math.pow(2,8*o-1);x(this,t,n,o,u-1,-u)}let i=0,s=1,c=0;for(this[n]=t&255;++i<o&&(s*=256);)t<0&&c===0&&this[n+i-1]!==0&&(c=1),this[n+i]=(t/s>>0)-c&255;return n+o};a.prototype.writeIntBE=function(t,n,o,r){if(t=+t,n=n>>>0,!r){let u=Math.pow(2,8*o-1);x(this,t,n,o,u-1,-u)}let i=o-1,s=1,c=0;for(this[n+i]=t&255;--i>=0&&(s*=256);)t<0&&c===0&&this[n+i+1]!==0&&(c=1),this[n+i]=(t/s>>0)-c&255;return n+o};a.prototype.writeInt8=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,1,127,-128),t<0&&(t=255+t+1),this[n]=t&255,n+1};a.prototype.writeInt16LE=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,2,32767,-32768),this[n]=t&255,this[n+1]=t>>>8,n+2};a.prototype.writeInt16BE=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,2,32767,-32768),this[n]=t>>>8,this[n+1]=t&255,n+2};a.prototype.writeInt32LE=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,4,2147483647,-2147483648),this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24,n+4};a.prototype.writeInt32BE=function(t,n,o){return t=+t,n=n>>>0,o||x(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4};a.prototype.writeBigInt64LE=D(function(t,n=0){return Xo(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});a.prototype.writeBigInt64BE=D(function(t,n=0){return zo(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Jo(e,t,n,o,r,i){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Yo(e,t,n,o,r){return t=+t,n=n>>>0,r||Jo(e,t,n,4,34028234663852886e22,-34028234663852886e22),me.write(e,t,n,o,23,4),n+4}a.prototype.writeFloatLE=function(t,n,o){return Yo(this,t,n,!0,o)};a.prototype.writeFloatBE=function(t,n,o){return Yo(this,t,n,!1,o)};function Qo(e,t,n,o,r){return t=+t,n=n>>>0,r||Jo(e,t,n,8,17976931348623157e292,-17976931348623157e292),me.write(e,t,n,o,52,8),n+8}a.prototype.writeDoubleLE=function(t,n,o){return Qo(this,t,n,!0,o)};a.prototype.writeDoubleBE=function(t,n,o){return Qo(this,t,n,!1,o)};a.prototype.copy=function(t,n,o,r){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!r&&r!==0&&(r=this.length),n>=t.length&&(n=t.length),n||(n=0),r>0&&r<o&&(r=o),r===o||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-n<r-o&&(r=t.length-n+o);let i=r-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(n,o,r):Uint8Array.prototype.set.call(t,this.subarray(o,r),n),i};a.prototype.fill=function(t,n,o,r){if(typeof t=="string"){if(typeof n=="string"?(r=n,n=0,o=this.length):typeof o=="string"&&(r=o,o=this.length),r!==void 0&&typeof r!="string")throw new TypeError("encoding must be a string");if(typeof r=="string"&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(t.length===1){let s=t.charCodeAt(0);(r==="utf8"&&s<128||r==="latin1")&&(t=s)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(n<0||this.length<n||this.length<o)throw new RangeError("Out of range index");if(o<=n)return this;n=n>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);let i;if(typeof t=="number")for(i=n;i<o;++i)this[i]=t;else{let s=a.isBuffer(t)?t:a.from(t,r),c=s.length;if(c===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<o-n;++i)this[i+n]=s[i%c]}return this};var le={};function uo(e,t,n){le[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(r){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:r,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}uo("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);uo("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);uo("ERR_OUT_OF_RANGE",function(e,t,n){let o=`The value of "${e}" is out of range.`,r=n;return Number.isInteger(n)&&Math.abs(n)>2**32?r=Ko(String(n)):typeof n=="bigint"&&(r=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(r=Ko(r)),r+="n"),o+=` It must be ${t}. Received ${r}`,o},RangeError);function Ko(e){let t="",n=e.length,o=e[0]==="-"?1:0;for(;n>=o+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function bi(e,t,n){fe(t,"offset"),(e[t]===void 0||e[t+n]===void 0)&&je(t,e.length-(n+1))}function Zo(e,t,n,o,r,i){if(e>n||e<t){let s=typeof t=="bigint"?"n":"",c;throw i>3?t===0||t===BigInt(0)?c=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:c=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`:c=`>= ${t}${s} and <= ${n}${s}`,new le.ERR_OUT_OF_RANGE("value",c,e)}bi(o,r,i)}function fe(e,t){if(typeof e!="number")throw new le.ERR_INVALID_ARG_TYPE(t,"number",e)}function je(e,t,n){throw Math.floor(e)!==e?(fe(e,n),new le.ERR_OUT_OF_RANGE(n||"offset","an integer",e)):t<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}var xi=/[^+/0-9A-Za-z-_]/g;function Si(e){if(e=e.split("=")[0],e=e.trim().replace(xi,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function so(e,t){t=t||1/0;let n,o=e.length,r=null,i=[];for(let s=0;s<o;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&i.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return i}function ki(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function Ti(e,t){let n,o,r,i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),o=n>>8,r=n%256,i.push(r),i.push(o);return i}function Io(e){return oo.toByteArray(Si(e))}function Le(e,t,n,o){let r;for(r=0;r<o&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function E(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function po(e){return e!==e}var Pi=function(){let e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){let o=n*16;for(let r=0;r<16;++r)t[o+r]=e[n]+e[r]}return t}();function D(e){return typeof BigInt>"u"?Ci:e}function Ci(){throw new Error("BigInt not supported")}});var tr=He((_o,er)=>{var et=Do(),Y=et.Buffer;function Lo(e,t){for(var n in e)t[n]=e[n]}Y.from&&Y.alloc&&Y.allocUnsafe&&Y.allocUnsafeSlow?er.exports=et:(Lo(et,_o),_o.Buffer=ge);function ge(e,t,n){return Y(e,t,n)}Lo(Y,ge);ge.from=function(e,t,n){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Y(e,t,n)};ge.alloc=function(e,t,n){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=Y(e);return t!==void 0?typeof n=="string"?o.fill(t,n):o.fill(t):o.fill(0),o};ge.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Y(e)};ge.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return et.SlowBuffer(e)}});var nr=He((ta,mo)=>{"use strict";var lo=65536,Fi=4294967295;function Ai(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var Vi=tr().Buffer,tt=window.crypto||window.msCrypto;tt&&tt.getRandomValues?mo.exports=Mi:mo.exports=Ai;function Mi(e,t){if(e>Fi)throw new RangeError("requested too many random bytes");var n=Vi.allocUnsafe(e);if(e>0)if(e>lo)for(var o=0;o<e;o+=lo)tt.getRandomValues(n.slice(o,o+lo));else tt.getRandomValues(n);return typeof t=="function"?process.nextTick(function(){t(null,n)}):n}});import{Actor as Bs}from"@dfinity/agent";import{AccountIdentifier as vo,SubAccount as Es,checkAccountId as $r}from"@dfinity/ledger-icp";import{arrayOfNumberToUint8Array as qs,asciiStringToByteArray as Us,assertPercentageNumber as bo,createServices as Ks,fromNullable as k,isNullish as ct,nonNullish as G,uint8ArrayToBigInt as Xr}from"@dfinity/utils";function Qr(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function In(e,...t){if(!Qr(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Dn(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function ko(e,t){In(e);let n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}var Qe=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),V=(e,t)=>e<<32-t|e>>>t;var js=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Zr(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Ln(e){return typeof e=="string"&&(e=Zr(e)),In(e),e}var Ye=class{clone(){return this._cloneInto()}},Ws={}.toString;function To(e){let t=o=>e().update(Ln(o)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Ir(e,t,n,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,o);let r=BigInt(32),i=BigInt(4294967295),s=Number(n>>r&i),c=Number(n&i),u=o?4:0,l=o?0:4;e.setUint32(t+u,s,o),e.setUint32(t+l,c,o)}var Po=(e,t,n)=>e&t^~e&n,Co=(e,t,n)=>e&t^e&n^t&n,Ze=class extends Ye{constructor(t,n,o,r){super(),this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Qe(this.buffer)}update(t){Dn(this);let{view:n,buffer:o,blockLen:r}=this;t=Ln(t);let i=t.length;for(let s=0;s<i;){let c=Math.min(r-this.pos,i-s);if(c===r){let u=Qe(t);for(;r<=i-s;s+=r)this.process(u,s);continue}o.set(t.subarray(s,s+c),this.pos),this.pos+=c,s+=c,this.pos===r&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Dn(this),ko(t,this),this.finished=!0;let{buffer:n,view:o,blockLen:r,isLE:i}=this,{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>r-s&&(this.process(o,0),s=0);for(let p=s;p<r;p++)n[p]=0;Ir(o,r-8,BigInt(this.length*8),i),this.process(o,0);let c=Qe(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let l=u/4,_=this.get();if(l>_.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<l;p++)c.setUint32(4*p,_[p],i)}digest(){let{buffer:t,outputLen:n}=this;this.digestInto(t);let o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:n,buffer:o,length:r,finished:i,destroyed:s,pos:c}=this;return t.length=r,t.pos=c,t.finished=i,t.destroyed=s,r%n&&t.buffer.set(o),t}};var Dr=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Z=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),I=new Uint32Array(64),eo=class extends Ze{constructor(){super(64,32,8,!1),this.A=Z[0]|0,this.B=Z[1]|0,this.C=Z[2]|0,this.D=Z[3]|0,this.E=Z[4]|0,this.F=Z[5]|0,this.G=Z[6]|0,this.H=Z[7]|0}get(){let{A:t,B:n,C:o,D:r,E:i,F:s,G:c,H:u}=this;return[t,n,o,r,i,s,c,u]}set(t,n,o,r,i,s,c,u){this.A=t|0,this.B=n|0,this.C=o|0,this.D=r|0,this.E=i|0,this.F=s|0,this.G=c|0,this.H=u|0}process(t,n){for(let p=0;p<16;p++,n+=4)I[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){let N=I[p-15],y=I[p-2],M=V(N,7)^V(N,18)^N>>>3,H=V(y,17)^V(y,19)^y>>>10;I[p]=H+I[p-7]+M+I[p-16]|0}let{A:o,B:r,C:i,D:s,E:c,F:u,G:l,H:_}=this;for(let p=0;p<64;p++){let N=V(c,6)^V(c,11)^V(c,25),y=_+N+Po(c,u,l)+Dr[p]+I[p]|0,H=(V(o,2)^V(o,13)^V(o,22))+Co(o,r,i)|0;_=l,l=u,u=c,c=s+y|0,s=i,i=r,r=o,o=y+H|0}o=o+this.A|0,r=r+this.B|0,i=i+this.C|0,s=s+this.D|0,c=c+this.E|0,u=u+this.F|0,l=l+this.G|0,_=_+this.H|0,this.set(o,r,i,s,c,u,l,_)}roundClean(){I.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var Fo=To(()=>new eo);var xo=Yr(nr());var or=({IDL:e})=>{let t=e.Rec(),n=e.Record({id:e.Nat64}),o=e.Record({followees:e.Vec(n)}),r=e.Record({name:e.Text,description:e.Opt(e.Text)}),i=e.Record({id:e.Opt(n),known_neuron_data:e.Opt(r)}),s=e.Record({percentage_to_spawn:e.Opt(e.Nat32),new_controller:e.Opt(e.Principal),nonce:e.Opt(e.Nat64)}),c=e.Record({amount_e8s:e.Nat64}),u=e.Record({topic:e.Int32,followees:e.Vec(n)}),l=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),_=e.Variant({NeuronIdOrSubaccount:e.Record({}),MemoAndController:l,Memo:e.Nat64}),p=e.Record({by:e.Opt(_)}),N=e.Record({hot_key_to_remove:e.Opt(e.Principal)}),y=e.Record({new_hot_key:e.Opt(e.Principal)}),M=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),H=e.Record({additional_dissolve_delay_seconds:e.Nat32}),ut=e.Record({visibility:e.Opt(e.Int32)}),dt=e.Record({dissolve_timestamp_seconds:e.Nat64}),pt=e.Variant({RemoveHotKey:N,AddHotKey:y,ChangeAutoStakeMaturity:M,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:H,SetVisibility:ut,JoinCommunityFund:e.Record({}),LeaveCommunityFund:e.Record({}),SetDissolveTimestamp:dt}),we=e.Record({operation:e.Opt(pt)}),_t=e.Record({vote:e.Int32,proposal:e.Opt(n)}),Oe=e.Record({source_neuron_id:e.Opt(n)}),Re=e.Record({dissolve_delay_seconds:e.Nat64,kyc_verified:e.Bool,amount_e8s:e.Nat64,new_controller:e.Opt(e.Principal),nonce:e.Nat64}),lt=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),he=e.Record({percentage_to_merge:e.Nat32}),j=e.Record({hash:e.Vec(e.Nat8)}),mt=e.Record({e8s:e.Nat64}),ve=e.Record({to_account:e.Opt(j),amount:e.Opt(mt)}),ft=e.Variant({Spawn:s,Split:c,Follow:u,ClaimOrRefresh:p,Configure:we,RegisterVote:_t,Merge:Oe,DisburseToNeuron:Re,MakeProposal:t,StakeMaturity:lt,MergeMaturity:he,Disburse:ve}),oe=e.Variant({Subaccount:e.Vec(e.Nat8),NeuronId:n}),re=e.Record({id:e.Opt(n),command:e.Opt(ft),neuron_id_or_subaccount:e.Opt(oe)}),Nt=e.Record({controllers:e.Vec(e.Principal)}),gt=e.Record({freezing_threshold:e.Opt(e.Nat64),controllers:e.Opt(Nt),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)}),yt=e.Record({canister_id:e.Opt(e.Principal),settings:e.Opt(gt)}),wt=e.Record({arg:e.Opt(e.Vec(e.Nat8)),wasm_module:e.Opt(e.Vec(e.Nat8)),skip_stopping_before_installing:e.Opt(e.Bool),canister_id:e.Opt(e.Principal),install_mode:e.Opt(e.Int32)}),Ot=e.Record({action:e.Opt(e.Int32),canister_id:e.Opt(e.Principal)}),T=e.Record({basis_points:e.Opt(e.Nat64)}),w=e.Record({seconds:e.Opt(e.Nat64)}),m=e.Record({e8s:e.Opt(e.Nat64)}),Rt=e.Record({reward_rate_transition_duration:e.Opt(w),initial_reward_rate:e.Opt(T),final_reward_rate:e.Opt(T)}),ht=e.Record({neuron_maximum_dissolve_delay_bonus:e.Opt(T),neuron_maximum_age_for_age_bonus:e.Opt(w),neuron_maximum_dissolve_delay:e.Opt(w),neuron_minimum_dissolve_delay_to_vote:e.Opt(w),neuron_maximum_age_bonus:e.Opt(T),neuron_minimum_stake:e.Opt(m),proposal_wait_for_quiet_deadline_increase:e.Opt(w),proposal_initial_voting_period:e.Opt(w),proposal_rejection_fee:e.Opt(m),voting_reward_parameters:e.Opt(Rt)}),be=e.Record({base64_encoding:e.Opt(e.Text)}),vt=e.Record({transaction_fee:e.Opt(m),token_symbol:e.Opt(e.Text),token_logo:e.Opt(be),token_name:e.Opt(e.Text)}),bt=e.Record({id:e.Opt(e.Principal)}),xt=e.Record({dissolve_delay_interval:e.Opt(w),count:e.Opt(e.Nat64)}),St=e.Record({seconds_after_utc_midnight:e.Opt(e.Nat64)}),kt=e.Record({iso_codes:e.Vec(e.Text)}),Tt=e.Record({minimum_participants:e.Opt(e.Nat64),neurons_fund_participation:e.Opt(e.Bool),duration:e.Opt(w),neuron_basket_construction_parameters:e.Opt(xt),confirmation_text:e.Opt(e.Text),maximum_participant_icp:e.Opt(m),minimum_icp:e.Opt(m),minimum_direct_participation_icp:e.Opt(m),minimum_participant_icp:e.Opt(m),start_time:e.Opt(St),maximum_direct_participation_icp:e.Opt(m),maximum_icp:e.Opt(m),neurons_fund_investment_icp:e.Opt(m),restricted_countries:e.Opt(kt)}),xe=e.Record({total:e.Opt(m)}),Pt=e.Record({controller:e.Opt(e.Principal),dissolve_delay:e.Opt(w),memo:e.Opt(e.Nat64),vesting_period:e.Opt(w),stake:e.Opt(m)}),Ct=e.Record({developer_neurons:e.Vec(Pt)}),Ft=e.Record({treasury_distribution:e.Opt(xe),developer_distribution:e.Opt(Ct),swap_distribution:e.Opt(xe)}),At=e.Record({url:e.Opt(e.Text),governance_parameters:e.Opt(ht),fallback_controller_principal_ids:e.Vec(e.Principal),logo:e.Opt(be),name:e.Opt(e.Text),ledger_parameters:e.Opt(vt),description:e.Opt(e.Text),dapp_canisters:e.Vec(bt),swap_parameters:e.Opt(Tt),initial_token_distribution:e.Opt(Ft)}),Vt=e.Record({nns_function:e.Int32,payload:e.Vec(e.Nat8)}),v=e.Record({id:e.Opt(e.Principal),reward_account:e.Opt(j)}),Mt=e.Record({dissolve_delay_seconds:e.Nat64}),Bt=e.Record({to_account:e.Opt(j)}),Et=e.Variant({RewardToNeuron:Mt,RewardToAccount:Bt}),ie=e.Record({node_provider:e.Opt(v),reward_mode:e.Opt(Et),amount_e8s:e.Nat64}),qt=e.Record({dissolve_delay_interval_seconds:e.Nat64,count:e.Nat64}),Ut=e.Record({min_participant_icp_e8s:e.Nat64,neuron_basket_construction_parameters:e.Opt(qt),max_icp_e8s:e.Nat64,swap_due_timestamp_seconds:e.Nat64,min_participants:e.Nat32,sns_token_e8s:e.Nat64,sale_delay_seconds:e.Opt(e.Nat64),max_participant_icp_e8s:e.Nat64,min_direct_participation_icp_e8s:e.Opt(e.Nat64),min_icp_e8s:e.Nat64,max_direct_participation_icp_e8s:e.Opt(e.Nat64)}),Kt=e.Record({community_fund_investment_e8s:e.Opt(e.Nat64),target_swap_canister_id:e.Opt(e.Principal),params:e.Opt(Ut)}),Gt=e.Record({start_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Nat64}),Ht=e.Record({open_time_window:e.Opt(Gt)}),jt=e.Record({request:e.Opt(Ht),swap_canister_id:e.Opt(e.Principal)}),Wt=e.Record({default_followees:e.Vec(e.Tuple(e.Int32,o))}),Se=e.Record({use_registry_derived_rewards:e.Opt(e.Bool),rewards:e.Vec(ie)}),W=e.Record({human_readable:e.Opt(e.Text)}),$t=e.Record({contribution_threshold_xdr:e.Opt(W),one_third_participation_milestone_xdr:e.Opt(W),full_participation_milestone_xdr:e.Opt(W)}),Xt=e.Record({maximum_icp_xdr_rate:e.Opt(T),neurons_fund_matched_funding_curve_coefficients:e.Opt($t),max_theoretical_neurons_fund_participation_amount_xdr:e.Opt(W),minimum_icp_xdr_rate:e.Opt(T)}),se=e.Record({neuron_minimum_stake_e8s:e.Nat64,max_proposals_to_keep_per_topic:e.Nat32,neuron_management_fee_per_proposal_e8s:e.Nat64,reject_cost_e8s:e.Nat64,transaction_fee_e8s:e.Nat64,neuron_spawn_dissolve_delay_seconds:e.Nat64,minimum_icp_xdr_rate:e.Nat64,maximum_node_provider_rewards_e8s:e.Nat64,neurons_fund_economics:e.Opt(Xt)}),ae=e.Record({principals:e.Vec(e.Principal)}),zt=e.Variant({ToRemove:v,ToAdd:v}),Jt=e.Record({change:e.Opt(zt)}),Yt=e.Record({motion_text:e.Text}),Qt=e.Variant({RegisterKnownNeuron:i,ManageNeuron:re,UpdateCanisterSettings:yt,InstallCode:wt,StopOrStartCanister:Ot,CreateServiceNervousSystem:At,ExecuteNnsFunction:Vt,RewardNodeProvider:ie,OpenSnsTokenSwap:Kt,SetSnsTokenSwapOpenTimeWindow:jt,SetDefaultFollowees:Wt,RewardNodeProviders:Se,ManageNetworkEconomics:se,ApproveGenesisKyc:ae,AddOrRemoveNodeProvider:Jt,Motion:Yt});t.fill(e.Record({url:e.Text,title:e.Opt(e.Text),action:e.Opt(Qt),summary:e.Text}));let Zt=e.Record({proposal:e.Opt(t),caller:e.Opt(e.Principal),proposer_id:e.Opt(n)}),ke=e.Record({xdr_permyriad_per_icp:e.Opt(e.Nat64),timestamp_seconds:e.Opt(e.Nat64)}),Te=e.Record({minimum_xdr_permyriad_per_icp:e.Opt(e.Nat64),registry_version:e.Opt(e.Nat64),node_providers:e.Vec(v),timestamp:e.Nat64,rewards:e.Vec(ie),xdr_conversion_rate:e.Opt(ke),maximum_node_provider_rewards_e8s:e.Opt(e.Nat64)}),It=e.Record({total_maturity_e8s_equivalent:e.Opt(e.Nat64),maturity_e8s_equivalent_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),voting_power_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),total_staked_e8s:e.Opt(e.Nat64),count:e.Opt(e.Nat64),total_staked_maturity_e8s_equivalent:e.Opt(e.Nat64),staked_maturity_e8s_equivalent_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),staked_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),total_voting_power:e.Opt(e.Nat64),count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64))}),Pe=e.Record({total_maturity_e8s_equivalent:e.Nat64,not_dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),dissolving_neurons_staked_maturity_e8s_equivalent_sum:e.Nat64,garbage_collectable_neurons_count:e.Nat64,dissolving_neurons_staked_maturity_e8s_equivalent_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),neurons_with_invalid_stake_count:e.Nat64,not_dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),ect_neuron_count:e.Nat64,total_supply_icp:e.Nat64,neurons_with_less_than_6_months_dissolve_delay_count:e.Nat64,dissolved_neurons_count:e.Nat64,community_fund_total_maturity_e8s_equivalent:e.Nat64,total_staked_e8s_seed:e.Nat64,total_staked_maturity_e8s_equivalent_ect:e.Nat64,total_staked_e8s:e.Nat64,not_dissolving_neurons_count:e.Nat64,total_locked_e8s:e.Nat64,neurons_fund_total_active_neurons:e.Nat64,total_voting_power_non_self_authenticating_controller:e.Opt(e.Nat64),total_staked_maturity_e8s_equivalent:e.Nat64,not_dissolving_neurons_e8s_buckets_ect:e.Vec(e.Tuple(e.Nat64,e.Float64)),total_staked_e8s_ect:e.Nat64,not_dissolving_neurons_staked_maturity_e8s_equivalent_sum:e.Nat64,dissolved_neurons_e8s:e.Nat64,total_staked_e8s_non_self_authenticating_controller:e.Opt(e.Nat64),dissolving_neurons_e8s_buckets_seed:e.Vec(e.Tuple(e.Nat64,e.Float64)),neurons_with_less_than_6_months_dissolve_delay_e8s:e.Nat64,not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),dissolving_neurons_e8s_buckets_ect:e.Vec(e.Tuple(e.Nat64,e.Float64)),non_self_authenticating_controller_neuron_subset_metrics:e.Opt(It),dissolving_neurons_count:e.Nat64,dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),total_staked_maturity_e8s_equivalent_seed:e.Nat64,community_fund_total_staked_e8s:e.Nat64,not_dissolving_neurons_e8s_buckets_seed:e.Vec(e.Tuple(e.Nat64,e.Float64)),timestamp_seconds:e.Nat64,seed_neuron_count:e.Nat64}),Dt=e.Record({count:e.Opt(e.Nat64),previous_total_stake_e8s:e.Opt(e.Nat64),current_total_stake_e8s:e.Opt(e.Nat64),group_type:e.Int32}),Ce=e.Record({groups:e.Vec(Dt),timestamp_seconds:e.Opt(e.Nat64)}),Fe=e.Record({rounds_since_last_distribution:e.Opt(e.Nat64),day_after_genesis:e.Nat64,actual_timestamp_seconds:e.Nat64,total_available_e8s_equivalent:e.Nat64,latest_round_available_e8s_equivalent:e.Opt(e.Nat64),distributed_e8s_equivalent:e.Nat64,settled_proposals:e.Vec(n)}),Ae=e.Record({to_subaccount:e.Vec(e.Nat8),neuron_stake_e8s:e.Nat64,from:e.Opt(e.Principal),memo:e.Nat64,from_subaccount:e.Vec(e.Nat8),transfer_timestamp:e.Nat64,block_height:e.Nat64}),Lt=e.Record({followers:e.Vec(n)}),en=e.Record({followers_map:e.Vec(e.Tuple(e.Nat64,Lt))}),tn=e.Variant({LastNeuronId:n}),Ve=e.Record({status:e.Opt(e.Int32),failure_reason:e.Opt(e.Text),progress:e.Opt(tn)}),nn=e.Record({neuron_indexes_migration:e.Opt(Ve),copy_inactive_neurons_to_stable_memory_migration:e.Opt(Ve)}),f=e.Record({error_message:e.Text,error_type:e.Int32}),on=e.Record({has_created_neuron_recipes:e.Opt(e.Bool),hotkeys:e.Opt(ae),nns_neuron_id:e.Nat64,amount_icp_e8s:e.Nat64}),rn=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Text,cf_neurons:e.Vec(on)}),Me=e.Record({vote:e.Int32,voting_power:e.Nat64}),sn=e.Record({min_participant_icp_e8s:e.Opt(e.Nat64),max_participant_icp_e8s:e.Opt(e.Nat64),min_direct_participation_icp_e8s:e.Opt(e.Nat64),max_direct_participation_icp_e8s:e.Opt(e.Nat64)}),an=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Opt(e.Principal),hotkeys:e.Vec(e.Principal),is_capped:e.Opt(e.Bool),maturity_equivalent_icp_e8s:e.Opt(e.Nat64),nns_neuron_id:e.Opt(n),amount_icp_e8s:e.Opt(e.Nat64)}),ce=e.Record({neurons_fund_neuron_portions:e.Vec(an)}),cn=e.Record({serialized_representation:e.Opt(e.Text)}),$=e.Record({total_maturity_equivalent_icp_e8s:e.Opt(e.Nat64),intended_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64),direct_participation_icp_e8s:e.Opt(e.Nat64),swap_participation_limits:e.Opt(sn),max_neurons_fund_swap_participation_icp_e8s:e.Opt(e.Nat64),neurons_fund_reserves:e.Opt(ce),ideal_matched_participation_function:e.Opt(cn),allocated_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64)}),un=e.Record({final_neurons_fund_participation:e.Opt($),initial_neurons_fund_participation:e.Opt($),neurons_fund_refunds:e.Opt(ce)}),dn=e.Record({status:e.Opt(e.Int32),freezing_threshold:e.Opt(e.Nat64),controllers:e.Vec(e.Principal),memory_size:e.Opt(e.Nat64),cycles:e.Opt(e.Nat64),idle_cycles_burned_per_day:e.Opt(e.Nat64),module_hash:e.Vec(e.Nat8)}),b=e.Record({status:e.Opt(dn),canister_id:e.Opt(e.Principal)}),pn=e.Record({ledger_index_canister_summary:e.Opt(b),fallback_controller_principal_ids:e.Vec(e.Principal),ledger_archive_canister_summaries:e.Vec(b),ledger_canister_summary:e.Opt(b),swap_canister_summary:e.Opt(b),governance_canister_summary:e.Opt(b),root_canister_summary:e.Opt(b),dapp_canister_summaries:e.Vec(b)}),Be=e.Record({swap_background_information:e.Opt(pn)}),Ee=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),_n=e.Record({current_deadline_timestamp_seconds:e.Nat64}),ln=e.Record({id:e.Opt(n),failure_reason:e.Opt(f),cf_participants:e.Vec(rn),ballots:e.Vec(e.Tuple(e.Nat64,Me)),proposal_timestamp_seconds:e.Nat64,reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,neurons_fund_data:e.Opt(un),reject_cost_e8s:e.Nat64,derived_proposal_information:e.Opt(Be),latest_tally:e.Opt(Ee),sns_token_swap_lifecycle:e.Opt(e.Int32),decided_timestamp_seconds:e.Nat64,proposal:e.Opt(t),proposer:e.Opt(n),wait_for_quiet_state:e.Opt(_n),executed_timestamp_seconds:e.Nat64,original_total_community_fund_maturity_e8s_equivalent:e.Opt(e.Nat64)}),mn=e.Variant({Spawn:n,Split:c,Configure:we,Merge:Oe,DisburseToNeuron:Re,SyncCommand:e.Record({}),ClaimOrRefreshNeuron:p,MergeMaturity:he,Disburse:ve}),fn=e.Record({command:e.Opt(mn),timestamp:e.Nat64}),qe=e.Record({vote:e.Int32,proposal_id:e.Opt(n)}),Nn=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),A=e.Record({id:e.Opt(n),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),controller:e.Opt(e.Principal),recent_ballots:e.Vec(qe),kyc_verified:e.Bool,neuron_type:e.Opt(e.Int32),not_for_profit:e.Bool,maturity_e8s_equivalent:e.Nat64,cached_neuron_stake_e8s:e.Nat64,created_timestamp_seconds:e.Nat64,auto_stake_maturity:e.Opt(e.Bool),aging_since_timestamp_seconds:e.Nat64,hot_keys:e.Vec(e.Principal),account:e.Vec(e.Nat8),joined_community_fund_timestamp_seconds:e.Opt(e.Nat64),dissolve_state:e.Opt(Nn),followees:e.Vec(e.Tuple(e.Int32,o)),neuron_fees_e8s:e.Nat64,visibility:e.Opt(e.Int32),transfer:e.Opt(Ae),known_neuron_data:e.Opt(r),spawn_at_timestamp_seconds:e.Opt(e.Nat64)}),Jr=e.Record({default_followees:e.Vec(e.Tuple(e.Int32,o)),making_sns_proposal:e.Opt(Zt),most_recent_monthly_node_provider_rewards:e.Opt(Te),maturity_modulation_last_updated_at_timestamp_seconds:e.Opt(e.Nat64),wait_for_quiet_threshold_seconds:e.Nat64,metrics:e.Opt(Pe),neuron_management_voting_period_seconds:e.Opt(e.Nat64),node_providers:e.Vec(v),cached_daily_maturity_modulation_basis_points:e.Opt(e.Int32),economics:e.Opt(se),restore_aging_summary:e.Opt(Ce),spawning_neurons:e.Opt(e.Bool),latest_reward_event:e.Opt(Fe),to_claim_transfers:e.Vec(Ae),short_voting_period_seconds:e.Nat64,topic_followee_index:e.Vec(e.Tuple(e.Int32,en)),migrations:e.Opt(nn),proposals:e.Vec(e.Tuple(e.Nat64,ln)),xdr_conversion_rate:e.Opt(ke),in_flight_commands:e.Vec(e.Tuple(e.Nat64,fn)),neurons:e.Vec(e.Tuple(e.Nat64,A)),genesis_timestamp_seconds:e.Nat64}),X=e.Variant({Ok:e.Null,Err:f}),gn=e.Variant({Error:f,NeuronId:n}),yn=e.Record({result:e.Opt(gn)}),Ue=e.Variant({Ok:A,Err:f}),wn=e.Variant({Ok:Pe,Err:f}),On=e.Variant({Ok:Se,Err:f}),z=e.Record({dissolve_delay_seconds:e.Nat64,recent_ballots:e.Vec(qe),neuron_type:e.Opt(e.Int32),created_timestamp_seconds:e.Nat64,state:e.Int32,stake_e8s:e.Nat64,joined_community_fund_timestamp_seconds:e.Opt(e.Nat64),retrieved_at_timestamp_seconds:e.Nat64,visibility:e.Opt(e.Int32),known_neuron_data:e.Opt(r),voting_power:e.Nat64,age_seconds:e.Nat64}),Ke=e.Variant({Ok:z,Err:f}),Rn=e.Record({nns_proposal_id:e.Opt(n)}),hn=e.Record({final_neurons_fund_participation:e.Opt($),initial_neurons_fund_participation:e.Opt($),neurons_fund_refunds:e.Opt(ce)}),vn=e.Record({neurons_fund_audit_info:e.Opt(hn)}),bn=e.Variant({Ok:vn,Err:f}),xn=e.Record({result:e.Opt(bn)}),Sn=e.Variant({Ok:v,Err:f}),ue=e.Record({id:e.Opt(n),status:e.Int32,topic:e.Int32,failure_reason:e.Opt(f),ballots:e.Vec(e.Tuple(e.Nat64,Me)),proposal_timestamp_seconds:e.Nat64,reward_event_round:e.Nat64,deadline_timestamp_seconds:e.Opt(e.Nat64),failed_timestamp_seconds:e.Nat64,reject_cost_e8s:e.Nat64,derived_proposal_information:e.Opt(Be),latest_tally:e.Opt(Ee),reward_status:e.Int32,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(t),proposer:e.Opt(n),executed_timestamp_seconds:e.Nat64}),kn=e.Record({known_neurons:e.Vec(i)}),Tn=e.Record({neuron_ids:e.Vec(e.Nat64),include_empty_neurons_readable_by_caller:e.Opt(e.Bool),include_neurons_readable_by_caller:e.Bool}),Pn=e.Record({neuron_infos:e.Vec(e.Tuple(e.Nat64,z)),full_neurons:e.Vec(A)}),Cn=e.Record({node_providers:e.Vec(v)}),Fn=e.Record({include_reward_status:e.Vec(e.Int32),omit_large_fields:e.Opt(e.Bool),before_proposal:e.Opt(n),limit:e.Nat32,exclude_topic:e.Vec(e.Int32),include_all_manage_neuron_proposals:e.Opt(e.Bool),include_status:e.Vec(e.Int32)}),An=e.Record({proposal_info:e.Vec(ue)}),de=e.Record({created_neuron_id:e.Opt(n)}),Vn=e.Record({refreshed_neuron_id:e.Opt(n)}),Mn=e.Record({target_neuron:e.Opt(A),source_neuron:e.Opt(A),target_neuron_info:e.Opt(z),source_neuron_info:e.Opt(z)}),Bn=e.Record({message:e.Opt(e.Text),proposal_id:e.Opt(n)}),En=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),qn=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),Un=e.Record({transfer_block_height:e.Nat64}),Kn=e.Variant({Error:f,Spawn:de,Split:de,Follow:e.Record({}),ClaimOrRefresh:Vn,Configure:e.Record({}),RegisterVote:e.Record({}),Merge:Mn,DisburseToNeuron:de,MakeProposal:Bn,StakeMaturity:En,MergeMaturity:qn,Disburse:Un}),Ge=e.Record({command:e.Opt(Kn)}),Gn=e.Record({total_direct_contribution_icp_e8s:e.Opt(e.Nat64),total_neurons_fund_contribution_icp_e8s:e.Opt(e.Nat64),sns_governance_canister_id:e.Opt(e.Principal)}),Hn=e.Variant({Committed:Gn,Aborted:e.Record({})}),jn=e.Record({result:e.Opt(Hn),open_sns_token_swap_proposal_id:e.Opt(e.Nat64)}),Wn=e.Record({total_direct_participation_icp_e8s:e.Opt(e.Nat64),total_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64),sns_governance_canister_id:e.Opt(e.Principal)}),$n=e.Variant({Committed:Wn,Aborted:e.Record({})}),Xn=e.Record({result:e.Opt($n),nns_proposal_id:e.Opt(e.Nat64)}),zn=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Opt(e.Text),hotkeys:e.Opt(ae),is_capped:e.Opt(e.Bool),nns_neuron_id:e.Opt(e.Nat64),amount_icp_e8s:e.Opt(e.Nat64)}),Jn=e.Record({neurons_fund_neuron_portions:e.Vec(zn)}),Yn=e.Variant({Ok:Jn,Err:f}),Qn=e.Record({result:e.Opt(Yn)}),Zn=e.Record({reward_account:e.Opt(j)});return e.Service({claim_gtc_neurons:e.Func([e.Principal,e.Vec(n)],[X],[]),claim_or_refresh_neuron_from_account:e.Func([l],[yn],[]),get_build_metadata:e.Func([],[e.Text],[]),get_full_neuron:e.Func([e.Nat64],[Ue],[]),get_full_neuron_by_id_or_subaccount:e.Func([oe],[Ue],[]),get_latest_reward_event:e.Func([],[Fe],[]),get_metrics:e.Func([],[wn],[]),get_monthly_node_provider_rewards:e.Func([],[On],[]),get_most_recent_monthly_node_provider_rewards:e.Func([],[e.Opt(Te)],[]),get_network_economics_parameters:e.Func([],[se],[]),get_neuron_ids:e.Func([],[e.Vec(e.Nat64)],[]),get_neuron_info:e.Func([e.Nat64],[Ke],[]),get_neuron_info_by_id_or_subaccount:e.Func([oe],[Ke],[]),get_neurons_fund_audit_info:e.Func([Rn],[xn],[]),get_node_provider_by_caller:e.Func([e.Null],[Sn],[]),get_pending_proposals:e.Func([],[e.Vec(ue)],[]),get_proposal_info:e.Func([e.Nat64],[e.Opt(ue)],[]),get_restore_aging_summary:e.Func([],[Ce],[]),list_known_neurons:e.Func([],[kn],[]),list_neurons:e.Func([Tn],[Pn],[]),list_node_providers:e.Func([],[Cn],[]),list_proposals:e.Func([Fn],[An],[]),manage_neuron:e.Func([re],[Ge],[]),settle_community_fund_participation:e.Func([jn],[X],[]),settle_neurons_fund_participation:e.Func([Xn],[Qn],[]),simulate_manage_neuron:e.Func([re],[Ge],[]),transfer_gtc_neuron:e.Func([n,n],[X],[]),update_node_provider:e.Func([Zn],[X],[])})};var rr=({IDL:e})=>{let t=e.Rec(),n=e.Record({id:e.Nat64}),o=e.Record({followees:e.Vec(n)}),r=e.Record({name:e.Text,description:e.Opt(e.Text)}),i=e.Record({id:e.Opt(n),known_neuron_data:e.Opt(r)}),s=e.Record({percentage_to_spawn:e.Opt(e.Nat32),new_controller:e.Opt(e.Principal),nonce:e.Opt(e.Nat64)}),c=e.Record({amount_e8s:e.Nat64}),u=e.Record({topic:e.Int32,followees:e.Vec(n)}),l=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),_=e.Variant({NeuronIdOrSubaccount:e.Record({}),MemoAndController:l,Memo:e.Nat64}),p=e.Record({by:e.Opt(_)}),N=e.Record({hot_key_to_remove:e.Opt(e.Principal)}),y=e.Record({new_hot_key:e.Opt(e.Principal)}),M=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),H=e.Record({additional_dissolve_delay_seconds:e.Nat32}),ut=e.Record({visibility:e.Opt(e.Int32)}),dt=e.Record({dissolve_timestamp_seconds:e.Nat64}),pt=e.Variant({RemoveHotKey:N,AddHotKey:y,ChangeAutoStakeMaturity:M,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:H,SetVisibility:ut,JoinCommunityFund:e.Record({}),LeaveCommunityFund:e.Record({}),SetDissolveTimestamp:dt}),we=e.Record({operation:e.Opt(pt)}),_t=e.Record({vote:e.Int32,proposal:e.Opt(n)}),Oe=e.Record({source_neuron_id:e.Opt(n)}),Re=e.Record({dissolve_delay_seconds:e.Nat64,kyc_verified:e.Bool,amount_e8s:e.Nat64,new_controller:e.Opt(e.Principal),nonce:e.Nat64}),lt=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),he=e.Record({percentage_to_merge:e.Nat32}),j=e.Record({hash:e.Vec(e.Nat8)}),mt=e.Record({e8s:e.Nat64}),ve=e.Record({to_account:e.Opt(j),amount:e.Opt(mt)}),ft=e.Variant({Spawn:s,Split:c,Follow:u,ClaimOrRefresh:p,Configure:we,RegisterVote:_t,Merge:Oe,DisburseToNeuron:Re,MakeProposal:t,StakeMaturity:lt,MergeMaturity:he,Disburse:ve}),oe=e.Variant({Subaccount:e.Vec(e.Nat8),NeuronId:n}),re=e.Record({id:e.Opt(n),command:e.Opt(ft),neuron_id_or_subaccount:e.Opt(oe)}),Nt=e.Record({controllers:e.Vec(e.Principal)}),gt=e.Record({freezing_threshold:e.Opt(e.Nat64),controllers:e.Opt(Nt),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)}),yt=e.Record({canister_id:e.Opt(e.Principal),settings:e.Opt(gt)}),wt=e.Record({arg:e.Opt(e.Vec(e.Nat8)),wasm_module:e.Opt(e.Vec(e.Nat8)),skip_stopping_before_installing:e.Opt(e.Bool),canister_id:e.Opt(e.Principal),install_mode:e.Opt(e.Int32)}),Ot=e.Record({action:e.Opt(e.Int32),canister_id:e.Opt(e.Principal)}),T=e.Record({basis_points:e.Opt(e.Nat64)}),w=e.Record({seconds:e.Opt(e.Nat64)}),m=e.Record({e8s:e.Opt(e.Nat64)}),Rt=e.Record({reward_rate_transition_duration:e.Opt(w),initial_reward_rate:e.Opt(T),final_reward_rate:e.Opt(T)}),ht=e.Record({neuron_maximum_dissolve_delay_bonus:e.Opt(T),neuron_maximum_age_for_age_bonus:e.Opt(w),neuron_maximum_dissolve_delay:e.Opt(w),neuron_minimum_dissolve_delay_to_vote:e.Opt(w),neuron_maximum_age_bonus:e.Opt(T),neuron_minimum_stake:e.Opt(m),proposal_wait_for_quiet_deadline_increase:e.Opt(w),proposal_initial_voting_period:e.Opt(w),proposal_rejection_fee:e.Opt(m),voting_reward_parameters:e.Opt(Rt)}),be=e.Record({base64_encoding:e.Opt(e.Text)}),vt=e.Record({transaction_fee:e.Opt(m),token_symbol:e.Opt(e.Text),token_logo:e.Opt(be),token_name:e.Opt(e.Text)}),bt=e.Record({id:e.Opt(e.Principal)}),xt=e.Record({dissolve_delay_interval:e.Opt(w),count:e.Opt(e.Nat64)}),St=e.Record({seconds_after_utc_midnight:e.Opt(e.Nat64)}),kt=e.Record({iso_codes:e.Vec(e.Text)}),Tt=e.Record({minimum_participants:e.Opt(e.Nat64),neurons_fund_participation:e.Opt(e.Bool),duration:e.Opt(w),neuron_basket_construction_parameters:e.Opt(xt),confirmation_text:e.Opt(e.Text),maximum_participant_icp:e.Opt(m),minimum_icp:e.Opt(m),minimum_direct_participation_icp:e.Opt(m),minimum_participant_icp:e.Opt(m),start_time:e.Opt(St),maximum_direct_participation_icp:e.Opt(m),maximum_icp:e.Opt(m),neurons_fund_investment_icp:e.Opt(m),restricted_countries:e.Opt(kt)}),xe=e.Record({total:e.Opt(m)}),Pt=e.Record({controller:e.Opt(e.Principal),dissolve_delay:e.Opt(w),memo:e.Opt(e.Nat64),vesting_period:e.Opt(w),stake:e.Opt(m)}),Ct=e.Record({developer_neurons:e.Vec(Pt)}),Ft=e.Record({treasury_distribution:e.Opt(xe),developer_distribution:e.Opt(Ct),swap_distribution:e.Opt(xe)}),At=e.Record({url:e.Opt(e.Text),governance_parameters:e.Opt(ht),fallback_controller_principal_ids:e.Vec(e.Principal),logo:e.Opt(be),name:e.Opt(e.Text),ledger_parameters:e.Opt(vt),description:e.Opt(e.Text),dapp_canisters:e.Vec(bt),swap_parameters:e.Opt(Tt),initial_token_distribution:e.Opt(Ft)}),Vt=e.Record({nns_function:e.Int32,payload:e.Vec(e.Nat8)}),v=e.Record({id:e.Opt(e.Principal),reward_account:e.Opt(j)}),Mt=e.Record({dissolve_delay_seconds:e.Nat64}),Bt=e.Record({to_account:e.Opt(j)}),Et=e.Variant({RewardToNeuron:Mt,RewardToAccount:Bt}),ie=e.Record({node_provider:e.Opt(v),reward_mode:e.Opt(Et),amount_e8s:e.Nat64}),qt=e.Record({dissolve_delay_interval_seconds:e.Nat64,count:e.Nat64}),Ut=e.Record({min_participant_icp_e8s:e.Nat64,neuron_basket_construction_parameters:e.Opt(qt),max_icp_e8s:e.Nat64,swap_due_timestamp_seconds:e.Nat64,min_participants:e.Nat32,sns_token_e8s:e.Nat64,sale_delay_seconds:e.Opt(e.Nat64),max_participant_icp_e8s:e.Nat64,min_direct_participation_icp_e8s:e.Opt(e.Nat64),min_icp_e8s:e.Nat64,max_direct_participation_icp_e8s:e.Opt(e.Nat64)}),Kt=e.Record({community_fund_investment_e8s:e.Opt(e.Nat64),target_swap_canister_id:e.Opt(e.Principal),params:e.Opt(Ut)}),Gt=e.Record({start_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Nat64}),Ht=e.Record({open_time_window:e.Opt(Gt)}),jt=e.Record({request:e.Opt(Ht),swap_canister_id:e.Opt(e.Principal)}),Wt=e.Record({default_followees:e.Vec(e.Tuple(e.Int32,o))}),Se=e.Record({use_registry_derived_rewards:e.Opt(e.Bool),rewards:e.Vec(ie)}),W=e.Record({human_readable:e.Opt(e.Text)}),$t=e.Record({contribution_threshold_xdr:e.Opt(W),one_third_participation_milestone_xdr:e.Opt(W),full_participation_milestone_xdr:e.Opt(W)}),Xt=e.Record({maximum_icp_xdr_rate:e.Opt(T),neurons_fund_matched_funding_curve_coefficients:e.Opt($t),max_theoretical_neurons_fund_participation_amount_xdr:e.Opt(W),minimum_icp_xdr_rate:e.Opt(T)}),se=e.Record({neuron_minimum_stake_e8s:e.Nat64,max_proposals_to_keep_per_topic:e.Nat32,neuron_management_fee_per_proposal_e8s:e.Nat64,reject_cost_e8s:e.Nat64,transaction_fee_e8s:e.Nat64,neuron_spawn_dissolve_delay_seconds:e.Nat64,minimum_icp_xdr_rate:e.Nat64,maximum_node_provider_rewards_e8s:e.Nat64,neurons_fund_economics:e.Opt(Xt)}),ae=e.Record({principals:e.Vec(e.Principal)}),zt=e.Variant({ToRemove:v,ToAdd:v}),Jt=e.Record({change:e.Opt(zt)}),Yt=e.Record({motion_text:e.Text}),Qt=e.Variant({RegisterKnownNeuron:i,ManageNeuron:re,UpdateCanisterSettings:yt,InstallCode:wt,StopOrStartCanister:Ot,CreateServiceNervousSystem:At,ExecuteNnsFunction:Vt,RewardNodeProvider:ie,OpenSnsTokenSwap:Kt,SetSnsTokenSwapOpenTimeWindow:jt,SetDefaultFollowees:Wt,RewardNodeProviders:Se,ManageNetworkEconomics:se,ApproveGenesisKyc:ae,AddOrRemoveNodeProvider:Jt,Motion:Yt});t.fill(e.Record({url:e.Text,title:e.Opt(e.Text),action:e.Opt(Qt),summary:e.Text}));let Zt=e.Record({proposal:e.Opt(t),caller:e.Opt(e.Principal),proposer_id:e.Opt(n)}),ke=e.Record({xdr_permyriad_per_icp:e.Opt(e.Nat64),timestamp_seconds:e.Opt(e.Nat64)}),Te=e.Record({minimum_xdr_permyriad_per_icp:e.Opt(e.Nat64),registry_version:e.Opt(e.Nat64),node_providers:e.Vec(v),timestamp:e.Nat64,rewards:e.Vec(ie),xdr_conversion_rate:e.Opt(ke),maximum_node_provider_rewards_e8s:e.Opt(e.Nat64)}),It=e.Record({total_maturity_e8s_equivalent:e.Opt(e.Nat64),maturity_e8s_equivalent_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),voting_power_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),total_staked_e8s:e.Opt(e.Nat64),count:e.Opt(e.Nat64),total_staked_maturity_e8s_equivalent:e.Opt(e.Nat64),staked_maturity_e8s_equivalent_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),staked_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),total_voting_power:e.Opt(e.Nat64),count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64))}),Pe=e.Record({total_maturity_e8s_equivalent:e.Nat64,not_dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),dissolving_neurons_staked_maturity_e8s_equivalent_sum:e.Nat64,garbage_collectable_neurons_count:e.Nat64,dissolving_neurons_staked_maturity_e8s_equivalent_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),neurons_with_invalid_stake_count:e.Nat64,not_dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),ect_neuron_count:e.Nat64,total_supply_icp:e.Nat64,neurons_with_less_than_6_months_dissolve_delay_count:e.Nat64,dissolved_neurons_count:e.Nat64,community_fund_total_maturity_e8s_equivalent:e.Nat64,total_staked_e8s_seed:e.Nat64,total_staked_maturity_e8s_equivalent_ect:e.Nat64,total_staked_e8s:e.Nat64,not_dissolving_neurons_count:e.Nat64,total_locked_e8s:e.Nat64,neurons_fund_total_active_neurons:e.Nat64,total_voting_power_non_self_authenticating_controller:e.Opt(e.Nat64),total_staked_maturity_e8s_equivalent:e.Nat64,not_dissolving_neurons_e8s_buckets_ect:e.Vec(e.Tuple(e.Nat64,e.Float64)),total_staked_e8s_ect:e.Nat64,not_dissolving_neurons_staked_maturity_e8s_equivalent_sum:e.Nat64,dissolved_neurons_e8s:e.Nat64,total_staked_e8s_non_self_authenticating_controller:e.Opt(e.Nat64),dissolving_neurons_e8s_buckets_seed:e.Vec(e.Tuple(e.Nat64,e.Float64)),neurons_with_less_than_6_months_dissolve_delay_e8s:e.Nat64,not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),dissolving_neurons_e8s_buckets_ect:e.Vec(e.Tuple(e.Nat64,e.Float64)),non_self_authenticating_controller_neuron_subset_metrics:e.Opt(It),dissolving_neurons_count:e.Nat64,dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),total_staked_maturity_e8s_equivalent_seed:e.Nat64,community_fund_total_staked_e8s:e.Nat64,not_dissolving_neurons_e8s_buckets_seed:e.Vec(e.Tuple(e.Nat64,e.Float64)),timestamp_seconds:e.Nat64,seed_neuron_count:e.Nat64}),Dt=e.Record({count:e.Opt(e.Nat64),previous_total_stake_e8s:e.Opt(e.Nat64),current_total_stake_e8s:e.Opt(e.Nat64),group_type:e.Int32}),Ce=e.Record({groups:e.Vec(Dt),timestamp_seconds:e.Opt(e.Nat64)}),Fe=e.Record({rounds_since_last_distribution:e.Opt(e.Nat64),day_after_genesis:e.Nat64,actual_timestamp_seconds:e.Nat64,total_available_e8s_equivalent:e.Nat64,latest_round_available_e8s_equivalent:e.Opt(e.Nat64),distributed_e8s_equivalent:e.Nat64,settled_proposals:e.Vec(n)}),Ae=e.Record({to_subaccount:e.Vec(e.Nat8),neuron_stake_e8s:e.Nat64,from:e.Opt(e.Principal),memo:e.Nat64,from_subaccount:e.Vec(e.Nat8),transfer_timestamp:e.Nat64,block_height:e.Nat64}),Lt=e.Record({followers:e.Vec(n)}),en=e.Record({followers_map:e.Vec(e.Tuple(e.Nat64,Lt))}),tn=e.Variant({LastNeuronId:n}),Ve=e.Record({status:e.Opt(e.Int32),failure_reason:e.Opt(e.Text),progress:e.Opt(tn)}),nn=e.Record({neuron_indexes_migration:e.Opt(Ve),copy_inactive_neurons_to_stable_memory_migration:e.Opt(Ve)}),f=e.Record({error_message:e.Text,error_type:e.Int32}),on=e.Record({has_created_neuron_recipes:e.Opt(e.Bool),hotkeys:e.Opt(ae),nns_neuron_id:e.Nat64,amount_icp_e8s:e.Nat64}),rn=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Text,cf_neurons:e.Vec(on)}),Me=e.Record({vote:e.Int32,voting_power:e.Nat64}),sn=e.Record({min_participant_icp_e8s:e.Opt(e.Nat64),max_participant_icp_e8s:e.Opt(e.Nat64),min_direct_participation_icp_e8s:e.Opt(e.Nat64),max_direct_participation_icp_e8s:e.Opt(e.Nat64)}),an=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Opt(e.Principal),hotkeys:e.Vec(e.Principal),is_capped:e.Opt(e.Bool),maturity_equivalent_icp_e8s:e.Opt(e.Nat64),nns_neuron_id:e.Opt(n),amount_icp_e8s:e.Opt(e.Nat64)}),ce=e.Record({neurons_fund_neuron_portions:e.Vec(an)}),cn=e.Record({serialized_representation:e.Opt(e.Text)}),$=e.Record({total_maturity_equivalent_icp_e8s:e.Opt(e.Nat64),intended_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64),direct_participation_icp_e8s:e.Opt(e.Nat64),swap_participation_limits:e.Opt(sn),max_neurons_fund_swap_participation_icp_e8s:e.Opt(e.Nat64),neurons_fund_reserves:e.Opt(ce),ideal_matched_participation_function:e.Opt(cn),allocated_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64)}),un=e.Record({final_neurons_fund_participation:e.Opt($),initial_neurons_fund_participation:e.Opt($),neurons_fund_refunds:e.Opt(ce)}),dn=e.Record({status:e.Opt(e.Int32),freezing_threshold:e.Opt(e.Nat64),controllers:e.Vec(e.Principal),memory_size:e.Opt(e.Nat64),cycles:e.Opt(e.Nat64),idle_cycles_burned_per_day:e.Opt(e.Nat64),module_hash:e.Vec(e.Nat8)}),b=e.Record({status:e.Opt(dn),canister_id:e.Opt(e.Principal)}),pn=e.Record({ledger_index_canister_summary:e.Opt(b),fallback_controller_principal_ids:e.Vec(e.Principal),ledger_archive_canister_summaries:e.Vec(b),ledger_canister_summary:e.Opt(b),swap_canister_summary:e.Opt(b),governance_canister_summary:e.Opt(b),root_canister_summary:e.Opt(b),dapp_canister_summaries:e.Vec(b)}),Be=e.Record({swap_background_information:e.Opt(pn)}),Ee=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),_n=e.Record({current_deadline_timestamp_seconds:e.Nat64}),ln=e.Record({id:e.Opt(n),failure_reason:e.Opt(f),cf_participants:e.Vec(rn),ballots:e.Vec(e.Tuple(e.Nat64,Me)),proposal_timestamp_seconds:e.Nat64,reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,neurons_fund_data:e.Opt(un),reject_cost_e8s:e.Nat64,derived_proposal_information:e.Opt(Be),latest_tally:e.Opt(Ee),sns_token_swap_lifecycle:e.Opt(e.Int32),decided_timestamp_seconds:e.Nat64,proposal:e.Opt(t),proposer:e.Opt(n),wait_for_quiet_state:e.Opt(_n),executed_timestamp_seconds:e.Nat64,original_total_community_fund_maturity_e8s_equivalent:e.Opt(e.Nat64)}),mn=e.Variant({Spawn:n,Split:c,Configure:we,Merge:Oe,DisburseToNeuron:Re,SyncCommand:e.Record({}),ClaimOrRefreshNeuron:p,MergeMaturity:he,Disburse:ve}),fn=e.Record({command:e.Opt(mn),timestamp:e.Nat64}),qe=e.Record({vote:e.Int32,proposal_id:e.Opt(n)}),Nn=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),A=e.Record({id:e.Opt(n),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),controller:e.Opt(e.Principal),recent_ballots:e.Vec(qe),kyc_verified:e.Bool,neuron_type:e.Opt(e.Int32),not_for_profit:e.Bool,maturity_e8s_equivalent:e.Nat64,cached_neuron_stake_e8s:e.Nat64,created_timestamp_seconds:e.Nat64,auto_stake_maturity:e.Opt(e.Bool),aging_since_timestamp_seconds:e.Nat64,hot_keys:e.Vec(e.Principal),account:e.Vec(e.Nat8),joined_community_fund_timestamp_seconds:e.Opt(e.Nat64),dissolve_state:e.Opt(Nn),followees:e.Vec(e.Tuple(e.Int32,o)),neuron_fees_e8s:e.Nat64,visibility:e.Opt(e.Int32),transfer:e.Opt(Ae),known_neuron_data:e.Opt(r),spawn_at_timestamp_seconds:e.Opt(e.Nat64)}),Jr=e.Record({default_followees:e.Vec(e.Tuple(e.Int32,o)),making_sns_proposal:e.Opt(Zt),most_recent_monthly_node_provider_rewards:e.Opt(Te),maturity_modulation_last_updated_at_timestamp_seconds:e.Opt(e.Nat64),wait_for_quiet_threshold_seconds:e.Nat64,metrics:e.Opt(Pe),neuron_management_voting_period_seconds:e.Opt(e.Nat64),node_providers:e.Vec(v),cached_daily_maturity_modulation_basis_points:e.Opt(e.Int32),economics:e.Opt(se),restore_aging_summary:e.Opt(Ce),spawning_neurons:e.Opt(e.Bool),latest_reward_event:e.Opt(Fe),to_claim_transfers:e.Vec(Ae),short_voting_period_seconds:e.Nat64,topic_followee_index:e.Vec(e.Tuple(e.Int32,en)),migrations:e.Opt(nn),proposals:e.Vec(e.Tuple(e.Nat64,ln)),xdr_conversion_rate:e.Opt(ke),in_flight_commands:e.Vec(e.Tuple(e.Nat64,fn)),neurons:e.Vec(e.Tuple(e.Nat64,A)),genesis_timestamp_seconds:e.Nat64}),X=e.Variant({Ok:e.Null,Err:f}),gn=e.Variant({Error:f,NeuronId:n}),yn=e.Record({result:e.Opt(gn)}),Ue=e.Variant({Ok:A,Err:f}),wn=e.Variant({Ok:Pe,Err:f}),On=e.Variant({Ok:Se,Err:f}),z=e.Record({dissolve_delay_seconds:e.Nat64,recent_ballots:e.Vec(qe),neuron_type:e.Opt(e.Int32),created_timestamp_seconds:e.Nat64,state:e.Int32,stake_e8s:e.Nat64,joined_community_fund_timestamp_seconds:e.Opt(e.Nat64),retrieved_at_timestamp_seconds:e.Nat64,visibility:e.Opt(e.Int32),known_neuron_data:e.Opt(r),voting_power:e.Nat64,age_seconds:e.Nat64}),Ke=e.Variant({Ok:z,Err:f}),Rn=e.Record({nns_proposal_id:e.Opt(n)}),hn=e.Record({final_neurons_fund_participation:e.Opt($),initial_neurons_fund_participation:e.Opt($),neurons_fund_refunds:e.Opt(ce)}),vn=e.Record({neurons_fund_audit_info:e.Opt(hn)}),bn=e.Variant({Ok:vn,Err:f}),xn=e.Record({result:e.Opt(bn)}),Sn=e.Variant({Ok:v,Err:f}),ue=e.Record({id:e.Opt(n),status:e.Int32,topic:e.Int32,failure_reason:e.Opt(f),ballots:e.Vec(e.Tuple(e.Nat64,Me)),proposal_timestamp_seconds:e.Nat64,reward_event_round:e.Nat64,deadline_timestamp_seconds:e.Opt(e.Nat64),failed_timestamp_seconds:e.Nat64,reject_cost_e8s:e.Nat64,derived_proposal_information:e.Opt(Be),latest_tally:e.Opt(Ee),reward_status:e.Int32,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(t),proposer:e.Opt(n),executed_timestamp_seconds:e.Nat64}),kn=e.Record({known_neurons:e.Vec(i)}),Tn=e.Record({neuron_ids:e.Vec(e.Nat64),include_empty_neurons_readable_by_caller:e.Opt(e.Bool),include_neurons_readable_by_caller:e.Bool}),Pn=e.Record({neuron_infos:e.Vec(e.Tuple(e.Nat64,z)),full_neurons:e.Vec(A)}),Cn=e.Record({node_providers:e.Vec(v)}),Fn=e.Record({include_reward_status:e.Vec(e.Int32),omit_large_fields:e.Opt(e.Bool),before_proposal:e.Opt(n),limit:e.Nat32,exclude_topic:e.Vec(e.Int32),include_all_manage_neuron_proposals:e.Opt(e.Bool),include_status:e.Vec(e.Int32)}),An=e.Record({proposal_info:e.Vec(ue)}),de=e.Record({created_neuron_id:e.Opt(n)}),Vn=e.Record({refreshed_neuron_id:e.Opt(n)}),Mn=e.Record({target_neuron:e.Opt(A),source_neuron:e.Opt(A),target_neuron_info:e.Opt(z),source_neuron_info:e.Opt(z)}),Bn=e.Record({message:e.Opt(e.Text),proposal_id:e.Opt(n)}),En=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),qn=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),Un=e.Record({transfer_block_height:e.Nat64}),Kn=e.Variant({Error:f,Spawn:de,Split:de,Follow:e.Record({}),ClaimOrRefresh:Vn,Configure:e.Record({}),RegisterVote:e.Record({}),Merge:Mn,DisburseToNeuron:de,MakeProposal:Bn,StakeMaturity:En,MergeMaturity:qn,Disburse:Un}),Ge=e.Record({command:e.Opt(Kn)}),Gn=e.Record({total_direct_contribution_icp_e8s:e.Opt(e.Nat64),total_neurons_fund_contribution_icp_e8s:e.Opt(e.Nat64),sns_governance_canister_id:e.Opt(e.Principal)}),Hn=e.Variant({Committed:Gn,Aborted:e.Record({})}),jn=e.Record({result:e.Opt(Hn),open_sns_token_swap_proposal_id:e.Opt(e.Nat64)}),Wn=e.Record({total_direct_participation_icp_e8s:e.Opt(e.Nat64),total_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64),sns_governance_canister_id:e.Opt(e.Principal)}),$n=e.Variant({Committed:Wn,Aborted:e.Record({})}),Xn=e.Record({result:e.Opt($n),nns_proposal_id:e.Opt(e.Nat64)}),zn=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Opt(e.Text),hotkeys:e.Opt(ae),is_capped:e.Opt(e.Bool),nns_neuron_id:e.Opt(e.Nat64),amount_icp_e8s:e.Opt(e.Nat64)}),Jn=e.Record({neurons_fund_neuron_portions:e.Vec(zn)}),Yn=e.Variant({Ok:Jn,Err:f}),Qn=e.Record({result:e.Opt(Yn)}),Zn=e.Record({reward_account:e.Opt(j)});return e.Service({claim_gtc_neurons:e.Func([e.Principal,e.Vec(n)],[X],[]),claim_or_refresh_neuron_from_account:e.Func([l],[yn],[]),get_build_metadata:e.Func([],[e.Text],["query"]),get_full_neuron:e.Func([e.Nat64],[Ue],["query"]),get_full_neuron_by_id_or_subaccount:e.Func([oe],[Ue],["query"]),get_latest_reward_event:e.Func([],[Fe],["query"]),get_metrics:e.Func([],[wn],["query"]),get_monthly_node_provider_rewards:e.Func([],[On],[]),get_most_recent_monthly_node_provider_rewards:e.Func([],[e.Opt(Te)],["query"]),get_network_economics_parameters:e.Func([],[se],["query"]),get_neuron_ids:e.Func([],[e.Vec(e.Nat64)],["query"]),get_neuron_info:e.Func([e.Nat64],[Ke],["query"]),get_neuron_info_by_id_or_subaccount:e.Func([oe],[Ke],["query"]),get_neurons_fund_audit_info:e.Func([Rn],[xn],["query"]),get_node_provider_by_caller:e.Func([e.Null],[Sn],["query"]),get_pending_proposals:e.Func([],[e.Vec(ue)],["query"]),get_proposal_info:e.Func([e.Nat64],[e.Opt(ue)],["query"]),get_restore_aging_summary:e.Func([],[Ce],["query"]),list_known_neurons:e.Func([],[kn],["query"]),list_neurons:e.Func([Tn],[Pn],["query"]),list_node_providers:e.Func([],[Cn],["query"]),list_proposals:e.Func([Fn],[An],["query"]),manage_neuron:e.Func([re],[Ge],[]),settle_community_fund_participation:e.Func([jn],[X],[]),settle_neurons_fund_participation:e.Func([Xn],[Qn],[]),simulate_manage_neuron:e.Func([re],[Ge],[]),transfer_gtc_neuron:e.Func([n,n],[X],[]),update_node_provider:e.Func([Zn],[X],[])})};var ir=({IDL:e})=>{let t=e.Record({id:e.Nat64}),n=e.Record({followees:e.Vec(t)}),o=e.Record({name:e.Text,description:e.Opt(e.Text)}),r=e.Record({to_subaccount:e.Vec(e.Nat8),neuron_stake_e8s:e.Nat64,from:e.Opt(e.Principal),memo:e.Nat64,from_subaccount:e.Vec(e.Nat8),transfer_timestamp:e.Nat64,block_height:e.Nat64}),i=e.Record({vote:e.Int32,proposal_id:e.Opt(t)}),s=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),c=e.Record({id:e.Opt(t),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),controller:e.Opt(e.Principal),recent_ballots:e.Vec(i),kyc_verified:e.Bool,neuron_type:e.Opt(e.Int32),not_for_profit:e.Bool,maturity_e8s_equivalent:e.Nat64,cached_neuron_stake_e8s:e.Nat64,created_timestamp_seconds:e.Nat64,auto_stake_maturity:e.Opt(e.Bool),aging_since_timestamp_seconds:e.Nat64,hot_keys:e.Vec(e.Principal),account:e.Vec(e.Nat8),joined_community_fund_timestamp_seconds:e.Opt(e.Nat64),dissolve_state:e.Opt(s),followees:e.Vec(e.Tuple(e.Int32,n)),neuron_fees_e8s:e.Nat64,transfer:e.Opt(r),known_neuron_data:e.Opt(o),spawn_at_timestamp_seconds:e.Opt(e.Nat64)}),u=e.Record({dissolve_delay_seconds:e.Nat64,recent_ballots:e.Vec(i),neuron_type:e.Opt(e.Int32),created_timestamp_seconds:e.Nat64,state:e.Int32,stake_e8s:e.Nat64,joined_community_fund_timestamp_seconds:e.Opt(e.Nat64),retrieved_at_timestamp_seconds:e.Nat64,known_neuron_data:e.Opt(o),voting_power:e.Nat64,age_seconds:e.Nat64}),l=e.Record({neuron_ids:e.Vec(e.Nat64),include_neurons_readable_by_caller:e.Bool}),_=e.Record({neuron_infos:e.Vec(e.Tuple(e.Nat64,u)),full_neurons:e.Vec(c)});return e.Service({list_neurons:e.Func([l],[_],[])})};import{accountIdentifierToBytes as Bi}from"@dfinity/ledger-icp";import{Principal as S}from"@dfinity/principal";import{arrayBufferToUint8Array as Ei,isNullish as Xe,nonNullish as qi,toNullable as g}from"@dfinity/utils";var nt=class extends Error{},We=class extends nt{},$e=class extends nt{constructor(n){super();this.minimumAmount=n}},L=class extends Error{},ee=class extends Error{constructor(n){super();this.detail=n}},R=class extends Error{constructor(t){super("Unsupported value: "+t)}};var fo=(r=>(r[r.Unspecified=0]="Unspecified",r[r.Install=1]="Install",r[r.Reinstall=2]="Reinstall",r[r.Upgrade=3]="Upgrade",r))(fo||{});var cr=e=>({id:e}),No=e=>({id:e}),Ui=e=>({followees:e.map(No)}),Ki=e=>{if("NeuronId"in e)return{NeuronId:{id:e.NeuronId}};if("Subaccount"in e)return{Subaccount:Uint8Array.from(e.Subaccount)};throw new R(e)},ot=e=>e.basisPoints!==void 0?{basis_points:[e.basisPoints]}:{basis_points:[]},q=e=>e.seconds!==void 0?{seconds:[e.seconds]}:{seconds:[]},Gi=e=>e.secondsAfterUtcMidnight!==void 0?{seconds_after_utc_midnight:[e.secondsAfterUtcMidnight]}:{seconds_after_utc_midnight:[]},Hi=e=>({iso_codes:e.isoCodes}),C=e=>e.e8s!==void 0?{e8s:[e.e8s]}:{e8s:[]},ur=e=>e.base64Encoding!==void 0?{base64_encoding:[e.base64Encoding]}:{base64_encoding:[]},ji=e=>({reward_rate_transition_duration:e.rewardRateTransitionDuration!==void 0?[q(e.rewardRateTransitionDuration)]:[],initial_reward_rate:e.initialRewardRate!==void 0?[ot(e.initialRewardRate)]:[],final_reward_rate:e.finalRewardRate!==void 0?[ot(e.finalRewardRate)]:[]}),Wi=e=>({transaction_fee:e.transactionFee!==void 0?[C(e.transactionFee)]:[],token_symbol:e.tokenSymbol!==void 0?[e.tokenSymbol]:[],token_logo:e.tokenLogo!==void 0?[ur(e.tokenLogo)]:[],token_name:e.tokenName!==void 0?[e.tokenName]:[]}),$i=e=>({minimum_participants:e.minimumParticipants!==void 0?[e.minimumParticipants]:[],duration:e.duration!==void 0?[q(e.duration)]:[],neuron_basket_construction_parameters:e.neuronBasketConstructionParameters!==void 0?[Xi(e.neuronBasketConstructionParameters)]:[],confirmation_text:e.confirmationText!==void 0?[e.confirmationText]:[],maximum_participant_icp:e.maximumParticipantIcp!==void 0?[C(e.maximumParticipantIcp)]:[],neurons_fund_investment_icp:e.neuronsFundInvestmentIcp!==void 0?[C(e.neuronsFundInvestmentIcp)]:[],minimum_icp:e.minimumIcp!==void 0?[C(e.minimumIcp)]:[],minimum_participant_icp:e.minimumParticipantIcp!==void 0?[C(e.minimumParticipantIcp)]:[],start_time:e.startTime!==void 0?[Gi(e.startTime)]:[],maximum_icp:e.maximumIcp!==void 0?[C(e.maximumIcp)]:[],restricted_countries:e.restrictedCountries!==void 0?[Hi(e.restrictedCountries)]:[],maximum_direct_participation_icp:e.maxDirectParticipationIcp!==void 0?[C(e.maxDirectParticipationIcp)]:[],minimum_direct_participation_icp:e.minDirectParticipationIcp!==void 0?[C(e.minDirectParticipationIcp)]:[],neurons_fund_participation:g(e.neuronsFundParticipation)}),Xi=e=>({dissolve_delay_interval:e.dissolveDelayInterval!==void 0?[q(e.dissolveDelayInterval)]:[],count:e.count!==void 0?[e.count]:[]}),zi=e=>({neuron_maximum_dissolve_delay_bonus:e.neuronMaximumDissolveDelayBonus!==void 0?[ot(e.neuronMaximumDissolveDelayBonus)]:[],neuron_maximum_age_for_age_bonus:e.neuronMaximumAgeForAgeBonus!==void 0?[q(e.neuronMaximumAgeForAgeBonus)]:[],neuron_maximum_dissolve_delay:e.neuronMaximumDissolveDelay!==void 0?[q(e.neuronMaximumDissolveDelay)]:[],neuron_minimum_dissolve_delay_to_vote:e.neuronMinimumDissolveDelayToVote!==void 0?[q(e.neuronMinimumDissolveDelayToVote)]:[],neuron_maximum_age_bonus:e.neuronMaximumAgeBonus!==void 0?[ot(e.neuronMaximumAgeBonus)]:[],neuron_minimum_stake:e.neuronMinimumStake!==void 0?[C(e.neuronMinimumStake)]:[],proposal_wait_for_quiet_deadline_increase:e.proposalWaitForQuietDeadlineIncrease!==void 0?[q(e.proposalWaitForQuietDeadlineIncrease)]:[],proposal_initial_voting_period:e.proposalInitialVotingPeriod!==void 0?[q(e.proposalInitialVotingPeriod)]:[],proposal_rejection_fee:e.proposalRejectionFee!==void 0?[C(e.proposalRejectionFee)]:[],voting_reward_parameters:e.votingRewardParameters!==void 0?[ji(e.votingRewardParameters)]:[]}),sr=e=>({total:e.total!==void 0?[C(e.total)]:[]}),Ji=e=>({treasury_distribution:e.treasuryDistribution!==void 0?[sr(e.treasuryDistribution)]:[],developer_distribution:e.developerDistribution!==void 0?[Qi(e.developerDistribution)]:[],swap_distribution:e.swapDistribution!==void 0?[sr(e.swapDistribution)]:[]}),Yi=e=>({controller:e.controller!==void 0?[S.fromText(e.controller)]:[],dissolve_delay:e.dissolveDelay!==void 0?[q(e.dissolveDelay)]:[],memo:e.memo!==void 0?[e.memo]:[],vesting_period:e.vestingPeriod!==void 0?[q(e.vestingPeriod)]:[],stake:e.stake!==void 0?[C(e.stake)]:[]}),Qi=e=>({developer_neurons:e.developerNeurons.map(Yi)}),Zi=e=>({url:e.url!==void 0?[e.url]:[],governance_parameters:e.governanceParameters!==void 0?[zi(e.governanceParameters)]:[],fallback_controller_principal_ids:e.fallbackControllerPrincipalIds.map(t=>S.fromText(t)),logo:e.logo!==void 0?[ur(e.logo)]:[],name:e.name!==void 0?[e.name]:[],ledger_parameters:e.ledgerParameters!==void 0?[Wi(e.ledgerParameters)]:[],description:e.description!==void 0?[e.description]:[],dapp_canisters:e.dappCanisters.map(t=>({id:[S.fromText(t)]})),swap_parameters:e.swapParameters!==void 0?[$i(e.swapParameters)]:[],initial_token_distribution:e.initialTokenDistribution!==void 0?[Ji(e.initialTokenDistribution)]:[]}),Ii=e=>{if(!Xe(e))switch(e){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;default:return 0}},Di=e=>({arg:g(e.arg),wasm_module:g(e.wasmModule),skip_stopping_before_installing:g(e.skipStoppingBeforeInstalling),canister_id:g(qi(e.canisterId)?S.fromText(e.canisterId):void 0),install_mode:g(Ii(e.installMode))}),Li=e=>e===void 0?[]:[{freezing_threshold:g(e.freezingThreshold),controllers:e.controllers?[{controllers:e.controllers.map(t=>S.fromText(t))}]:[],log_visibility:g(e.logVisibility),wasm_memory_limit:g(e.wasmMemoryLimit),compute_allocation:g(e.computeAllocation),memory_allocation:g(e.memoryAllocation)}],dr=e=>{if("ExecuteNnsFunction"in e){let t=e.ExecuteNnsFunction;if(t.payloadBytes===void 0)throw new Error("payloadBytes not found");return{ExecuteNnsFunction:{nns_function:t.nnsFunctionId,payload:Ei(t.payloadBytes)}}}if("ManageNeuron"in e){let t=e.ManageNeuron;return{ManageNeuron:is(t)}}if("ApproveGenesisKyc"in e)return{ApproveGenesisKyc:{principals:e.ApproveGenesisKyc.principals.map(S.fromText)}};if("ManageNetworkEconomics"in e){let t=e.ManageNetworkEconomics;return{ManageNetworkEconomics:{neuron_minimum_stake_e8s:t.neuronMinimumStake,max_proposals_to_keep_per_topic:t.maxProposalsToKeepPerTopic,neuron_management_fee_per_proposal_e8s:t.neuronManagementFeePerProposal,reject_cost_e8s:t.rejectCost,transaction_fee_e8s:t.transactionFee,neuron_spawn_dissolve_delay_seconds:t.neuronSpawnDissolveDelaySeconds,minimum_icp_xdr_rate:t.minimumIcpXdrRate,maximum_node_provider_rewards_e8s:t.maximumNodeProviderRewards,neurons_fund_economics:os(t.neuronsFundEconomics)}}}if("RewardNodeProvider"in e){let t=e.RewardNodeProvider;return{RewardNodeProvider:{node_provider:t.nodeProvider?[rt(t.nodeProvider)]:[],amount_e8s:t.amountE8s,reward_mode:t.rewardMode!=null?[ar(t.rewardMode)]:[]}}}if("RewardNodeProviders"in e){let t=e.RewardNodeProviders;return{RewardNodeProviders:{use_registry_derived_rewards:t.useRegistryDerivedRewards===void 0?[]:[t.useRegistryDerivedRewards],rewards:t.rewards.map(n=>({node_provider:n.nodeProvider?[rt(n.nodeProvider)]:[],amount_e8s:n.amountE8s,reward_mode:n.rewardMode!=null?[ar(n.rewardMode)]:[]}))}}}if("AddOrRemoveNodeProvider"in e){let t=e.AddOrRemoveNodeProvider;return{AddOrRemoveNodeProvider:{change:t.change?[ns(t.change)]:[]}}}if("Motion"in e)return{Motion:{motion_text:e.Motion.motionText}};if("SetDefaultFollowees"in e)return{SetDefaultFollowees:{default_followees:e.SetDefaultFollowees.defaultFollowees.map(n=>[n.topic,Ui(n.followees)])}};if("RegisterKnownNeuron"in e){let t=e.RegisterKnownNeuron;return{RegisterKnownNeuron:{id:[{id:t.id}],known_neuron_data:[{name:t.name,description:t.description!==void 0?[t.description]:[]}]}}}if("SetSnsTokenSwapOpenTimeWindow"in e){let{request:t,swapCanisterId:n}=e.SetSnsTokenSwapOpenTimeWindow;return{SetSnsTokenSwapOpenTimeWindow:{request:t===void 0?[]:[{open_time_window:t.openTimeWindow===void 0?[]:[{start_timestamp_seconds:t.openTimeWindow.startTimestampSeconds,end_timestamp_seconds:t.openTimeWindow.endTimestampSeconds}]}],swap_canister_id:n===void 0?[]:[S.fromText(n)]}}}if("OpenSnsTokenSwap"in e){let{communityFundInvestmentE8s:t,targetSwapCanisterId:n,params:o}=e.OpenSnsTokenSwap;return{OpenSnsTokenSwap:{community_fund_investment_e8s:g(t),target_swap_canister_id:g(n),params:o===void 0?[]:[{min_participant_icp_e8s:o.minParticipantIcpE8s,max_icp_e8s:o.maxIcpE8s,swap_due_timestamp_seconds:o.swapDueTimestampSeconds,min_participants:o.minParticipants,sns_token_e8s:o.snsTokenE8s,max_participant_icp_e8s:o.maxParticipantIcpE8s,min_icp_e8s:o.minIcpE8s,sale_delay_seconds:g(o.saleDelaySeconds),neuron_basket_construction_parameters:g(o.neuronBasketConstructionParameters),max_direct_participation_icp_e8s:g(o.maxDirectParticipationIcpE8s),min_direct_participation_icp_e8s:g(o.minDirectParticipationIcpE8s)}]}}}if("CreateServiceNervousSystem"in e)return{CreateServiceNervousSystem:Zi(e.CreateServiceNervousSystem)};if("InstallCode"in e)return{InstallCode:Di(e.InstallCode)};if("StopOrStartCanister"in e){let t=e.StopOrStartCanister;return{StopOrStartCanister:{canister_id:t.canisterId?[S.fromText(t.canisterId)]:[],action:t.action?[t.action]:[]}}}if("UpdateCanisterSettings"in e){let t=e.UpdateCanisterSettings;return{UpdateCanisterSettings:{canister_id:t.canisterId?[S.fromText(t.canisterId)]:[],settings:Li(t.settings)}}}throw new R(e)},es=e=>{if("Split"in e)return{Split:{amount_e8s:e.Split.amount}};if("Follow"in e){let t=e.Follow;return{Follow:{topic:t.topic,followees:t.followees.map(No)}}}if("ClaimOrRefresh"in e){let t=e.ClaimOrRefresh;return{ClaimOrRefresh:{by:t.by?[rs(t.by)]:[]}}}if("Configure"in e){let t=e.Configure;return{Configure:{operation:t.operation?[ts(t.operation)]:[]}}}if("RegisterVote"in e){let t=e.RegisterVote;return{RegisterVote:{vote:t.vote,proposal:t.proposal?[cr(t.proposal)]:[]}}}if("DisburseToNeuron"in e){let t=e.DisburseToNeuron;return{DisburseToNeuron:{dissolve_delay_seconds:t.dissolveDelaySeconds,kyc_verified:t.kycVerified,amount_e8s:t.amount,new_controller:t.newController?[S.fromText(t.newController)]:[],nonce:t.nonce}}}if("MergeMaturity"in e)return{MergeMaturity:{percentage_to_merge:e.MergeMaturity.percentageToMerge}};if("StakeMaturity"in e){let{percentageToStake:t}=e.StakeMaturity;return{StakeMaturity:{percentage_to_stake:g(t)}}}if("MakeProposal"in e){let t=e.MakeProposal;return{MakeProposal:{url:t.url,title:[],action:t.action?[dr(t.action)]:[],summary:t.summary}}}if("Disburse"in e){let t=e.Disburse;return{Disburse:{to_account:t.toAccountId?[go(t.toAccountId)]:[],amount:t.amount?[pr(t.amount)]:[]}}}if("Spawn"in e){let t=e.Spawn;return{Spawn:{percentage_to_spawn:t.percentageToSpawn===void 0?[]:[t.percentageToSpawn],new_controller:t.newController?[S.fromText(t.newController)]:[],nonce:[]}}}if("Merge"in e){let t=e.Merge;return{Merge:{source_neuron_id:t.sourceNeuronId?[{id:t.sourceNeuronId}]:[]}}}throw new R(e)},ts=e=>{if("RemoveHotKey"in e){let t=e.RemoveHotKey;return{RemoveHotKey:{hot_key_to_remove:t.hotKeyToRemove!=null?[S.fromText(t.hotKeyToRemove)]:[]}}}if("AddHotKey"in e){let t=e.AddHotKey;return{AddHotKey:{new_hot_key:t.newHotKey?[S.fromText(t.newHotKey)]:[]}}}if("StopDissolving"in e)return{StopDissolving:{}};if("StartDissolving"in e)return{StartDissolving:{}};if("IncreaseDissolveDelay"in e)return{IncreaseDissolveDelay:{additional_dissolve_delay_seconds:e.IncreaseDissolveDelay.additionalDissolveDelaySeconds}};if("JoinCommunityFund"in e||"LeaveCommunityFund"in e)return e;if("SetDissolveTimestamp"in e)return{SetDissolveTimestamp:{dissolve_timestamp_seconds:e.SetDissolveTimestamp.dissolveTimestampSeconds}};if("ChangeAutoStakeMaturity"in e){let{requestedSettingForAutoStakeMaturity:t}=e.ChangeAutoStakeMaturity;return{ChangeAutoStakeMaturity:{requested_setting_for_auto_stake_maturity:t}}}if("SetVisibility"in e){let t=e.SetVisibility;return{SetVisibility:{visibility:g(t.visibility)}}}throw new R(e)},ns=e=>{if("ToRemove"in e)return{ToRemove:rt(e.ToRemove)};if("ToAdd"in e)return{ToAdd:rt(e.ToAdd)};throw new R(e)},rt=e=>({id:e.id!=null?[S.fromText(e.id)]:[],reward_account:e.rewardAccount!=null?[go(e.rewardAccount)]:[]}),pr=e=>({e8s:e}),go=e=>({hash:Bi(e)}),os=e=>{if(Xe(e))return[];let{maximumIcpXdrRate:t,maxTheoreticalNeuronsFundParticipationAmountXdr:n,neuronsFundMatchedFundingCurveCoefficients:o,minimumIcpXdrRate:r}=e,i=u=>Xe(u)?[]:[{basis_points:g(u.basisPoints)}],s=u=>Xe(u)?[]:[{human_readable:g(u.humanReadable)}],c=u=>Xe(u)?[]:[{contribution_threshold_xdr:s(u.contributionThresholdXdr),full_participation_milestone_xdr:s(u.fullParticipationMilestoneXdr),one_third_participation_milestone_xdr:s(u.oneThirdParticipationMilestoneXdr)}];return[{maximum_icp_xdr_rate:i(t),neurons_fund_matched_funding_curve_coefficients:c(o),minimum_icp_xdr_rate:i(r),max_theoretical_neurons_fund_participation_amount_xdr:s(n)}]},ar=e=>{if("RewardToNeuron"in e)return{RewardToNeuron:{dissolve_delay_seconds:e.RewardToNeuron.dissolveDelaySeconds}};if("RewardToAccount"in e)return{RewardToAccount:{to_account:e.RewardToAccount.toAccount!=null?[go(e.RewardToAccount.toAccount)]:[]}};throw new R(e)},rs=e=>{if("NeuronIdOrSubaccount"in e)return{NeuronIdOrSubaccount:{}};if("Memo"in e)return{Memo:e.Memo};if("MemoAndController"in e)return{MemoAndController:{memo:e.MemoAndController.memo,controller:e.MemoAndController.controller?[e.MemoAndController.controller]:[]}};throw new R(e)},_r=({neuronIds:e,includeEmptyNeurons:t})=>({neuron_ids:BigUint64Array.from(e??[]),include_neurons_readable_by_caller:!e,include_empty_neurons_readable_by_caller:g(t)}),is=({id:e,command:t,neuronIdOrSubaccount:n})=>({id:e?[No(e)]:[],command:t?[es(t)]:[],neuron_id_or_subaccount:n?[Ki(n)]:[]}),lr=({includeRewardStatus:e,beforeProposal:t,excludeTopic:n,includeStatus:o,limit:r,includeAllManageNeuronProposals:i,omitLargeFields:s})=>({include_reward_status:Int32Array.from(e),before_proposal:t?[cr(t)]:[],limit:r,exclude_topic:Int32Array.from(n),include_all_manage_neuron_proposals:i!==void 0?[i]:[],include_status:Int32Array.from(o),omit_large_fields:g(s)}),mr=e=>({id:[],command:[{ClaimOrRefresh:{by:[{NeuronIdOrSubaccount:{}}]}}],neuron_id_or_subaccount:[{NeuronId:{id:e.neuronId}}]}),fr=({memo:e,controller:t})=>{let n={ClaimOrRefresh:{by:[{MemoAndController:{controller:t==null?[]:[t],memo:e}}]}};return{id:[],command:[n],neuron_id_or_subaccount:[]}},Nr=({neuronId:e,amount:t})=>({id:[],command:[{Split:{amount_e8s:t}}],neuron_id_or_subaccount:[{NeuronId:{id:e}}]});var gr=({neuronId:e,vote:t,proposalId:n})=>te({neuronId:e,command:{RegisterVote:{vote:t,proposal:[{id:n}]}}}),yr=e=>{let t={MakeProposal:{url:e.url,title:e.title!=null?[e.title]:[],summary:e.summary,action:[dr(e.action)]}};return{id:[],command:[t],neuron_id_or_subaccount:[{NeuronId:{id:e.neuronId}}]}},wr=({neuronId:e,topic:t,followees:n})=>te({neuronId:e,command:{Follow:{topic:t,followees:n.map(o=>({id:o}))}}}),Or=({neuronId:e,toAccountIdentifier:t,amount:n})=>te({neuronId:e,command:{Disburse:{to_account:t!==void 0?[t.toAccountIdentifierHash()]:[],amount:n!==void 0?[pr(n)]:[]}}}),Rr=({neuronId:e,percentageToMerge:t})=>te({neuronId:e,command:{MergeMaturity:{percentage_to_merge:t}}}),hr=({neuronId:e,percentageToStake:t})=>te({neuronId:e,command:{StakeMaturity:{percentage_to_stake:g(t)}}}),vr=({neuronId:e,percentageToSpawn:t,newController:n,nonce:o})=>te({neuronId:e,command:{Spawn:{percentage_to_spawn:t===void 0?[]:[t],new_controller:n===void 0?[]:[n],nonce:o===void 0?[]:[o]}}}),br=({neuronId:e,principal:t})=>U({neuronId:e,operation:{AddHotKey:{new_hot_key:[t]}}}),xr=({neuronId:e,principal:t})=>U({neuronId:e,operation:{RemoveHotKey:{hot_key_to_remove:[t]}}}),Sr=({neuronId:e,additionalDissolveDelaySeconds:t})=>U({neuronId:e,operation:{IncreaseDissolveDelay:{additional_dissolve_delay_seconds:t}}}),kr=({neuronId:e,dissolveDelaySeconds:t})=>U({neuronId:e,operation:{SetDissolveTimestamp:{dissolve_timestamp_seconds:BigInt(t)}}}),Tr=e=>U({neuronId:e,operation:{JoinCommunityFund:{}}}),Pr=({neuronId:e,autoStake:t})=>U({neuronId:e,operation:{ChangeAutoStakeMaturity:{requested_setting_for_auto_stake_maturity:t}}}),Cr=e=>U({neuronId:e,operation:{LeaveCommunityFund:{}}}),Fr=({neuronId:e,visibility:t})=>U({neuronId:e,operation:{SetVisibility:{visibility:[t]}}}),yo=({sourceNeuronId:e,targetNeuronId:t})=>te({neuronId:t,command:{Merge:{source_neuron_id:[{id:e}]}}}),Ar=e=>U({neuronId:e,operation:{StartDissolving:{}}}),Vr=e=>U({neuronId:e,operation:{StopDissolving:{}}}),te=({neuronId:e,command:t})=>({id:[{id:e}],command:[t],neuron_id_or_subaccount:[]}),U=({neuronId:e,operation:t})=>te({neuronId:e,command:{Configure:{operation:[t]}}});import{accountIdentifierFromBytes as ss,principalToAccountIdentifier as as}from"@dfinity/ledger-icp";import{Principal as Mr}from"@dfinity/principal";import{fromDefinedNullable as it,fromNullable as d,isNullish as ze,nonNullish as ye,toNullable as Q,uint8ArrayToArrayOfNumber as cs}from"@dfinity/utils";var wo=({neuronId:e,neuronInfo:t,rawNeuron:n,canisterId:o})=>{let r=n?us({neuron:n,canisterId:o}):void 0;return{neuronId:e,dissolveDelaySeconds:t.dissolve_delay_seconds,recentBallots:t.recent_ballots.map(qr),neuronType:d(t.neuron_type),createdTimestampSeconds:t.created_timestamp_seconds,state:t.state,joinedCommunityFundTimestampSeconds:t.joined_community_fund_timestamp_seconds.length?t.joined_community_fund_timestamp_seconds[0]:void 0,retrievedAtTimestampSeconds:t.retrieved_at_timestamp_seconds,votingPower:t.voting_power,ageSeconds:t.age_seconds,visibility:d(t.visibility),fullNeuron:r}},us=({neuron:e,canisterId:t})=>({id:e.id.length?ne(e.id[0]):void 0,stakedMaturityE8sEquivalent:d(e.staked_maturity_e8s_equivalent),controller:e.controller.length?e.controller[0].toString():void 0,recentBallots:e.recent_ballots.map(qr),neuronType:d(e.neuron_type),kycVerified:e.kyc_verified,notForProfit:e.not_for_profit,cachedNeuronStake:e.cached_neuron_stake_e8s,createdTimestampSeconds:e.created_timestamp_seconds,autoStakeMaturity:d(e.auto_stake_maturity),maturityE8sEquivalent:e.maturity_e8s_equivalent,agingSinceTimestampSeconds:e.aging_since_timestamp_seconds,neuronFees:e.neuron_fees_e8s,hotKeys:e.hot_keys.map(n=>n.toString()),accountIdentifier:as(t,Uint8Array.from(e.account)),joinedCommunityFundTimestampSeconds:e.joined_community_fund_timestamp_seconds.length?e.joined_community_fund_timestamp_seconds[0]:void 0,dissolveState:e.dissolve_state.length?ds(e.dissolve_state[0]):void 0,spawnAtTimesSeconds:e.spawn_at_timestamp_seconds[0],followees:e.followees.map(([n,o])=>Ur({topic:n,followees:o})),visibility:d(e.visibility)}),ya=({neuron:e,account:t})=>({id:ye(e.id)?Q({id:e.id}):[],staked_maturity_e8s_equivalent:Q(e.stakedMaturityE8sEquivalent),controller:ye(e.controller)?Q(Mr.from(e.controller)):[],recent_ballots:e.recentBallots.map(n=>({vote:n.vote,proposal_id:ye(n.proposalId)?Q({id:n.proposalId}):[]})),kyc_verified:e.kycVerified,neuron_type:Q(e.neuronType),not_for_profit:e.notForProfit,cached_neuron_stake_e8s:e.cachedNeuronStake,created_timestamp_seconds:e.createdTimestampSeconds,auto_stake_maturity:Q(e.autoStakeMaturity),maturity_e8s_equivalent:e.maturityE8sEquivalent,aging_since_timestamp_seconds:e.agingSinceTimestampSeconds,neuron_fees_e8s:e.neuronFees,hot_keys:e.hotKeys.map(n=>Mr.from(n)),account:t,joined_community_fund_timestamp_seconds:Q(e.joinedCommunityFundTimestampSeconds),dissolve_state:ye(e.dissolveState)?[e.dissolveState]:[],spawn_at_timestamp_seconds:Q(e.spawnAtTimesSeconds),followees:e.followees.map(n=>[n.topic,{followees:n.followees.map(o=>({id:o}))}]),visibility:Q(e.visibility),transfer:[],known_neuron_data:[]}),qr=({vote:e,proposal_id:t})=>({vote:e,proposalId:t.length?ne(t[0]):void 0}),ds=e=>"DissolveDelaySeconds"in e?{DissolveDelaySeconds:e.DissolveDelaySeconds}:{WhenDissolvedTimestampSeconds:e.WhenDissolvedTimestampSeconds},Ur=({topic:e,followees:t})=>({topic:e,followees:t.followees.map(ne)}),ne=({id:e})=>e,ps=e=>{if("NeuronId"in e)return{NeuronId:e.NeuronId.id};if("Subaccount"in e)return{Subaccount:cs(Uint8Array.from(e.Subaccount))};throw new R(e)},_s=({neuronId:e,ballot:t})=>{let{vote:n,voting_power:o}=t;return{neuronId:e,vote:n,votingPower:o}},ls=({title:e,url:t,action:n,summary:o})=>({title:e.length?e[0]:void 0,url:t,action:n.length?Kr(n[0]):void 0,summary:o}),Kr=e=>{if("ExecuteNnsFunction"in e)return{ExecuteNnsFunction:{nnsFunctionId:e.ExecuteNnsFunction.nns_function}};if("ManageNeuron"in e){let t=e.ManageNeuron;return{ManageNeuron:{id:t.id.length?ne(t.id[0]):void 0,command:t.command.length?Ns(t.command[0]):void 0,neuronIdOrSubaccount:t.neuron_id_or_subaccount.length?ps(t.neuron_id_or_subaccount[0]):void 0}}}if("ApproveGenesisKyc"in e)return{ApproveGenesisKyc:{principals:e.ApproveGenesisKyc.principals.map(n=>n.toString())}};if("ManageNetworkEconomics"in e){let t=e.ManageNetworkEconomics;return{ManageNetworkEconomics:{neuronMinimumStake:t.neuron_minimum_stake_e8s,maxProposalsToKeepPerTopic:t.max_proposals_to_keep_per_topic,neuronManagementFeePerProposal:t.neuron_management_fee_per_proposal_e8s,rejectCost:t.reject_cost_e8s,transactionFee:t.transaction_fee_e8s,neuronSpawnDissolveDelaySeconds:t.neuron_spawn_dissolve_delay_seconds,minimumIcpXdrRate:t.minimum_icp_xdr_rate,maximumNodeProviderRewards:t.maximum_node_provider_rewards_e8s,neuronsFundEconomics:ws(t.neurons_fund_economics)}}}if("RewardNodeProvider"in e){let t=e.RewardNodeProvider;return{RewardNodeProvider:{nodeProvider:t.node_provider.length?st(t.node_provider[0]):void 0,amountE8s:t.amount_e8s,rewardMode:t.reward_mode.length?Br(t.reward_mode[0]):void 0}}}if("RewardNodeProviders"in e){let t=e.RewardNodeProviders;return{RewardNodeProviders:{useRegistryDerivedRewards:t.use_registry_derived_rewards.length?t.use_registry_derived_rewards[0]:void 0,rewards:t.rewards.map(n=>({nodeProvider:n.node_provider.length?st(n.node_provider[0]):void 0,amountE8s:n.amount_e8s,rewardMode:n.reward_mode.length?Br(n.reward_mode[0]):void 0}))}}}if("AddOrRemoveNodeProvider"in e){let t=e.AddOrRemoveNodeProvider;return{AddOrRemoveNodeProvider:{change:t.change.length?ys(t.change[0]):void 0}}}if("Motion"in e)return{Motion:{motionText:e.Motion.motion_text}};if("SetDefaultFollowees"in e)return{SetDefaultFollowees:{defaultFollowees:e.SetDefaultFollowees.default_followees.map(([n,o])=>Ur({topic:n,followees:o}))}};if("RegisterKnownNeuron"in e){let t=e.RegisterKnownNeuron;return{RegisterKnownNeuron:hs(t)}}if("SetSnsTokenSwapOpenTimeWindow"in e){let t=e.SetSnsTokenSwapOpenTimeWindow,n=t.request?.length?{openTimeWindow:t.request[0].open_time_window.length?{startTimestampSeconds:t.request[0].open_time_window[0].start_timestamp_seconds,endTimestampSeconds:t.request[0].open_time_window[0].end_timestamp_seconds}:void 0}:void 0,o=t?.swap_canister_id.length?t.swap_canister_id[0].toString():void 0;return{SetSnsTokenSwapOpenTimeWindow:{request:n,swapCanisterId:o}}}if("OpenSnsTokenSwap"in e){let t=e.OpenSnsTokenSwap,n=d(t.params);return{OpenSnsTokenSwap:{communityFundInvestmentE8s:d(t.community_fund_investment_e8s),targetSwapCanisterId:d(t.target_swap_canister_id),params:n&&{minParticipantIcpE8s:n.min_participant_icp_e8s,maxIcpE8s:n.max_icp_e8s,swapDueTimestampSeconds:n.swap_due_timestamp_seconds,minParticipants:n.min_participants,snsTokenE8s:n.sns_token_e8s,maxParticipantIcpE8s:n.max_participant_icp_e8s,minIcpE8s:n.min_icp_e8s,saleDelaySeconds:d(n.sale_delay_seconds),neuronBasketConstructionParameters:d(n.neuron_basket_construction_parameters),maxDirectParticipationIcpE8s:d(n.max_direct_participation_icp_e8s),minDirectParticipationIcpE8s:d(n.min_direct_participation_icp_e8s)}}}}if("CreateServiceNervousSystem"in e){let t=e.CreateServiceNervousSystem;return{CreateServiceNervousSystem:{url:d(t.url),governanceParameters:Ts(d(t.governance_parameters)),fallbackControllerPrincipalIds:t.fallback_controller_principal_ids.map(n=>n.toString()),logo:jr(d(t.logo)),name:d(t.name),ledgerParameters:Ss(d(t.ledger_parameters)),description:d(t.description),dappCanisters:t.dapp_canisters.map(xs)??[],swapParameters:Cs(d(t.swap_parameters)),initialTokenDistribution:Vs(d(t.initial_token_distribution))}}}if("InstallCode"in e){let t=e.InstallCode;return{InstallCode:{arg:t.arg.length?Uint8Array.from(it(t.arg)):void 0,wasmModule:t.wasm_module.length?Uint8Array.from(it(t.wasm_module)):void 0,skipStoppingBeforeInstalling:d(t.skip_stopping_before_installing),canisterId:t.canister_id.length?t.canister_id[0].toString():void 0,installMode:ms(d(t.install_mode))}}}if("StopOrStartCanister"in e){let t=e.StopOrStartCanister;return{StopOrStartCanister:{canisterId:t.canister_id.length?t.canister_id[0].toString():void 0,action:d(t.action)}}}if("UpdateCanisterSettings"in e)return{UpdateCanisterSettings:{canisterId:e.UpdateCanisterSettings.canister_id.length?e.UpdateCanisterSettings.canister_id[0].toString():void 0,settings:Ms(it(e.UpdateCanisterSettings.settings))}};throw new R(e)},ms=e=>{if(!ze(e))switch(e){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;default:return 0}},fs=e=>({no:e.no,yes:e.yes,total:e.total,timestampSeconds:e.timestamp_seconds}),Ns=e=>{if("Spawn"in e){let t=e.Spawn;return{Spawn:{newController:t.new_controller.length?t.new_controller[0].toString():void 0,percentageToSpawn:t.percentage_to_spawn.length?t.percentage_to_spawn[0]:0}}}if("Split"in e)return{Split:{amount:e.Split.amount_e8s}};if("Follow"in e){let t=e.Follow;return{Follow:{topic:t.topic,followees:t.followees.map(ne)}}}if("ClaimOrRefresh"in e){let t=e.ClaimOrRefresh;return{ClaimOrRefresh:{by:t.by.length?Rs(t.by[0]):void 0}}}if("Configure"in e){let t=e.Configure;return{Configure:{operation:t.operation.length?gs(t.operation[0]):void 0}}}if("RegisterVote"in e){let t=e.RegisterVote;return{RegisterVote:{vote:t.vote,proposal:t.proposal.length?ne(t.proposal[0]):void 0}}}if("DisburseToNeuron"in e){let t=e.DisburseToNeuron;return{DisburseToNeuron:{dissolveDelaySeconds:t.dissolve_delay_seconds,kycVerified:t.kyc_verified,amount:t.amount_e8s,newController:t.new_controller.length?t.new_controller[0].toString():void 0,nonce:t.nonce}}}if("MergeMaturity"in e)return{MergeMaturity:{percentageToMerge:e.MergeMaturity.percentage_to_merge}};if("StakeMaturity"in e){let{percentage_to_stake:t}=e.StakeMaturity;return{StakeMaturity:{percentageToStake:d(t)}}}if("MakeProposal"in e){let t=e.MakeProposal;return{MakeProposal:{title:t.title.length?t.title[0]:void 0,url:t.url,action:t.action.length?Kr(t.action[0]):void 0,summary:t.summary}}}if("Disburse"in e){let t=e.Disburse;return{Disburse:{toAccountId:t.to_account.length?Oo(t.to_account[0]):void 0,amount:t.amount.length?Os(t.amount[0]):void 0}}}if("Merge"in e){let t=e.Merge;return{Merge:{sourceNeuronId:t.source_neuron_id.length?t.source_neuron_id[0].id:void 0}}}throw new R(e)},gs=e=>{if("RemoveHotKey"in e){let t=e.RemoveHotKey;return{RemoveHotKey:{hotKeyToRemove:t.hot_key_to_remove.length?t.hot_key_to_remove[0].toString():void 0}}}if("AddHotKey"in e){let t=e.AddHotKey;return{AddHotKey:{newHotKey:t.new_hot_key.length?t.new_hot_key[0].toString():void 0}}}if("StopDissolving"in e)return{StopDissolving:{}};if("StartDissolving"in e)return{StartDissolving:{}};if("IncreaseDissolveDelay"in e)return{IncreaseDissolveDelay:{additionalDissolveDelaySeconds:e.IncreaseDissolveDelay.additional_dissolve_delay_seconds}};if("JoinCommunityFund"in e||"LeaveCommunityFund"in e)return e;if("SetDissolveTimestamp"in e)return{SetDissolveTimestamp:{dissolveTimestampSeconds:e.SetDissolveTimestamp.dissolve_timestamp_seconds}};if("ChangeAutoStakeMaturity"in e){let{requested_setting_for_auto_stake_maturity:t}=e.ChangeAutoStakeMaturity;return{ChangeAutoStakeMaturity:{requestedSettingForAutoStakeMaturity:t}}}if("SetVisibility"in e){let t=e.SetVisibility;return{SetVisibility:{visibility:d(t.visibility)}}}throw new R(e)},ys=e=>{if("ToRemove"in e)return{ToRemove:st(e.ToRemove)};if("ToAdd"in e)return{ToAdd:st(e.ToAdd)};throw new R(e)},ws=e=>{let t=d(e);if(ze(t))return;let{maximum_icp_xdr_rate:n,neurons_fund_matched_funding_curve_coefficients:o,max_theoretical_neurons_fund_participation_amount_xdr:r,minimum_icp_xdr_rate:i}=t,s=l=>{let _=d(l);if(ze(_))return;let{basis_points:p}=_,N=d(p);return ye(N)?{basisPoints:N}:void 0},c=l=>{let _=d(l);if(ze(_))return;let{human_readable:p}=_,N=d(p);return ye(N)?{humanReadable:N}:void 0},u=l=>{let _=d(l);if(ze(_))return;let{full_participation_milestone_xdr:p,one_third_participation_milestone_xdr:N,contribution_threshold_xdr:y}=_;return{fullParticipationMilestoneXdr:c(p),oneThirdParticipationMilestoneXdr:c(N),contributionThresholdXdr:c(y)}};return{maximumIcpXdrRate:s(n),neuronsFundMatchedFundingCurveCoefficients:u(o),maxTheoreticalNeuronsFundParticipationAmountXdr:c(r),minimumIcpXdrRate:s(i)}},st=e=>({id:e.id.length?e.id[0].toString():void 0,rewardAccount:e.reward_account.length?Oo(e.reward_account[0]):void 0}),Os=e=>e.e8s,Oo=e=>ss(new Uint8Array(e.hash)),Br=e=>{if("RewardToNeuron"in e)return{RewardToNeuron:{dissolveDelaySeconds:e.RewardToNeuron.dissolve_delay_seconds}};if("RewardToAccount"in e)return{RewardToAccount:{toAccount:e.RewardToAccount.to_account!=null&&e.RewardToAccount.to_account.length?Oo(e.RewardToAccount.to_account[0]):void 0}};throw new R(e)},Rs=e=>{if("NeuronIdOrSubaccount"in e)return{NeuronIdOrSubaccount:{}};if("Memo"in e)return{Memo:e.Memo};if("MemoAndController"in e)return{MemoAndController:{memo:e.MemoAndController.memo,controller:e.MemoAndController.controller.length?e.MemoAndController.controller[0]:void 0}};throw new R(e)},Ro=e=>({id:e.id.length?ne(e.id[0]):void 0,ballots:e.ballots.map(t=>_s({neuronId:t[0],ballot:t[1]})),rejectCost:e.reject_cost_e8s,proposalTimestampSeconds:e.proposal_timestamp_seconds,rewardEventRound:e.reward_event_round,failedTimestampSeconds:e.failed_timestamp_seconds,deadlineTimestampSeconds:d(e.deadline_timestamp_seconds),decidedTimestampSeconds:e.decided_timestamp_seconds,proposal:e.proposal.length?ls(e.proposal[0]):void 0,proposer:e.proposer.length?ne(e.proposer[0]):void 0,latestTally:e.latest_tally.length?fs(e.latest_tally[0]):void 0,executedTimestampSeconds:e.executed_timestamp_seconds,topic:e.topic,status:e.status,rewardStatus:e.reward_status}),Gr=({response:{neuron_infos:e,full_neurons:t},canisterId:n})=>e.map(([o,r])=>wo({neuronId:o,neuronInfo:r,rawNeuron:t.find(i=>i.id.length&&i.id[0].id===o),canisterId:n})),Hr=({proposal_info:e})=>({proposals:e.map(Ro)}),hs=({id:e,known_neuron_data:t})=>({id:e[0]?.id??BigInt(0),name:t[0]?.name??"",description:t[0]?.description[0]??""}),at=e=>e===void 0?void 0:{basisPoints:d(e.basis_points)},K=e=>e===void 0?void 0:{seconds:d(e.seconds)},vs=e=>e===void 0?void 0:{secondsAfterUtcMidnight:d(e.seconds_after_utc_midnight)},bs=e=>e===void 0?void 0:{isoCodes:e.iso_codes},F=e=>e===void 0?void 0:{e8s:d(e.e8s)},xs=e=>e===void 0||e.id.length===0?void 0:it(e.id).toString(),jr=e=>e===void 0?void 0:{base64Encoding:d(e.base64_encoding)},Ss=e=>e===void 0?void 0:{transactionFee:F(d(e.transaction_fee)),tokenSymbol:d(e.token_symbol),tokenLogo:jr(d(e.token_logo)),tokenName:d(e.token_name)},ks=e=>e===void 0?void 0:{rewardRateTransitionDuration:K(d(e.reward_rate_transition_duration)),initialRewardRate:at(d(e.initial_reward_rate)),finalRewardRate:at(d(e.final_reward_rate))},Ts=e=>e===void 0?void 0:{neuronMaximumDissolveDelayBonus:at(d(e.neuron_maximum_dissolve_delay_bonus)),neuronMaximumAgeForAgeBonus:K(d(e.neuron_maximum_age_for_age_bonus)),neuronMaximumDissolveDelay:K(d(e.neuron_maximum_dissolve_delay)),neuronMinimumDissolveDelayToVote:K(d(e.neuron_minimum_dissolve_delay_to_vote)),neuronMaximumAgeBonus:at(d(e.neuron_maximum_age_bonus)),neuronMinimumStake:F(d(e.neuron_minimum_stake)),proposalWaitForQuietDeadlineIncrease:K(d(e.proposal_wait_for_quiet_deadline_increase)),proposalInitialVotingPeriod:K(d(e.proposal_initial_voting_period)),proposalRejectionFee:F(d(e.proposal_rejection_fee)),votingRewardParameters:ks(d(e.voting_reward_parameters))},Ps=e=>e===void 0?void 0:{dissolveDelayInterval:K(d(e.dissolve_delay_interval)),count:d(e.count)},Cs=e=>e===void 0?void 0:{minimumParticipants:d(e.minimum_participants),duration:K(d(e.duration)),neuronBasketConstructionParameters:Ps(d(e.neuron_basket_construction_parameters)),confirmationText:d(e.confirmation_text),maximumParticipantIcp:F(d(e.maximum_participant_icp)),neuronsFundInvestmentIcp:F(d(e.neurons_fund_investment_icp)),minimumIcp:F(d(e.minimum_icp)),minimumParticipantIcp:F(d(e.minimum_participant_icp)),startTime:vs(d(e.start_time)),maximumIcp:F(d(e.maximum_icp)),restrictedCountries:bs(d(e.restricted_countries)),maxDirectParticipationIcp:F(d(e.maximum_direct_participation_icp)),minDirectParticipationIcp:F(d(e.minimum_direct_participation_icp)),neuronsFundParticipation:d(e.neurons_fund_participation)},Er=e=>e===void 0?void 0:{total:F(d(e.total))},Fs=e=>e===void 0?void 0:{controller:e.controller.length===0?void 0:e.controller[0].toString(),dissolveDelay:K(d(e.dissolve_delay)),memo:d(e.memo),vestingPeriod:K(d(e.vesting_period)),stake:F(d(e.stake))},As=e=>e===void 0?void 0:{developerNeurons:e.developer_neurons.map(Fs)},Vs=e=>e===void 0?void 0:{treasuryDistribution:Er(d(e.treasury_distribution)),developerDistribution:As(d(e.developer_distribution)),swapDistribution:Er(d(e.swap_distribution))},Ms=e=>e===void 0?void 0:{freezingThreshold:d(e.freezing_threshold),controllers:d(e.controllers)?.controllers.map(t=>t.toString()),logVisibility:d(e.log_visibility),wasmMemoryLimit:d(e.wasm_memory_limit),computeAllocation:d(e.compute_allocation),memoryAllocation:d(e.memory_allocation)};var Je=e=>{let{command:t}=e,n=t[0];if(!n)throw new ee({error_message:"Error updating neuron",error_type:0});if("Error"in n)throw new ee(n.Error);return n},h=async({request:e,service:t})=>{let n=await t.manage_neuron(e);return Je(n)},Wr=async({request:e,service:t})=>{let n=await t.simulate_manage_neuron(e);return Je(n)};var ho=BigInt(1e8);var zr=class e{constructor(t,n,o,r,i){this.canisterId=t;this.service=n;this.certifiedService=o;this.oldListNeuronsCertifiedService=r;this.agent=i;this.listNeurons=async({certified:t=!0,neuronIds:n,includeEmptyNeurons:o})=>{let r=_r({neuronIds:n,includeEmptyNeurons:o}),c=await(ct(o)&&t?this.oldListNeuronsCertifiedService:this.getGovernanceService(t)).list_neurons(r);return Gr({response:c,canisterId:this.canisterId})};this.listKnownNeurons=async(t=!0)=>(await this.getGovernanceService(t).list_known_neurons()).known_neurons.map(o=>({id:k(o.id)?.id??BigInt(0),name:k(o.known_neuron_data)?.name??"",description:k(k(o.known_neuron_data)?.description??[])}));this.getLastestRewardEvent=async(t=!0)=>this.getGovernanceService(t).get_latest_reward_event();this.listProposals=async({request:t,certified:n=!0})=>{let o=lr(t),r=await this.getGovernanceService(n).list_proposals(o);return Hr(r)};this.stakeNeuron=async({stake:t,principal:n,fromSubAccount:o,ledgerCanister:r,createdAt:i,fee:s})=>{if(t<ho)throw new $e(t);let c=new Uint8Array((0,xo.default)(8)),u=Xr(c),l=this.buildNeuronStakeSubAccount(c,n),_=vo.fromPrincipal({principal:this.canisterId,subAccount:l});await r.transfer({memo:u,amount:t,fromSubAccount:o,to:_,createdAt:i,fee:s});let p=await this.claimOrRefreshNeuronFromAccount({controller:n,memo:u});if(ct(p))throw new We;return p};this.stakeNeuronIcrc1=async({stake:t,principal:n,fromSubAccount:o,ledgerCanister:r,createdAt:i,fee:s})=>{if(t<ho)throw new $e(t);let c=new Uint8Array((0,xo.default)(8)),u=Xr(c),l=this.getNeuronStakeSubAccountBytes(c,n);await r.icrc1Transfer({icrc1Memo:c,amount:t,fromSubAccount:o,to:{owner:this.canisterId,subaccount:[l]},createdAt:i,fee:s});let _=await this.claimOrRefreshNeuronFromAccount({controller:n,memo:u});if(ct(_))throw new We;return _};this.increaseDissolveDelay=async({neuronId:t,additionalDissolveDelaySeconds:n})=>{let o=Sr({neuronId:t,additionalDissolveDelaySeconds:n});await h({request:o,service:this.certifiedService})};this.setDissolveDelay=async({neuronId:t,dissolveDelaySeconds:n})=>{let o=kr({neuronId:t,dissolveDelaySeconds:n});await h({request:o,service:this.certifiedService})};this.startDissolving=async t=>{let n=Ar(t);await h({request:n,service:this.certifiedService})};this.stopDissolving=async t=>{let n=Vr(t);await h({request:n,service:this.certifiedService})};this.joinCommunityFund=async t=>{let n=Tr(t);await h({request:n,service:this.certifiedService})};this.autoStakeMaturity=async t=>{await h({request:Pr(t),service:this.certifiedService})};this.leaveCommunityFund=async t=>{let n=Cr(t);await h({request:n,service:this.certifiedService})};this.setVisibility=async(t,n)=>{let o=Fr({neuronId:t,visibility:n});await h({request:o,service:this.certifiedService})};this.setNodeProviderAccount=async t=>{$r(t);let n=vo.fromHex(t),o=await this.certifiedService.update_node_provider({reward_account:[n.toAccountIdentifierHash()]});if("Err"in o)throw new ee(o.Err)};this.mergeNeurons=async t=>{let n=yo(t);await h({request:n,service:this.certifiedService})};this.simulateMergeNeurons=async t=>{let n=yo(t),o=await Wr({request:n,service:this.certifiedService}),r,i,s,c;if("Merge"in o&&G(r=o.Merge)&&G(i=k(r.target_neuron_info))&&G(s=k(r.target_neuron))&&G(c=k(s.id)?.id))return wo({neuronId:c,neuronInfo:i,rawNeuron:s,canisterId:this.canisterId});throw new L(`simulateMergeNeurons: Unrecognized Merge error in ${JSON.stringify(o)}`)};this.splitNeuron=async({neuronId:t,amount:n})=>{let o=Nr({neuronId:t,amount:n}),r=await this.certifiedService.manage_neuron(o),i=Je(r);if("Split"in i){let s=k(i.Split.created_neuron_id);if(ct(s))throw new ee({error_message:"Unexpected error splitting neuron. No neuronId in Split response.",error_type:0});return s.id}throw new L(`Unrecognized Split error in ${JSON.stringify(r)}`)};this.getProposal=async({proposalId:t,certified:n=!0})=>{let[o]=await this.getGovernanceService(n).get_proposal_info(t);return o?Ro(o):void 0};this.makeProposal=async t=>{let n=yr(t),o=await h({request:n,service:this.certifiedService});return"MakeProposal"in o?k(o.MakeProposal.proposal_id)?.id:void 0};this.registerVote=async({neuronId:t,vote:n,proposalId:o})=>{let r=gr({neuronId:t,vote:n,proposalId:o});await h({request:r,service:this.certifiedService})};this.setFollowees=async t=>{let n=wr(t);await h({request:n,service:this.certifiedService})};this.disburse=async({neuronId:t,toAccountId:n,amount:o})=>{G(n)&&$r(n);let r=G(n)?vo.fromHex(n):void 0,i=Or({neuronId:t,toAccountIdentifier:r,amount:o});await h({request:i,service:this.certifiedService})};this.mergeMaturity=async({neuronId:t,percentageToMerge:n})=>{bo(n);let o=Rr({neuronId:t,percentageToMerge:n});await h({request:o,service:this.certifiedService})};this.stakeMaturity=async({neuronId:t,percentageToStake:n})=>{bo(n??100),await h({request:hr({neuronId:t,percentageToStake:n}),service:this.certifiedService})};this.spawnNeuron=async({neuronId:t,percentageToSpawn:n,newController:o,nonce:r})=>{G(n)&&bo(n);let i=vr({neuronId:t,percentageToSpawn:n,newController:o,nonce:r}),s=await this.certifiedService.manage_neuron(i),c=Je(s),u;if("Spawn"in c&&G(u=k(c.Spawn.created_neuron_id)?.id))return u;throw new L(`Unrecognized Spawn error in ${JSON.stringify(s)}`)};this.addHotkey=async({neuronId:t,principal:n})=>{let o=br({neuronId:t,principal:n});await h({request:o,service:this.certifiedService})};this.removeHotkey=async({neuronId:t,principal:n})=>{let o=xr({neuronId:t,principal:n});await h({request:o,service:this.certifiedService})};this.claimOrRefreshNeuronFromAccount=async({memo:t,controller:n})=>{let o=fr({memo:t,controller:n}),r=await this.certifiedService.manage_neuron(o),i;if(G(i=k(r.command))&&"ClaimOrRefresh"in i)return k(i.ClaimOrRefresh.refreshed_neuron_id)?.id;throw new L(`Unrecognized ClaimOrRefresh error in ${JSON.stringify(r)}`)};this.claimOrRefreshNeuron=async t=>{let n=mr(t),o=await this.service.manage_neuron(n),r;if(G(r=k(o.command))&&"ClaimOrRefresh"in r)return k(r.ClaimOrRefresh.refreshed_neuron_id)?.id;throw new L(`Unrecognized ClaimOrRefresh error in ${JSON.stringify(o)}`)};this.buildNeuronStakeSubAccount=(t,n)=>Es.fromBytes(this.getNeuronStakeSubAccountBytes(t,n));this.getNeuronStakeSubAccountBytes=(t,n)=>{let o=Us("neuron-stake"),r=Fo.create();return r.update(qs([12,...o,...n.toUint8Array(),...t])),r.digest()};this.getNeuron=async({certified:t=!0,neuronId:n})=>{let[o]=await this.listNeurons({certified:t,neuronIds:[n]});return o};this.canisterId=t,this.service=n,this.certifiedService=o,this.oldListNeuronsCertifiedService=r,this.agent=i}static create(t={}){let n=t.canisterId??So,{service:o,certifiedService:r,agent:i}=Ks({options:{...t,canisterId:n},idlFactory:rr,certifiedIdlFactory:or}),s=t.oldListNeuronsServiceOverride??Bs.createActor(ir,{agent:i,canisterId:n});return new e(n,o,r,s,i)}getGovernanceService(t){return t?this.certifiedService:this.service}};export{rr as a,nt as b,We as c,$e as d,L as e,ee as f,R as g,fo as h,_r as i,ya as j,zr as k};
|
|
3
|
+
/*! Bundled license information:
|
|
4
|
+
|
|
5
|
+
ieee754/index.js:
|
|
6
|
+
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
7
|
+
|
|
8
|
+
buffer/index.js:
|
|
9
|
+
(*!
|
|
10
|
+
* The buffer module from node.js, for the browser.
|
|
11
|
+
*
|
|
12
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
13
|
+
* @license MIT
|
|
14
|
+
*)
|
|
15
|
+
|
|
16
|
+
@noble/hashes/esm/utils.js:
|
|
17
|
+
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
18
|
+
*/
|
|
19
|
+
//# sourceMappingURL=chunk-REL225EW.js.map
|