@dfinity/nns 5.2.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -35
- package/dist/candid/genesis_token.did +1 -1
- package/dist/candid/governance.certified.idl.js +152 -10
- package/dist/candid/governance.d.ts +114 -3
- package/dist/candid/governance.did +107 -4
- package/dist/candid/governance.idl.js +152 -10
- package/dist/candid/governance_test.certified.idl.js +152 -10
- package/dist/candid/governance_test.d.ts +114 -3
- package/dist/candid/governance_test.did +107 -4
- package/dist/candid/governance_test.idl.js +152 -10
- package/dist/candid/sns_wasm.certified.idl.js +0 -13
- package/dist/candid/sns_wasm.d.ts +0 -13
- package/dist/candid/sns_wasm.did +1 -12
- package/dist/candid/sns_wasm.idl.js +0 -13
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/chunk-3GMJYFVP.js +2 -0
- package/dist/esm/chunk-3GMJYFVP.js.map +7 -0
- package/dist/esm/chunk-L6YE6E7N.js +19 -0
- package/dist/esm/chunk-L6YE6E7N.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 +10 -5
- package/dist/types/canisters/governance/services.d.ts +3 -3
- package/dist/types/enums/governance.enums.d.ts +32 -6
- package/dist/types/governance.canister.d.ts +9 -2
- package/dist/types/types/governance_converters.d.ts +108 -2
- package/package.json +6 -6
- package/dist/esm/chunk-RRSEQTKA.js +0 -2
- package/dist/esm/chunk-RRSEQTKA.js.map +0 -7
- package/dist/esm/chunk-ZSTGGZGS.js +0 -19
- package/dist/esm/chunk-ZSTGGZGS.js.map +0 -7
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e as ne}from"./chunk-KCY3PAEP.js";import{createServices as ie}from"@dfinity/utils";var ae=({IDL:e})=>{let o=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}),r=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({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)}),w=e.Record({developer_neurons:e.Vec(i)}),P=e.Record({airdrop_neurons:e.Vec(i)}),V=e.Record({total_e8s:e.Nat64,initial_swap_amount_e8s:e.Nat64}),h=e.Record({treasury_distribution:e.Opt(N),developer_distribution:e.Opt(w),airdrop_distribution:e.Opt(P),swap_distribution:e.Opt(V)}),y=e.Variant({FractionalDeveloperVotingPower:h}),v=e.Record({iso_codes:e.Vec(e.Text)}),S=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),max_age_bonus_percentage:e.Opt(e.Nat64),initial_token_distribution:e.Opt(y),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(v),min_icp_e8s:e.Opt(e.Nat64),max_direct_participation_icp_e8s:e.Opt(e.Nat64)}),g=e.Record({sns_init_payload:e.Opt(S)}),x=e.Record({restored_dapp_canisters:e.Vec(a),nns_controlled_dapp_canisters:e.Vec(a),sns_controlled_dapp_canisters:e.Vec(a)}),b=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)}),T=e.Record({dapp_canisters_transfer_result:e.Opt(x),subnet_id:e.Opt(e.Principal),error:e.Opt(t),canisters:e.Opt(b)}),c=e.Record({allowed_principals:e.Vec(e.Principal)}),f=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)}),F=e.Variant({Error:t,DeployedSns:p}),q=e.Record({get_deployed_sns_by_proposal_id_result:e.Opt(F)}),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)}),W=e.Record({governance_canister_id:e.Opt(e.Principal),current_version:e.Opt(s)}),G=e.Record({next_version:e.Opt(s)}),C=e.Record({hash:e.Vec(e.Nat8)}),k=e.Record({proposal_id:e.Opt(e.Nat64)}),A=e.Record({sns_subnet_ids:e.Vec(e.Principal)}),U=e.Record({hash:e.Vec(e.Nat8)}),E=e.Record({wasm:e.Opt(n)}),B=e.Record({hash:e.Opt(e.Vec(e.Nat8))}),M=e.Record({contents:e.Opt(e.Vec(e.Nat8)),name:e.Opt(e.Text),visibility:e.Opt(e.Text)}),j=e.Record({sections:e.Vec(M)}),z=e.Variant({Ok:j,Error:t}),H=e.Record({result:e.Opt(z)}),J=e.Record({next_version:e.Opt(s),current_version:e.Opt(s)}),K=e.Record({upgrade_path:e.Vec(J),sns_governance_canister_id:e.Opt(e.Principal)}),Q=e.Record({error:e.Opt(t)}),X=e.Record({instances:e.Vec(p)}),Y=e.Record({limit:e.Nat32,starting_at:e.Opt(s),sns_governance_canister_id:e.Opt(e.Principal)}),Z=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}),$=e.Record({pretty_version:e.Opt(Z),version:e.Opt(s)}),D=e.Record({steps:e.Vec($)}),I=e.Record({added_principals:e.Vec(e.Principal),removed_principals:e.Vec(e.Principal)}),L=e.Variant({Error:t,AllowedPrincipals:c}),ee=e.Record({update_allowed_principals_result:e.Opt(L)}),te=e.Record({sns_subnet_ids_to_add:e.Vec(e.Principal),sns_subnet_ids_to_remove:e.Vec(e.Principal)}),se=e.Record({error:e.Opt(t)});return e.Service({add_wasm:e.Func([r],[d],[]),deploy_new_sns:e.Func([g],[T],[]),get_allowed_principals:e.Func([e.Record({})],[c],[]),get_deployed_sns_by_proposal_id:e.Func([f],[q],[]),get_latest_sns_version_pretty:e.Func([e.Null],[e.Vec(e.Tuple(e.Text,e.Text))],[]),get_next_sns_version:e.Func([W],[G],[]),get_proposal_id_that_added_wasm:e.Func([C],[k],[]),get_sns_subnet_ids:e.Func([e.Record({})],[A],[]),get_wasm:e.Func([U],[E],[]),get_wasm_metadata:e.Func([B],[H],[]),insert_upgrade_path_entries:e.Func([K],[Q],[]),list_deployed_snses:e.Func([e.Record({})],[X],[]),list_upgrade_steps:e.Func([Y],[D],[]),update_allowed_principals:e.Func([I],[ee],[]),update_sns_subnet_list:e.Func([te],[se],[])})};var oe=({IDL:e})=>{let o=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}),r=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({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)}),w=e.Record({developer_neurons:e.Vec(i)}),P=e.Record({airdrop_neurons:e.Vec(i)}),V=e.Record({total_e8s:e.Nat64,initial_swap_amount_e8s:e.Nat64}),h=e.Record({treasury_distribution:e.Opt(N),developer_distribution:e.Opt(w),airdrop_distribution:e.Opt(P),swap_distribution:e.Opt(V)}),y=e.Variant({FractionalDeveloperVotingPower:h}),v=e.Record({iso_codes:e.Vec(e.Text)}),S=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),max_age_bonus_percentage:e.Opt(e.Nat64),initial_token_distribution:e.Opt(y),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(v),min_icp_e8s:e.Opt(e.Nat64),max_direct_participation_icp_e8s:e.Opt(e.Nat64)}),g=e.Record({sns_init_payload:e.Opt(S)}),x=e.Record({restored_dapp_canisters:e.Vec(a),nns_controlled_dapp_canisters:e.Vec(a),sns_controlled_dapp_canisters:e.Vec(a)}),b=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)}),T=e.Record({dapp_canisters_transfer_result:e.Opt(x),subnet_id:e.Opt(e.Principal),error:e.Opt(t),canisters:e.Opt(b)}),c=e.Record({allowed_principals:e.Vec(e.Principal)}),f=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)}),F=e.Variant({Error:t,DeployedSns:p}),q=e.Record({get_deployed_sns_by_proposal_id_result:e.Opt(F)}),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)}),W=e.Record({governance_canister_id:e.Opt(e.Principal),current_version:e.Opt(s)}),G=e.Record({next_version:e.Opt(s)}),C=e.Record({hash:e.Vec(e.Nat8)}),k=e.Record({proposal_id:e.Opt(e.Nat64)}),A=e.Record({sns_subnet_ids:e.Vec(e.Principal)}),U=e.Record({hash:e.Vec(e.Nat8)}),E=e.Record({wasm:e.Opt(n)}),B=e.Record({hash:e.Opt(e.Vec(e.Nat8))}),M=e.Record({contents:e.Opt(e.Vec(e.Nat8)),name:e.Opt(e.Text),visibility:e.Opt(e.Text)}),j=e.Record({sections:e.Vec(M)}),z=e.Variant({Ok:j,Error:t}),H=e.Record({result:e.Opt(z)}),J=e.Record({next_version:e.Opt(s),current_version:e.Opt(s)}),K=e.Record({upgrade_path:e.Vec(J),sns_governance_canister_id:e.Opt(e.Principal)}),Q=e.Record({error:e.Opt(t)}),X=e.Record({instances:e.Vec(p)}),Y=e.Record({limit:e.Nat32,starting_at:e.Opt(s),sns_governance_canister_id:e.Opt(e.Principal)}),Z=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}),$=e.Record({pretty_version:e.Opt(Z),version:e.Opt(s)}),D=e.Record({steps:e.Vec($)}),I=e.Record({added_principals:e.Vec(e.Principal),removed_principals:e.Vec(e.Principal)}),L=e.Variant({Error:t,AllowedPrincipals:c}),ee=e.Record({update_allowed_principals_result:e.Opt(L)}),te=e.Record({sns_subnet_ids_to_add:e.Vec(e.Principal),sns_subnet_ids_to_remove:e.Vec(e.Principal)}),se=e.Record({error:e.Opt(t)});return e.Service({add_wasm:e.Func([r],[d],[]),deploy_new_sns:e.Func([g],[T],[]),get_allowed_principals:e.Func([e.Record({})],[c],["query"]),get_deployed_sns_by_proposal_id:e.Func([f],[q],["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([W],[G],["query"]),get_proposal_id_that_added_wasm:e.Func([C],[k],["query"]),get_sns_subnet_ids:e.Func([e.Record({})],[A],["query"]),get_wasm:e.Func([U],[E],["query"]),get_wasm_metadata:e.Func([B],[H],["query"]),insert_upgrade_path_entries:e.Func([K],[Q],[]),list_deployed_snses:e.Func([e.Record({})],[X],["query"]),list_upgrade_steps:e.Func([Y],[D],["query"]),update_allowed_principals:e.Func([I],[ee],[]),update_sns_subnet_list:e.Func([te],[se],[])})};var re=class e{constructor(o,n){this.service=o;this.certifiedService=n;this.listSnses=async({certified:o=!0})=>{let n=o?this.certifiedService:this.service,{instances:r}=await n.list_deployed_snses({});return r}}static create(o={}){let{service:n,certifiedService:r}=ie({options:{...o,canisterId:o.canisterId??ne},idlFactory:oe,certifiedIdlFactory:ae});return new e(n,r)}};export{re as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3GMJYFVP.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 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 '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 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 '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,IAAI,EACzB,KAASA,EAAI,IAAIE,CAAO,CAC1B,CAAC,EACKE,EAAeJ,EAAI,OAAO,CAAE,QAAYA,EAAI,IAAK,CAAC,EAClDK,EAASL,EAAI,QAAQ,CACzB,MAAUI,EACV,KAASJ,EAAI,IAAIA,EAAI,IAAI,CAC3B,CAAC,EAC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,OAAO,CACV,EACF,mBAAuB/C,EAAI,KACvB,CAACgD,CAAuB,EACxB,CAACG,CAAwB,EACzB,CAAC,OAAO,CACV,EACF,0BAA8BnD,EAAI,KAC9B,CAACoD,CAA8B,EAC/B,CAACE,EAA+B,EAChC,CAAC,CACH,EACF,uBAA2BtD,EAAI,KAC3B,CAACuD,EAA0B,EAC3B,CAACC,EAA2B,EAC5B,CAAC,CACH,CACJ,CAAC,CACH,EFtTO,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", "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", "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 De,b as oi,c as Ao}from"./chunk-KCY3PAEP.js";var jo=De(at=>{"use strict";at.byteLength=ui;at.toByteArray=di;at.fromByteArray=mi;var B=[],C=[],ci=typeof Uint8Array<"u"?Uint8Array:Array,uo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(we=0,Ko=uo.length;we<Ko;++we)B[we]=uo[we],C[uo.charCodeAt(we)]=we;var we,Ko;C[45]=62;C[95]=63;function Ho(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 ui(e){var t=Ho(e),n=t[0],o=t[1];return(n+o)*3/4-o}function _i(e,t,n){return(t+n)*3/4-n}function di(e){var t,n=Ho(e),o=n[0],r=n[1],i=new ci(_i(e,o,r)),s=0,c=r>0?o-4:o,u;for(u=0;u<c;u+=4)t=C[e.charCodeAt(u)]<<18|C[e.charCodeAt(u+1)]<<12|C[e.charCodeAt(u+2)]<<6|C[e.charCodeAt(u+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return r===2&&(t=C[e.charCodeAt(u)]<<2|C[e.charCodeAt(u+1)]>>4,i[s++]=t&255),r===1&&(t=C[e.charCodeAt(u)]<<10|C[e.charCodeAt(u+1)]<<4|C[e.charCodeAt(u+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function pi(e){return B[e>>18&63]+B[e>>12&63]+B[e>>6&63]+B[e&63]}function li(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(pi(o));return r.join("")}function mi(e){for(var t,n=e.length,o=n%3,r=[],i=16383,s=0,c=n-o;s<c;s+=i)r.push(li(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 Wo=De(_o=>{_o.read=function(e,t,n,o,r){var i,s,c=r*8-o-1,u=(1<<c)-1,l=u>>1,p=-7,d=n?r-1:0,m=n?-1:1,y=e[t+d];for(d+=m,i=y&(1<<-p)-1,y>>=-p,p+=c;p>0;i=i*256+e[t+d],d+=m,p-=8);for(s=i&(1<<-p)-1,i>>=-p,p+=o;p>0;s=s*256+e[t+d],d+=m,p-=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)};_o.write=function(e,t,n,o,r,i){var s,c,u,l=i*8-r-1,p=(1<<l)-1,d=p>>1,m=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:i-1,A=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=p):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+d>=1?t+=m/u:t+=m*Math.pow(2,1-d),t*u>=2&&(s++,u/=2),s+d>=p?(c=0,s=p):s+d>=1?(c=(t*u-1)*Math.pow(2,r),s=s+d):(c=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+y]=c&255,y+=A,c/=256,r-=8);for(s=s<<r|c,l+=r;l>0;e[n+y]=s&255,y+=A,s/=256,l-=8);e[n+y-A]|=H*128}});var sr=De(he=>{"use strict";var po=jo(),Oe=Wo(),$o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;he.Buffer=a;he.SlowBuffer=Oi;he.INSPECT_MAX_BYTES=50;var ct=2147483647;he.kMaxLength=ct;a.TYPED_ARRAY_SUPPORT=fi();!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 fi(){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 I(e){if(e>ct)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 No(e)}return Yo(e,t,n)}a.poolSize=8192;function Yo(e,t,n){if(typeof e=="string")return wi(e,t);if(ArrayBuffer.isView(e))return yi(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 mo(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=gi(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 Yo(e,t,n)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function Qo(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 Ni(e,t,n){return Qo(e),e<=0?I(e):t!==void 0?typeof n=="string"?I(e).fill(t,n):I(e).fill(t):I(e)}a.alloc=function(e,t,n){return Ni(e,t,n)};function No(e){return Qo(e),I(e<0?0:wo(e)|0)}a.allocUnsafe=function(e){return No(e)};a.allocUnsafeSlow=function(e){return No(e)};function wi(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let n=Zo(e,t)|0,o=I(n),r=o.write(e,t);return r!==n&&(o=o.slice(0,r)),o}function lo(e){let t=e.length<0?0:wo(e.length)|0,n=I(t);for(let o=0;o<t;o+=1)n[o]=e[o]&255;return n}function yi(e){if(E(e,Uint8Array)){let t=new Uint8Array(e);return mo(t.buffer,t.byteOffset,t.byteLength)}return lo(e)}function mo(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 gi(e){if(a.isBuffer(e)){let t=wo(e.length)|0,n=I(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!="number"||go(e.length)?I(0):lo(e);if(e.type==="Buffer"&&Array.isArray(e.data))return lo(e.data)}function wo(e){if(e>=ct)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ct.toString(16)+" bytes");return e|0}function Oi(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 Zo(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 fo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return ir(e).length;default:if(r)return o?-1:fo(e).length;t=(""+t).toLowerCase(),r=!0}}a.byteLength=Zo;function Ri(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 Fi(this,t,n);case"utf8":case"utf-8":return Do(this,t,n);case"ascii":return Ci(this,t,n);case"latin1":case"binary":return Pi(this,t,n);case"base64":return ki(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 ye(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)ye(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)ye(this,n,n+3),ye(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)ye(this,n,n+7),ye(this,n+1,n+6),ye(this,n+2,n+5),ye(this,n+3,n+4);return this};a.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?Do(this,0,t):Ri.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=he.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"};$o&&(a.prototype[$o]=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),p=t.slice(n,o);for(let d=0;d<u;++d)if(l[d]!==p[d]){s=l[d],c=p[d];break}return s<c?-1:c<s?1:0};function Io(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,go(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:Xo(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):Xo(e,[t],n,o,r);throw new TypeError("val must be string, number or Buffer")}function Xo(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,d){return i===1?p[d]:p.readUInt16BE(d*i)}let l;if(r){let p=-1;for(l=n;l<s;l++)if(u(e,l)===u(t,p===-1?0:l-p)){if(p===-1&&(p=l),l-p+1===c)return p*i}else p!==-1&&(l-=l-p),p=-1}else for(n+c>s&&(n=s-c),l=n;l>=0;l--){let p=!0;for(let d=0;d<c;d++)if(u(e,l+d)!==u(t,d)){p=!1;break}if(p)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 Io(this,t,n,o,!0)};a.prototype.lastIndexOf=function(t,n,o){return Io(this,t,n,o,!1)};function hi(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(go(c))return s;e[n+s]=c}return s}function vi(e,t,n,o){return ut(fo(t,e.length-n),e,n,o)}function bi(e,t,n,o){return ut(Ei(t),e,n,o)}function xi(e,t,n,o){return ut(ir(t),e,n,o)}function Si(e,t,n,o){return ut(qi(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 hi(this,t,n,o);case"utf8":case"utf-8":return vi(this,t,n,o);case"ascii":case"latin1":case"binary":return bi(this,t,n,o);case"base64":return xi(this,t,n,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Si(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 ki(e,t,n){return t===0&&n===e.length?po.fromByteArray(e):po.fromByteArray(e.slice(t,n))}function Do(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,d;switch(c){case 1:i<128&&(s=i);break;case 2:u=e[r+1],(u&192)===128&&(d=(i&31)<<6|u&63,d>127&&(s=d));break;case 3:u=e[r+1],l=e[r+2],(u&192)===128&&(l&192)===128&&(d=(i&15)<<12|(u&63)<<6|l&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:u=e[r+1],l=e[r+2],p=e[r+3],(u&192)===128&&(l&192)===128&&(p&192)===128&&(d=(i&15)<<18|(u&63)<<12|(l&63)<<6|p&63,d>65535&&d<1114112&&(s=d))}}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 Ti(o)}var zo=4096;function Ti(e){let t=e.length;if(t<=zo)return String.fromCharCode.apply(String,e);let n="",o=0;for(;o<t;)n+=String.fromCharCode.apply(String,e.slice(o,o+=zo));return n}function Ci(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 Pi(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 Fi(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+=Ui[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=ne(function(t){t=t>>>0,Re(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&Le(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=ne(function(t){t=t>>>0,Re(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&Le(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=ne(function(t){t=t>>>0,Re(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&Le(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=ne(function(t){t=t>>>0,Re(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&Le(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),Oe.read(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,n){return t=t>>>0,n||O(t,4,this.length),Oe.read(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,n){return t=t>>>0,n||O(t,8,this.length),Oe.read(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,n){return t=t>>>0,n||O(t,8,this.length),Oe.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 Lo(e,t,n,o,r){rr(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 er(e,t,n,o,r){rr(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=ne(function(t,n=0){return Lo(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))});a.prototype.writeBigUInt64BE=ne(function(t,n=0){return er(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=ne(function(t,n=0){return Lo(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});a.prototype.writeBigInt64BE=ne(function(t,n=0){return er(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function tr(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 nr(e,t,n,o,r){return t=+t,n=n>>>0,r||tr(e,t,n,4,34028234663852886e22,-34028234663852886e22),Oe.write(e,t,n,o,23,4),n+4}a.prototype.writeFloatLE=function(t,n,o){return nr(this,t,n,!0,o)};a.prototype.writeFloatBE=function(t,n,o){return nr(this,t,n,!1,o)};function or(e,t,n,o,r){return t=+t,n=n>>>0,r||tr(e,t,n,8,17976931348623157e292,-17976931348623157e292),Oe.write(e,t,n,o,52,8),n+8}a.prototype.writeDoubleLE=function(t,n,o){return or(this,t,n,!0,o)};a.prototype.writeDoubleBE=function(t,n,o){return or(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 ge={};function yo(e,t,n){ge[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}`}}}yo("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);yo("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);yo("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=Jo(String(n)):typeof n=="bigint"&&(r=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(r=Jo(r)),r+="n"),o+=` It must be ${t}. Received ${r}`,o},RangeError);function Jo(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 Mi(e,t,n){Re(t,"offset"),(e[t]===void 0||e[t+n]===void 0)&&Le(t,e.length-(n+1))}function rr(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 ge.ERR_OUT_OF_RANGE("value",c,e)}Mi(o,r,i)}function Re(e,t){if(typeof e!="number")throw new ge.ERR_INVALID_ARG_TYPE(t,"number",e)}function Le(e,t,n){throw Math.floor(e)!==e?(Re(e,n),new ge.ERR_OUT_OF_RANGE(n||"offset","an integer",e)):t<0?new ge.ERR_BUFFER_OUT_OF_BOUNDS:new ge.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}var Ai=/[^+/0-9A-Za-z-_]/g;function Bi(e){if(e=e.split("=")[0],e=e.trim().replace(Ai,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function fo(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 Ei(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function qi(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 ir(e){return po.toByteArray(Bi(e))}function ut(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 go(e){return e!==e}var Ui=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 ne(e){return typeof BigInt>"u"?Gi:e}function Gi(){throw new Error("BigInt not supported")}});var ur=De((Oo,cr)=>{var _t=sr(),D=_t.Buffer;function ar(e,t){for(var n in e)t[n]=e[n]}D.from&&D.alloc&&D.allocUnsafe&&D.allocUnsafeSlow?cr.exports=_t:(ar(_t,Oo),Oo.Buffer=ve);function ve(e,t,n){return D(e,t,n)}ar(D,ve);ve.from=function(e,t,n){if(typeof e=="number")throw new TypeError("Argument must not be a number");return D(e,t,n)};ve.alloc=function(e,t,n){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=D(e);return t!==void 0?typeof n=="string"?o.fill(t,n):o.fill(t):o.fill(0),o};ve.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return D(e)};ve.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _t.SlowBuffer(e)}});var _r=De((aa,ho)=>{"use strict";var Ro=65536,Ki=4294967295;function Hi(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var ji=ur().Buffer,dt=window.crypto||window.msCrypto;dt&&dt.getRandomValues?ho.exports=Wi:ho.exports=Hi;function Wi(e,t){if(e>Ki)throw new RangeError("requested too many random bytes");var n=ji.allocUnsafe(e);if(e>0)if(e>Ro)for(var o=0;o<e;o+=Ro)dt.getRandomValues(n.slice(o,o+Ro));else dt.getRandomValues(n);return typeof t=="function"?process.nextTick(function(){t(null,n)}):n}});import{Actor as Hs}from"@dfinity/agent";import{AccountIdentifier as Fo,SubAccount as js,checkAccountId as Lr}from"@dfinity/ledger-icp";import{arrayOfNumberToUint8Array as Ws,asciiStringToByteArray as $s,assertPercentageNumber as Vo,createServices as Xs,fromNullable as k,isNullish as ot,nonNullish as K,uint8ArrayToBigInt as ei}from"@dfinity/utils";function ri(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function io(e,...t){if(!ri(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 so(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 Bo(e,t){io(e);let n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}var it=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),M=(e,t)=>e<<32-t|e>>>t;var Ys=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ii(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function ao(e){return typeof e=="string"&&(e=ii(e)),io(e),e}var rt=class{clone(){return this._cloneInto()}},Qs={}.toString;function Eo(e){let t=o=>e().update(ao(o)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function si(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 qo=(e,t,n)=>e&t^~e&n,Uo=(e,t,n)=>e&t^e&n^t&n,st=class extends rt{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=it(this.buffer)}update(t){so(this);let{view:n,buffer:o,blockLen:r}=this;t=ao(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=it(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){so(this),Bo(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 d=s;d<r;d++)n[d]=0;si(o,r-8,BigInt(this.length*8),i),this.process(o,0);let c=it(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let l=u/4,p=this.get();if(l>p.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)c.setUint32(4*d,p[d],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 ai=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]),ee=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),te=new Uint32Array(64),co=class extends st{constructor(){super(64,32,8,!1),this.A=ee[0]|0,this.B=ee[1]|0,this.C=ee[2]|0,this.D=ee[3]|0,this.E=ee[4]|0,this.F=ee[5]|0,this.G=ee[6]|0,this.H=ee[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 d=0;d<16;d++,n+=4)te[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){let m=te[d-15],y=te[d-2],A=M(m,7)^M(m,18)^m>>>3,H=M(y,17)^M(y,19)^y>>>10;te[d]=H+te[d-7]+A+te[d-16]|0}let{A:o,B:r,C:i,D:s,E:c,F:u,G:l,H:p}=this;for(let d=0;d<64;d++){let m=M(c,6)^M(c,11)^M(c,25),y=p+m+qo(c,u,l)+ai[d]+te[d]|0,H=(M(o,2)^M(o,13)^M(o,22))+Uo(o,r,i)|0;p=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,p=p+this.H|0,this.set(o,r,i,s,c,u,l,p)}roundClean(){te.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var Go=Eo(()=>new co);var Mo=oi(_r());var dr=({IDL:e})=>{let t=e.Rec(),n=e.Rec(),o=e.Record({id:e.Nat64}),r=e.Record({followees:e.Vec(o)}),i=e.Record({name:e.Text,description:e.Opt(e.Text)}),s=e.Record({id:e.Opt(o),known_neuron_data:e.Opt(i)}),c=e.Record({percentage_to_spawn:e.Opt(e.Nat32),new_controller:e.Opt(e.Principal),nonce:e.Opt(e.Nat64)}),u=e.Record({amount_e8s:e.Nat64}),l=e.Record({topic:e.Int32,followees:e.Vec(o)}),p=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),d=e.Variant({NeuronIdOrSubaccount:e.Record({}),MemoAndController:p,Memo:e.Nat64}),m=e.Record({by:e.Opt(d)}),y=e.Record({hot_key_to_remove:e.Opt(e.Principal)}),A=e.Record({new_hot_key:e.Opt(e.Principal)}),H=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),Ot=e.Record({additional_dissolve_delay_seconds:e.Nat32}),Rt=e.Record({visibility:e.Opt(e.Int32)}),ht=e.Record({dissolve_timestamp_seconds:e.Nat64}),vt=e.Variant({RemoveHotKey:y,AddHotKey:A,ChangeAutoStakeMaturity:H,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:Ot,SetVisibility:Rt,JoinCommunityFund:e.Record({}),LeaveCommunityFund:e.Record({}),SetDissolveTimestamp:ht}),ae=e.Record({operation:e.Opt(vt)}),xe=e.Record({vote:e.Int32,proposal:e.Opt(o)}),ce=e.Record({source_neuron_id:e.Opt(o)}),ue=e.Record({dissolve_delay_seconds:e.Nat64,kyc_verified:e.Bool,amount_e8s:e.Nat64,new_controller:e.Opt(e.Principal),nonce:e.Nat64}),Se=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),_e=e.Record({percentage_to_merge:e.Nat32}),j=e.Record({hash:e.Vec(e.Nat8)}),bt=e.Record({e8s:e.Nat64}),de=e.Record({to_account:e.Opt(j),amount:e.Opt(bt)}),xt=e.Variant({Spawn:c,Split:u,Follow:l,ClaimOrRefresh:m,Configure:ae,RegisterVote:xe,Merge:ce,DisburseToNeuron:ue,MakeProposal:n,StakeMaturity:Se,MergeMaturity:_e,Disburse:de}),W=e.Variant({Subaccount:e.Vec(e.Nat8),NeuronId:o}),St=e.Record({id:e.Opt(o),command:e.Opt(xt),neuron_id_or_subaccount:e.Opt(W)}),kt=e.Record({controllers:e.Vec(e.Principal)}),Tt=e.Record({freezing_threshold:e.Opt(e.Nat64),controllers:e.Opt(kt),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)}),ke=e.Record({canister_id:e.Opt(e.Principal),settings:e.Opt(Tt)}),Ct=e.Record({skip_stopping_before_installing:e.Opt(e.Bool),wasm_module_hash:e.Opt(e.Vec(e.Nat8)),canister_id:e.Opt(e.Principal),arg_hash:e.Opt(e.Vec(e.Nat8)),install_mode:e.Opt(e.Int32)}),Te=e.Record({action:e.Opt(e.Int32),canister_id:e.Opt(e.Principal)}),T=e.Record({basis_points:e.Opt(e.Nat64)}),g=e.Record({seconds:e.Opt(e.Nat64)}),f=e.Record({e8s:e.Opt(e.Nat64)}),Pt=e.Record({reward_rate_transition_duration:e.Opt(g),initial_reward_rate:e.Opt(T),final_reward_rate:e.Opt(T)}),Ft=e.Record({neuron_maximum_dissolve_delay_bonus:e.Opt(T),neuron_maximum_age_for_age_bonus:e.Opt(g),neuron_maximum_dissolve_delay:e.Opt(g),neuron_minimum_dissolve_delay_to_vote:e.Opt(g),neuron_maximum_age_bonus:e.Opt(T),neuron_minimum_stake:e.Opt(f),proposal_wait_for_quiet_deadline_increase:e.Opt(g),proposal_initial_voting_period:e.Opt(g),proposal_rejection_fee:e.Opt(f),voting_reward_parameters:e.Opt(Pt)}),Ce=e.Record({base64_encoding:e.Opt(e.Text)}),Vt=e.Record({transaction_fee:e.Opt(f),token_symbol:e.Opt(e.Text),token_logo:e.Opt(Ce),token_name:e.Opt(e.Text)}),Mt=e.Record({id:e.Opt(e.Principal)}),At=e.Record({dissolve_delay_interval:e.Opt(g),count:e.Opt(e.Nat64)}),Bt=e.Record({seconds_after_utc_midnight:e.Opt(e.Nat64)}),Et=e.Record({iso_codes:e.Vec(e.Text)}),qt=e.Record({minimum_participants:e.Opt(e.Nat64),neurons_fund_participation:e.Opt(e.Bool),duration:e.Opt(g),neuron_basket_construction_parameters:e.Opt(At),confirmation_text:e.Opt(e.Text),maximum_participant_icp:e.Opt(f),minimum_icp:e.Opt(f),minimum_direct_participation_icp:e.Opt(f),minimum_participant_icp:e.Opt(f),start_time:e.Opt(Bt),maximum_direct_participation_icp:e.Opt(f),maximum_icp:e.Opt(f),neurons_fund_investment_icp:e.Opt(f),restricted_countries:e.Opt(Et)}),Pe=e.Record({total:e.Opt(f)}),Ut=e.Record({controller:e.Opt(e.Principal),dissolve_delay:e.Opt(g),memo:e.Opt(e.Nat64),vesting_period:e.Opt(g),stake:e.Opt(f)}),Gt=e.Record({developer_neurons:e.Vec(Ut)}),Kt=e.Record({treasury_distribution:e.Opt(Pe),developer_distribution:e.Opt(Gt),swap_distribution:e.Opt(Pe)}),Fe=e.Record({url:e.Opt(e.Text),governance_parameters:e.Opt(Ft),fallback_controller_principal_ids:e.Vec(e.Principal),logo:e.Opt(Ce),name:e.Opt(e.Text),ledger_parameters:e.Opt(Vt),description:e.Opt(e.Text),dapp_canisters:e.Vec(Mt),swap_parameters:e.Opt(qt),initial_token_distribution:e.Opt(Kt)}),Ve=e.Record({nns_function:e.Int32,payload:e.Vec(e.Nat8)}),v=e.Record({id:e.Opt(e.Principal),reward_account:e.Opt(j)}),Ht=e.Record({dissolve_delay_seconds:e.Nat64}),jt=e.Record({to_account:e.Opt(j)}),Wt=e.Variant({RewardToNeuron:Ht,RewardToAccount:jt}),$=e.Record({node_provider:e.Opt(v),reward_mode:e.Opt(Wt),amount_e8s:e.Nat64}),$t=e.Record({dissolve_delay_interval_seconds:e.Nat64,count:e.Nat64}),Xt=e.Record({min_participant_icp_e8s:e.Nat64,neuron_basket_construction_parameters:e.Opt($t),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)}),Me=e.Record({community_fund_investment_e8s:e.Opt(e.Nat64),target_swap_canister_id:e.Opt(e.Principal),params:e.Opt(Xt)}),zt=e.Record({start_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Nat64}),Jt=e.Record({open_time_window:e.Opt(zt)}),Ae=e.Record({request:e.Opt(Jt),swap_canister_id:e.Opt(e.Principal)}),Be=e.Record({default_followees:e.Vec(e.Tuple(e.Int32,r))}),pe=e.Record({use_registry_derived_rewards:e.Opt(e.Bool),rewards:e.Vec($)}),X=e.Record({human_readable:e.Opt(e.Text)}),Yt=e.Record({contribution_threshold_xdr:e.Opt(X),one_third_participation_milestone_xdr:e.Opt(X),full_participation_milestone_xdr:e.Opt(X)}),Qt=e.Record({maximum_icp_xdr_rate:e.Opt(T),neurons_fund_matched_funding_curve_coefficients:e.Opt(Yt),max_theoretical_neurons_fund_participation_amount_xdr:e.Opt(X),minimum_icp_xdr_rate:e.Opt(T)}),z=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(Qt)}),J=e.Record({principals:e.Vec(e.Principal)}),Zt=e.Variant({ToRemove:v,ToAdd:v}),Ee=e.Record({change:e.Opt(Zt)}),qe=e.Record({motion_text:e.Text}),It=e.Variant({RegisterKnownNeuron:s,ManageNeuron:St,UpdateCanisterSettings:ke,InstallCode:Ct,StopOrStartCanister:Te,CreateServiceNervousSystem:Fe,ExecuteNnsFunction:Ve,RewardNodeProvider:$,OpenSnsTokenSwap:Me,SetSnsTokenSwapOpenTimeWindow:Ae,SetDefaultFollowees:Be,RewardNodeProviders:pe,ManageNetworkEconomics:z,ApproveGenesisKyc:J,AddOrRemoveNodeProvider:Ee,Motion:qe});n.fill(e.Record({url:e.Text,title:e.Opt(e.Text),action:e.Opt(It),summary:e.Text}));let Dt=e.Record({proposal:e.Opt(n),caller:e.Opt(e.Principal),proposer_id:e.Opt(o)}),Ue=e.Record({xdr_permyriad_per_icp:e.Opt(e.Nat64),timestamp_seconds:e.Opt(e.Nat64)}),le=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($),xdr_conversion_rate:e.Opt(Ue),maximum_node_provider_rewards_e8s:e.Opt(e.Nat64)}),Ge=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))}),Ke=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(Ge),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)),public_neuron_subset_metrics:e.Opt(Ge),timestamp_seconds:e.Nat64,seed_neuron_count:e.Nat64}),Lt=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}),He=e.Record({groups:e.Vec(Lt),timestamp_seconds:e.Opt(e.Nat64)}),je=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(o)}),We=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}),en=e.Record({followers:e.Vec(o)}),tn=e.Record({followers_map:e.Vec(e.Tuple(e.Nat64,en))}),nn=e.Variant({LastNeuronId:o}),$e=e.Record({status:e.Opt(e.Int32),failure_reason:e.Opt(e.Text),progress:e.Opt(nn)}),on=e.Record({neuron_indexes_migration:e.Opt($e),copy_inactive_neurons_to_stable_memory_migration:e.Opt($e)}),N=e.Record({error_message:e.Text,error_type:e.Int32}),rn=e.Record({has_created_neuron_recipes:e.Opt(e.Bool),hotkeys:e.Opt(J),nns_neuron_id:e.Nat64,amount_icp_e8s:e.Nat64}),sn=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Text,cf_neurons:e.Vec(rn)}),Xe=e.Record({vote:e.Int32,voting_power:e.Nat64}),an=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)}),cn=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(o),amount_icp_e8s:e.Opt(e.Nat64)}),me=e.Record({neurons_fund_neuron_portions:e.Vec(cn)}),un=e.Record({serialized_representation:e.Opt(e.Text)}),Y=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(an),max_neurons_fund_swap_participation_icp_e8s:e.Opt(e.Nat64),neurons_fund_reserves:e.Opt(me),ideal_matched_participation_function:e.Opt(un),allocated_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64)}),_n=e.Record({final_neurons_fund_participation:e.Opt(Y),initial_neurons_fund_participation:e.Opt(Y),neurons_fund_refunds:e.Opt(me)}),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)}),ze=e.Record({swap_background_information:e.Opt(pn)}),Je=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),ln=e.Record({current_deadline_timestamp_seconds:e.Nat64}),mn=e.Record({id:e.Opt(o),failure_reason:e.Opt(N),cf_participants:e.Vec(sn),ballots:e.Vec(e.Tuple(e.Nat64,Xe)),proposal_timestamp_seconds:e.Nat64,reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,neurons_fund_data:e.Opt(_n),reject_cost_e8s:e.Nat64,derived_proposal_information:e.Opt(ze),latest_tally:e.Opt(Je),sns_token_swap_lifecycle:e.Opt(e.Int32),decided_timestamp_seconds:e.Nat64,proposal:e.Opt(n),proposer:e.Opt(o),wait_for_quiet_state:e.Opt(ln),executed_timestamp_seconds:e.Nat64,original_total_community_fund_maturity_e8s_equivalent:e.Opt(e.Nat64)}),fn=e.Variant({Spawn:o,Split:u,Configure:ae,Merge:ce,DisburseToNeuron:ue,SyncCommand:e.Record({}),ClaimOrRefreshNeuron:m,MergeMaturity:_e,Disburse:de}),Nn=e.Record({command:e.Opt(fn),timestamp:e.Nat64}),Ye=e.Record({vote:e.Int32,proposal_id:e.Opt(o)}),wn=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),V=e.Record({id:e.Opt(o),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),controller:e.Opt(e.Principal),recent_ballots:e.Vec(Ye),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(wn),followees:e.Vec(e.Tuple(e.Int32,r)),neuron_fees_e8s:e.Nat64,visibility:e.Opt(e.Int32),transfer:e.Opt(We),known_neuron_data:e.Opt(i),spawn_at_timestamp_seconds:e.Opt(e.Nat64)}),ni=e.Record({default_followees:e.Vec(e.Tuple(e.Int32,r)),making_sns_proposal:e.Opt(Dt),most_recent_monthly_node_provider_rewards:e.Opt(le),maturity_modulation_last_updated_at_timestamp_seconds:e.Opt(e.Nat64),wait_for_quiet_threshold_seconds:e.Nat64,metrics:e.Opt(Ke),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(z),restore_aging_summary:e.Opt(He),spawning_neurons:e.Opt(e.Bool),latest_reward_event:e.Opt(je),to_claim_transfers:e.Vec(We),short_voting_period_seconds:e.Nat64,topic_followee_index:e.Vec(e.Tuple(e.Int32,tn)),migrations:e.Opt(on),proposals:e.Vec(e.Tuple(e.Nat64,mn)),xdr_conversion_rate:e.Opt(Ue),in_flight_commands:e.Vec(e.Tuple(e.Nat64,Nn)),neurons:e.Vec(e.Tuple(e.Nat64,V)),genesis_timestamp_seconds:e.Nat64}),Q=e.Variant({Ok:e.Null,Err:N}),yn=e.Variant({Error:N,NeuronId:o}),gn=e.Record({result:e.Opt(yn)}),Qe=e.Variant({Ok:V,Err:N}),On=e.Variant({Ok:Ke,Err:N}),Rn=e.Variant({Ok:pe,Err:N}),Z=e.Record({dissolve_delay_seconds:e.Nat64,recent_ballots:e.Vec(Ye),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(i),voting_power:e.Nat64,age_seconds:e.Nat64}),Ze=e.Variant({Ok:Z,Err:N}),hn=e.Record({nns_proposal_id:e.Opt(o)}),vn=e.Record({final_neurons_fund_participation:e.Opt(Y),initial_neurons_fund_participation:e.Opt(Y),neurons_fund_refunds:e.Opt(me)}),bn=e.Record({neurons_fund_audit_info:e.Opt(vn)}),xn=e.Variant({Ok:bn,Err:N}),Sn=e.Record({result:e.Opt(xn)}),kn=e.Variant({Ok:v,Err:N}),fe=e.Record({id:e.Opt(o),status:e.Int32,topic:e.Int32,failure_reason:e.Opt(N),ballots:e.Vec(e.Tuple(e.Nat64,Xe)),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(ze),latest_tally:e.Opt(Je),reward_status:e.Int32,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(n),proposer:e.Opt(o),executed_timestamp_seconds:e.Nat64}),Tn=e.Record({known_neurons:e.Vec(s)}),Cn=e.Record({include_public_neurons_in_full_neurons:e.Opt(e.Bool),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(V)}),Fn=e.Record({start_timestamp_seconds:e.Opt(e.Nat64),end_timestamp_seconds:e.Opt(e.Nat64)}),Vn=e.Record({date_filter:e.Opt(Fn)}),Mn=e.Record({rewards:e.Vec(le)}),An=e.Record({node_providers:e.Vec(v)}),Bn=e.Record({include_reward_status:e.Vec(e.Int32),omit_large_fields:e.Opt(e.Bool),before_proposal:e.Opt(o),limit:e.Nat32,exclude_topic:e.Vec(e.Int32),include_all_manage_neuron_proposals:e.Opt(e.Bool),include_status:e.Vec(e.Int32)}),En=e.Record({proposal_info:e.Vec(fe)}),qn=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)}),Un=e.Variant({RegisterKnownNeuron:s,ManageNeuron:t,UpdateCanisterSettings:ke,InstallCode:qn,StopOrStartCanister:Te,CreateServiceNervousSystem:Fe,ExecuteNnsFunction:Ve,RewardNodeProvider:$,OpenSnsTokenSwap:Me,SetSnsTokenSwapOpenTimeWindow:Ae,SetDefaultFollowees:Be,RewardNodeProviders:pe,ManageNetworkEconomics:z,ApproveGenesisKyc:J,AddOrRemoveNodeProvider:Ee,Motion:qe}),Gn=e.Record({url:e.Text,title:e.Opt(e.Text),action:e.Opt(Un),summary:e.Text}),Kn=e.Variant({Spawn:c,Split:u,Follow:l,ClaimOrRefresh:m,Configure:ae,RegisterVote:xe,Merge:ce,DisburseToNeuron:ue,MakeProposal:Gn,StakeMaturity:Se,MergeMaturity:_e,Disburse:de});t.fill(e.Record({id:e.Opt(o),command:e.Opt(Kn),neuron_id_or_subaccount:e.Opt(W)}));let Ne=e.Record({created_neuron_id:e.Opt(o)}),Hn=e.Record({refreshed_neuron_id:e.Opt(o)}),jn=e.Record({target_neuron:e.Opt(V),source_neuron:e.Opt(V),target_neuron_info:e.Opt(Z),source_neuron_info:e.Opt(Z)}),Wn=e.Record({message:e.Opt(e.Text),proposal_id:e.Opt(o)}),$n=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),Xn=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),zn=e.Record({transfer_block_height:e.Nat64}),Jn=e.Variant({Error:N,Spawn:Ne,Split:Ne,Follow:e.Record({}),ClaimOrRefresh:Hn,Configure:e.Record({}),RegisterVote:e.Record({}),Merge:jn,DisburseToNeuron:Ne,MakeProposal:Wn,StakeMaturity:$n,MergeMaturity:Xn,Disburse:zn}),Ie=e.Record({command:e.Opt(Jn)}),Yn=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)}),Qn=e.Variant({Committed:Yn,Aborted:e.Record({})}),Zn=e.Record({result:e.Opt(Qn),open_sns_token_swap_proposal_id:e.Opt(e.Nat64)}),In=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)}),Dn=e.Variant({Committed:In,Aborted:e.Record({})}),Ln=e.Record({result:e.Opt(Dn),nns_proposal_id:e.Opt(e.Nat64)}),eo=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Opt(e.Text),hotkeys:e.Opt(J),is_capped:e.Opt(e.Bool),nns_neuron_id:e.Opt(e.Nat64),amount_icp_e8s:e.Opt(e.Nat64)}),to=e.Record({neurons_fund_neuron_portions:e.Vec(eo)}),no=e.Variant({Ok:to,Err:N}),oo=e.Record({result:e.Opt(no)}),ro=e.Record({reward_account:e.Opt(j)});return e.Service({claim_gtc_neurons:e.Func([e.Principal,e.Vec(o)],[Q],[]),claim_or_refresh_neuron_from_account:e.Func([p],[gn],[]),get_build_metadata:e.Func([],[e.Text],[]),get_full_neuron:e.Func([e.Nat64],[Qe],[]),get_full_neuron_by_id_or_subaccount:e.Func([W],[Qe],[]),get_latest_reward_event:e.Func([],[je],[]),get_metrics:e.Func([],[On],[]),get_monthly_node_provider_rewards:e.Func([],[Rn],[]),get_most_recent_monthly_node_provider_rewards:e.Func([],[e.Opt(le)],[]),get_network_economics_parameters:e.Func([],[z],[]),get_neuron_ids:e.Func([],[e.Vec(e.Nat64)],[]),get_neuron_info:e.Func([e.Nat64],[Ze],[]),get_neuron_info_by_id_or_subaccount:e.Func([W],[Ze],[]),get_neurons_fund_audit_info:e.Func([hn],[Sn],[]),get_node_provider_by_caller:e.Func([e.Null],[kn],[]),get_pending_proposals:e.Func([],[e.Vec(fe)],[]),get_proposal_info:e.Func([e.Nat64],[e.Opt(fe)],[]),get_restore_aging_summary:e.Func([],[He],[]),list_known_neurons:e.Func([],[Tn],[]),list_neurons:e.Func([Cn],[Pn],[]),list_node_provider_rewards:e.Func([Vn],[Mn],[]),list_node_providers:e.Func([],[An],[]),list_proposals:e.Func([Bn],[En],[]),manage_neuron:e.Func([t],[Ie],[]),settle_community_fund_participation:e.Func([Zn],[Q],[]),settle_neurons_fund_participation:e.Func([Ln],[oo],[]),simulate_manage_neuron:e.Func([t],[Ie],[]),transfer_gtc_neuron:e.Func([o,o],[Q],[]),update_node_provider:e.Func([ro],[Q],[])})};var pr=({IDL:e})=>{let t=e.Rec(),n=e.Rec(),o=e.Record({id:e.Nat64}),r=e.Record({followees:e.Vec(o)}),i=e.Record({name:e.Text,description:e.Opt(e.Text)}),s=e.Record({id:e.Opt(o),known_neuron_data:e.Opt(i)}),c=e.Record({percentage_to_spawn:e.Opt(e.Nat32),new_controller:e.Opt(e.Principal),nonce:e.Opt(e.Nat64)}),u=e.Record({amount_e8s:e.Nat64}),l=e.Record({topic:e.Int32,followees:e.Vec(o)}),p=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),d=e.Variant({NeuronIdOrSubaccount:e.Record({}),MemoAndController:p,Memo:e.Nat64}),m=e.Record({by:e.Opt(d)}),y=e.Record({hot_key_to_remove:e.Opt(e.Principal)}),A=e.Record({new_hot_key:e.Opt(e.Principal)}),H=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),Ot=e.Record({additional_dissolve_delay_seconds:e.Nat32}),Rt=e.Record({visibility:e.Opt(e.Int32)}),ht=e.Record({dissolve_timestamp_seconds:e.Nat64}),vt=e.Variant({RemoveHotKey:y,AddHotKey:A,ChangeAutoStakeMaturity:H,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:Ot,SetVisibility:Rt,JoinCommunityFund:e.Record({}),LeaveCommunityFund:e.Record({}),SetDissolveTimestamp:ht}),ae=e.Record({operation:e.Opt(vt)}),xe=e.Record({vote:e.Int32,proposal:e.Opt(o)}),ce=e.Record({source_neuron_id:e.Opt(o)}),ue=e.Record({dissolve_delay_seconds:e.Nat64,kyc_verified:e.Bool,amount_e8s:e.Nat64,new_controller:e.Opt(e.Principal),nonce:e.Nat64}),Se=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),_e=e.Record({percentage_to_merge:e.Nat32}),j=e.Record({hash:e.Vec(e.Nat8)}),bt=e.Record({e8s:e.Nat64}),de=e.Record({to_account:e.Opt(j),amount:e.Opt(bt)}),xt=e.Variant({Spawn:c,Split:u,Follow:l,ClaimOrRefresh:m,Configure:ae,RegisterVote:xe,Merge:ce,DisburseToNeuron:ue,MakeProposal:n,StakeMaturity:Se,MergeMaturity:_e,Disburse:de}),W=e.Variant({Subaccount:e.Vec(e.Nat8),NeuronId:o}),St=e.Record({id:e.Opt(o),command:e.Opt(xt),neuron_id_or_subaccount:e.Opt(W)}),kt=e.Record({controllers:e.Vec(e.Principal)}),Tt=e.Record({freezing_threshold:e.Opt(e.Nat64),controllers:e.Opt(kt),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)}),ke=e.Record({canister_id:e.Opt(e.Principal),settings:e.Opt(Tt)}),Ct=e.Record({skip_stopping_before_installing:e.Opt(e.Bool),wasm_module_hash:e.Opt(e.Vec(e.Nat8)),canister_id:e.Opt(e.Principal),arg_hash:e.Opt(e.Vec(e.Nat8)),install_mode:e.Opt(e.Int32)}),Te=e.Record({action:e.Opt(e.Int32),canister_id:e.Opt(e.Principal)}),T=e.Record({basis_points:e.Opt(e.Nat64)}),g=e.Record({seconds:e.Opt(e.Nat64)}),f=e.Record({e8s:e.Opt(e.Nat64)}),Pt=e.Record({reward_rate_transition_duration:e.Opt(g),initial_reward_rate:e.Opt(T),final_reward_rate:e.Opt(T)}),Ft=e.Record({neuron_maximum_dissolve_delay_bonus:e.Opt(T),neuron_maximum_age_for_age_bonus:e.Opt(g),neuron_maximum_dissolve_delay:e.Opt(g),neuron_minimum_dissolve_delay_to_vote:e.Opt(g),neuron_maximum_age_bonus:e.Opt(T),neuron_minimum_stake:e.Opt(f),proposal_wait_for_quiet_deadline_increase:e.Opt(g),proposal_initial_voting_period:e.Opt(g),proposal_rejection_fee:e.Opt(f),voting_reward_parameters:e.Opt(Pt)}),Ce=e.Record({base64_encoding:e.Opt(e.Text)}),Vt=e.Record({transaction_fee:e.Opt(f),token_symbol:e.Opt(e.Text),token_logo:e.Opt(Ce),token_name:e.Opt(e.Text)}),Mt=e.Record({id:e.Opt(e.Principal)}),At=e.Record({dissolve_delay_interval:e.Opt(g),count:e.Opt(e.Nat64)}),Bt=e.Record({seconds_after_utc_midnight:e.Opt(e.Nat64)}),Et=e.Record({iso_codes:e.Vec(e.Text)}),qt=e.Record({minimum_participants:e.Opt(e.Nat64),neurons_fund_participation:e.Opt(e.Bool),duration:e.Opt(g),neuron_basket_construction_parameters:e.Opt(At),confirmation_text:e.Opt(e.Text),maximum_participant_icp:e.Opt(f),minimum_icp:e.Opt(f),minimum_direct_participation_icp:e.Opt(f),minimum_participant_icp:e.Opt(f),start_time:e.Opt(Bt),maximum_direct_participation_icp:e.Opt(f),maximum_icp:e.Opt(f),neurons_fund_investment_icp:e.Opt(f),restricted_countries:e.Opt(Et)}),Pe=e.Record({total:e.Opt(f)}),Ut=e.Record({controller:e.Opt(e.Principal),dissolve_delay:e.Opt(g),memo:e.Opt(e.Nat64),vesting_period:e.Opt(g),stake:e.Opt(f)}),Gt=e.Record({developer_neurons:e.Vec(Ut)}),Kt=e.Record({treasury_distribution:e.Opt(Pe),developer_distribution:e.Opt(Gt),swap_distribution:e.Opt(Pe)}),Fe=e.Record({url:e.Opt(e.Text),governance_parameters:e.Opt(Ft),fallback_controller_principal_ids:e.Vec(e.Principal),logo:e.Opt(Ce),name:e.Opt(e.Text),ledger_parameters:e.Opt(Vt),description:e.Opt(e.Text),dapp_canisters:e.Vec(Mt),swap_parameters:e.Opt(qt),initial_token_distribution:e.Opt(Kt)}),Ve=e.Record({nns_function:e.Int32,payload:e.Vec(e.Nat8)}),v=e.Record({id:e.Opt(e.Principal),reward_account:e.Opt(j)}),Ht=e.Record({dissolve_delay_seconds:e.Nat64}),jt=e.Record({to_account:e.Opt(j)}),Wt=e.Variant({RewardToNeuron:Ht,RewardToAccount:jt}),$=e.Record({node_provider:e.Opt(v),reward_mode:e.Opt(Wt),amount_e8s:e.Nat64}),$t=e.Record({dissolve_delay_interval_seconds:e.Nat64,count:e.Nat64}),Xt=e.Record({min_participant_icp_e8s:e.Nat64,neuron_basket_construction_parameters:e.Opt($t),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)}),Me=e.Record({community_fund_investment_e8s:e.Opt(e.Nat64),target_swap_canister_id:e.Opt(e.Principal),params:e.Opt(Xt)}),zt=e.Record({start_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Nat64}),Jt=e.Record({open_time_window:e.Opt(zt)}),Ae=e.Record({request:e.Opt(Jt),swap_canister_id:e.Opt(e.Principal)}),Be=e.Record({default_followees:e.Vec(e.Tuple(e.Int32,r))}),pe=e.Record({use_registry_derived_rewards:e.Opt(e.Bool),rewards:e.Vec($)}),X=e.Record({human_readable:e.Opt(e.Text)}),Yt=e.Record({contribution_threshold_xdr:e.Opt(X),one_third_participation_milestone_xdr:e.Opt(X),full_participation_milestone_xdr:e.Opt(X)}),Qt=e.Record({maximum_icp_xdr_rate:e.Opt(T),neurons_fund_matched_funding_curve_coefficients:e.Opt(Yt),max_theoretical_neurons_fund_participation_amount_xdr:e.Opt(X),minimum_icp_xdr_rate:e.Opt(T)}),z=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(Qt)}),J=e.Record({principals:e.Vec(e.Principal)}),Zt=e.Variant({ToRemove:v,ToAdd:v}),Ee=e.Record({change:e.Opt(Zt)}),qe=e.Record({motion_text:e.Text}),It=e.Variant({RegisterKnownNeuron:s,ManageNeuron:St,UpdateCanisterSettings:ke,InstallCode:Ct,StopOrStartCanister:Te,CreateServiceNervousSystem:Fe,ExecuteNnsFunction:Ve,RewardNodeProvider:$,OpenSnsTokenSwap:Me,SetSnsTokenSwapOpenTimeWindow:Ae,SetDefaultFollowees:Be,RewardNodeProviders:pe,ManageNetworkEconomics:z,ApproveGenesisKyc:J,AddOrRemoveNodeProvider:Ee,Motion:qe});n.fill(e.Record({url:e.Text,title:e.Opt(e.Text),action:e.Opt(It),summary:e.Text}));let Dt=e.Record({proposal:e.Opt(n),caller:e.Opt(e.Principal),proposer_id:e.Opt(o)}),Ue=e.Record({xdr_permyriad_per_icp:e.Opt(e.Nat64),timestamp_seconds:e.Opt(e.Nat64)}),le=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($),xdr_conversion_rate:e.Opt(Ue),maximum_node_provider_rewards_e8s:e.Opt(e.Nat64)}),Ge=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))}),Ke=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(Ge),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)),public_neuron_subset_metrics:e.Opt(Ge),timestamp_seconds:e.Nat64,seed_neuron_count:e.Nat64}),Lt=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}),He=e.Record({groups:e.Vec(Lt),timestamp_seconds:e.Opt(e.Nat64)}),je=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(o)}),We=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}),en=e.Record({followers:e.Vec(o)}),tn=e.Record({followers_map:e.Vec(e.Tuple(e.Nat64,en))}),nn=e.Variant({LastNeuronId:o}),$e=e.Record({status:e.Opt(e.Int32),failure_reason:e.Opt(e.Text),progress:e.Opt(nn)}),on=e.Record({neuron_indexes_migration:e.Opt($e),copy_inactive_neurons_to_stable_memory_migration:e.Opt($e)}),N=e.Record({error_message:e.Text,error_type:e.Int32}),rn=e.Record({has_created_neuron_recipes:e.Opt(e.Bool),hotkeys:e.Opt(J),nns_neuron_id:e.Nat64,amount_icp_e8s:e.Nat64}),sn=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Text,cf_neurons:e.Vec(rn)}),Xe=e.Record({vote:e.Int32,voting_power:e.Nat64}),an=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)}),cn=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(o),amount_icp_e8s:e.Opt(e.Nat64)}),me=e.Record({neurons_fund_neuron_portions:e.Vec(cn)}),un=e.Record({serialized_representation:e.Opt(e.Text)}),Y=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(an),max_neurons_fund_swap_participation_icp_e8s:e.Opt(e.Nat64),neurons_fund_reserves:e.Opt(me),ideal_matched_participation_function:e.Opt(un),allocated_neurons_fund_participation_icp_e8s:e.Opt(e.Nat64)}),_n=e.Record({final_neurons_fund_participation:e.Opt(Y),initial_neurons_fund_participation:e.Opt(Y),neurons_fund_refunds:e.Opt(me)}),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)}),ze=e.Record({swap_background_information:e.Opt(pn)}),Je=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),ln=e.Record({current_deadline_timestamp_seconds:e.Nat64}),mn=e.Record({id:e.Opt(o),failure_reason:e.Opt(N),cf_participants:e.Vec(sn),ballots:e.Vec(e.Tuple(e.Nat64,Xe)),proposal_timestamp_seconds:e.Nat64,reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,neurons_fund_data:e.Opt(_n),reject_cost_e8s:e.Nat64,derived_proposal_information:e.Opt(ze),latest_tally:e.Opt(Je),sns_token_swap_lifecycle:e.Opt(e.Int32),decided_timestamp_seconds:e.Nat64,proposal:e.Opt(n),proposer:e.Opt(o),wait_for_quiet_state:e.Opt(ln),executed_timestamp_seconds:e.Nat64,original_total_community_fund_maturity_e8s_equivalent:e.Opt(e.Nat64)}),fn=e.Variant({Spawn:o,Split:u,Configure:ae,Merge:ce,DisburseToNeuron:ue,SyncCommand:e.Record({}),ClaimOrRefreshNeuron:m,MergeMaturity:_e,Disburse:de}),Nn=e.Record({command:e.Opt(fn),timestamp:e.Nat64}),Ye=e.Record({vote:e.Int32,proposal_id:e.Opt(o)}),wn=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),V=e.Record({id:e.Opt(o),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),controller:e.Opt(e.Principal),recent_ballots:e.Vec(Ye),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(wn),followees:e.Vec(e.Tuple(e.Int32,r)),neuron_fees_e8s:e.Nat64,visibility:e.Opt(e.Int32),transfer:e.Opt(We),known_neuron_data:e.Opt(i),spawn_at_timestamp_seconds:e.Opt(e.Nat64)}),ni=e.Record({default_followees:e.Vec(e.Tuple(e.Int32,r)),making_sns_proposal:e.Opt(Dt),most_recent_monthly_node_provider_rewards:e.Opt(le),maturity_modulation_last_updated_at_timestamp_seconds:e.Opt(e.Nat64),wait_for_quiet_threshold_seconds:e.Nat64,metrics:e.Opt(Ke),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(z),restore_aging_summary:e.Opt(He),spawning_neurons:e.Opt(e.Bool),latest_reward_event:e.Opt(je),to_claim_transfers:e.Vec(We),short_voting_period_seconds:e.Nat64,topic_followee_index:e.Vec(e.Tuple(e.Int32,tn)),migrations:e.Opt(on),proposals:e.Vec(e.Tuple(e.Nat64,mn)),xdr_conversion_rate:e.Opt(Ue),in_flight_commands:e.Vec(e.Tuple(e.Nat64,Nn)),neurons:e.Vec(e.Tuple(e.Nat64,V)),genesis_timestamp_seconds:e.Nat64}),Q=e.Variant({Ok:e.Null,Err:N}),yn=e.Variant({Error:N,NeuronId:o}),gn=e.Record({result:e.Opt(yn)}),Qe=e.Variant({Ok:V,Err:N}),On=e.Variant({Ok:Ke,Err:N}),Rn=e.Variant({Ok:pe,Err:N}),Z=e.Record({dissolve_delay_seconds:e.Nat64,recent_ballots:e.Vec(Ye),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(i),voting_power:e.Nat64,age_seconds:e.Nat64}),Ze=e.Variant({Ok:Z,Err:N}),hn=e.Record({nns_proposal_id:e.Opt(o)}),vn=e.Record({final_neurons_fund_participation:e.Opt(Y),initial_neurons_fund_participation:e.Opt(Y),neurons_fund_refunds:e.Opt(me)}),bn=e.Record({neurons_fund_audit_info:e.Opt(vn)}),xn=e.Variant({Ok:bn,Err:N}),Sn=e.Record({result:e.Opt(xn)}),kn=e.Variant({Ok:v,Err:N}),fe=e.Record({id:e.Opt(o),status:e.Int32,topic:e.Int32,failure_reason:e.Opt(N),ballots:e.Vec(e.Tuple(e.Nat64,Xe)),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(ze),latest_tally:e.Opt(Je),reward_status:e.Int32,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(n),proposer:e.Opt(o),executed_timestamp_seconds:e.Nat64}),Tn=e.Record({known_neurons:e.Vec(s)}),Cn=e.Record({include_public_neurons_in_full_neurons:e.Opt(e.Bool),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(V)}),Fn=e.Record({start_timestamp_seconds:e.Opt(e.Nat64),end_timestamp_seconds:e.Opt(e.Nat64)}),Vn=e.Record({date_filter:e.Opt(Fn)}),Mn=e.Record({rewards:e.Vec(le)}),An=e.Record({node_providers:e.Vec(v)}),Bn=e.Record({include_reward_status:e.Vec(e.Int32),omit_large_fields:e.Opt(e.Bool),before_proposal:e.Opt(o),limit:e.Nat32,exclude_topic:e.Vec(e.Int32),include_all_manage_neuron_proposals:e.Opt(e.Bool),include_status:e.Vec(e.Int32)}),En=e.Record({proposal_info:e.Vec(fe)}),qn=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)}),Un=e.Variant({RegisterKnownNeuron:s,ManageNeuron:t,UpdateCanisterSettings:ke,InstallCode:qn,StopOrStartCanister:Te,CreateServiceNervousSystem:Fe,ExecuteNnsFunction:Ve,RewardNodeProvider:$,OpenSnsTokenSwap:Me,SetSnsTokenSwapOpenTimeWindow:Ae,SetDefaultFollowees:Be,RewardNodeProviders:pe,ManageNetworkEconomics:z,ApproveGenesisKyc:J,AddOrRemoveNodeProvider:Ee,Motion:qe}),Gn=e.Record({url:e.Text,title:e.Opt(e.Text),action:e.Opt(Un),summary:e.Text}),Kn=e.Variant({Spawn:c,Split:u,Follow:l,ClaimOrRefresh:m,Configure:ae,RegisterVote:xe,Merge:ce,DisburseToNeuron:ue,MakeProposal:Gn,StakeMaturity:Se,MergeMaturity:_e,Disburse:de});t.fill(e.Record({id:e.Opt(o),command:e.Opt(Kn),neuron_id_or_subaccount:e.Opt(W)}));let Ne=e.Record({created_neuron_id:e.Opt(o)}),Hn=e.Record({refreshed_neuron_id:e.Opt(o)}),jn=e.Record({target_neuron:e.Opt(V),source_neuron:e.Opt(V),target_neuron_info:e.Opt(Z),source_neuron_info:e.Opt(Z)}),Wn=e.Record({message:e.Opt(e.Text),proposal_id:e.Opt(o)}),$n=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),Xn=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),zn=e.Record({transfer_block_height:e.Nat64}),Jn=e.Variant({Error:N,Spawn:Ne,Split:Ne,Follow:e.Record({}),ClaimOrRefresh:Hn,Configure:e.Record({}),RegisterVote:e.Record({}),Merge:jn,DisburseToNeuron:Ne,MakeProposal:Wn,StakeMaturity:$n,MergeMaturity:Xn,Disburse:zn}),Ie=e.Record({command:e.Opt(Jn)}),Yn=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)}),Qn=e.Variant({Committed:Yn,Aborted:e.Record({})}),Zn=e.Record({result:e.Opt(Qn),open_sns_token_swap_proposal_id:e.Opt(e.Nat64)}),In=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)}),Dn=e.Variant({Committed:In,Aborted:e.Record({})}),Ln=e.Record({result:e.Opt(Dn),nns_proposal_id:e.Opt(e.Nat64)}),eo=e.Record({controller:e.Opt(e.Principal),hotkey_principal:e.Opt(e.Text),hotkeys:e.Opt(J),is_capped:e.Opt(e.Bool),nns_neuron_id:e.Opt(e.Nat64),amount_icp_e8s:e.Opt(e.Nat64)}),to=e.Record({neurons_fund_neuron_portions:e.Vec(eo)}),no=e.Variant({Ok:to,Err:N}),oo=e.Record({result:e.Opt(no)}),ro=e.Record({reward_account:e.Opt(j)});return e.Service({claim_gtc_neurons:e.Func([e.Principal,e.Vec(o)],[Q],[]),claim_or_refresh_neuron_from_account:e.Func([p],[gn],[]),get_build_metadata:e.Func([],[e.Text],["query"]),get_full_neuron:e.Func([e.Nat64],[Qe],["query"]),get_full_neuron_by_id_or_subaccount:e.Func([W],[Qe],["query"]),get_latest_reward_event:e.Func([],[je],["query"]),get_metrics:e.Func([],[On],["query"]),get_monthly_node_provider_rewards:e.Func([],[Rn],[]),get_most_recent_monthly_node_provider_rewards:e.Func([],[e.Opt(le)],["query"]),get_network_economics_parameters:e.Func([],[z],["query"]),get_neuron_ids:e.Func([],[e.Vec(e.Nat64)],["query"]),get_neuron_info:e.Func([e.Nat64],[Ze],["query"]),get_neuron_info_by_id_or_subaccount:e.Func([W],[Ze],["query"]),get_neurons_fund_audit_info:e.Func([hn],[Sn],["query"]),get_node_provider_by_caller:e.Func([e.Null],[kn],["query"]),get_pending_proposals:e.Func([],[e.Vec(fe)],["query"]),get_proposal_info:e.Func([e.Nat64],[e.Opt(fe)],["query"]),get_restore_aging_summary:e.Func([],[He],["query"]),list_known_neurons:e.Func([],[Tn],["query"]),list_neurons:e.Func([Cn],[Pn],["query"]),list_node_provider_rewards:e.Func([Vn],[Mn],["query"]),list_node_providers:e.Func([],[An],["query"]),list_proposals:e.Func([Bn],[En],["query"]),manage_neuron:e.Func([t],[Ie],[]),settle_community_fund_participation:e.Func([Zn],[Q],[]),settle_neurons_fund_participation:e.Func([Ln],[oo],[]),simulate_manage_neuron:e.Func([t],[Ie],[]),transfer_gtc_neuron:e.Func([o,o],[Q],[]),update_node_provider:e.Func([ro],[Q],[])})};var lr=({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}),p=e.Record({neuron_infos:e.Vec(e.Tuple(e.Nat64,u)),full_neurons:e.Vec(c)});return e.Service({list_neurons:e.Func([l],[p],[])})};import{accountIdentifierToBytes as $i}from"@dfinity/ledger-icp";import{Principal as S}from"@dfinity/principal";import{arrayBufferToUint8Array as vo,isNullish as lt,nonNullish as Xi,toNullable as w}from"@dfinity/utils";var pt=class extends Error{},et=class extends pt{},tt=class extends pt{constructor(n){super();this.minimumAmount=n}},oe=class extends Error{},re=class extends Error{constructor(n){super();this.detail=n}},R=class extends Error{constructor(t){super("Unsupported value: "+t)}};var Nr=e=>({id:e}),bo=e=>({id:e}),zi=e=>({followees:e.map(bo)}),Ji=e=>{if("NeuronId"in e)return{NeuronId:{id:e.NeuronId}};if("Subaccount"in e)return{Subaccount:Uint8Array.from(e.Subaccount)};throw new R(e)},mt=e=>e.basisPoints!==void 0?{basis_points:[e.basisPoints]}:{basis_points:[]},q=e=>e.seconds!==void 0?{seconds:[e.seconds]}:{seconds:[]},Yi=e=>e.secondsAfterUtcMidnight!==void 0?{seconds_after_utc_midnight:[e.secondsAfterUtcMidnight]}:{seconds_after_utc_midnight:[]},Qi=e=>({iso_codes:e.isoCodes}),P=e=>e.e8s!==void 0?{e8s:[e.e8s]}:{e8s:[]},wr=e=>e.base64Encoding!==void 0?{base64_encoding:[e.base64Encoding]}:{base64_encoding:[]},Zi=e=>({reward_rate_transition_duration:e.rewardRateTransitionDuration!==void 0?[q(e.rewardRateTransitionDuration)]:[],initial_reward_rate:e.initialRewardRate!==void 0?[mt(e.initialRewardRate)]:[],final_reward_rate:e.finalRewardRate!==void 0?[mt(e.finalRewardRate)]:[]}),Ii=e=>({transaction_fee:e.transactionFee!==void 0?[P(e.transactionFee)]:[],token_symbol:e.tokenSymbol!==void 0?[e.tokenSymbol]:[],token_logo:e.tokenLogo!==void 0?[wr(e.tokenLogo)]:[],token_name:e.tokenName!==void 0?[e.tokenName]:[]}),Di=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?[Li(e.neuronBasketConstructionParameters)]:[],confirmation_text:e.confirmationText!==void 0?[e.confirmationText]:[],maximum_participant_icp:e.maximumParticipantIcp!==void 0?[P(e.maximumParticipantIcp)]:[],neurons_fund_investment_icp:e.neuronsFundInvestmentIcp!==void 0?[P(e.neuronsFundInvestmentIcp)]:[],minimum_icp:e.minimumIcp!==void 0?[P(e.minimumIcp)]:[],minimum_participant_icp:e.minimumParticipantIcp!==void 0?[P(e.minimumParticipantIcp)]:[],start_time:e.startTime!==void 0?[Yi(e.startTime)]:[],maximum_icp:e.maximumIcp!==void 0?[P(e.maximumIcp)]:[],restricted_countries:e.restrictedCountries!==void 0?[Qi(e.restrictedCountries)]:[],maximum_direct_participation_icp:e.maxDirectParticipationIcp!==void 0?[P(e.maxDirectParticipationIcp)]:[],minimum_direct_participation_icp:e.minDirectParticipationIcp!==void 0?[P(e.minDirectParticipationIcp)]:[],neurons_fund_participation:w(e.neuronsFundParticipation)}),Li=e=>({dissolve_delay_interval:e.dissolveDelayInterval!==void 0?[q(e.dissolveDelayInterval)]:[],count:e.count!==void 0?[e.count]:[]}),es=e=>({neuron_maximum_dissolve_delay_bonus:e.neuronMaximumDissolveDelayBonus!==void 0?[mt(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?[mt(e.neuronMaximumAgeBonus)]:[],neuron_minimum_stake:e.neuronMinimumStake!==void 0?[P(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?[P(e.proposalRejectionFee)]:[],voting_reward_parameters:e.votingRewardParameters!==void 0?[Zi(e.votingRewardParameters)]:[]}),mr=e=>({total:e.total!==void 0?[P(e.total)]:[]}),ts=e=>({treasury_distribution:e.treasuryDistribution!==void 0?[mr(e.treasuryDistribution)]:[],developer_distribution:e.developerDistribution!==void 0?[os(e.developerDistribution)]:[],swap_distribution:e.swapDistribution!==void 0?[mr(e.swapDistribution)]:[]}),ns=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?[P(e.stake)]:[]}),os=e=>({developer_neurons:e.developerNeurons.map(ns)}),rs=e=>({url:e.url!==void 0?[e.url]:[],governance_parameters:e.governanceParameters!==void 0?[es(e.governanceParameters)]:[],fallback_controller_principal_ids:e.fallbackControllerPrincipalIds.map(t=>S.fromText(t)),logo:e.logo!==void 0?[wr(e.logo)]:[],name:e.name!==void 0?[e.name]:[],ledger_parameters:e.ledgerParameters!==void 0?[Ii(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?[Di(e.swapParameters)]:[],initial_token_distribution:e.initialTokenDistribution!==void 0?[ts(e.initialTokenDistribution)]:[]}),is=e=>{if(e.wasmModule===void 0)throw new Error("wasmModule not found");return{arg:w(vo(e.arg??new ArrayBuffer(0))),wasm_module:w(vo(e.wasmModule)),skip_stopping_before_installing:w(e.skipStoppingBeforeInstalling),canister_id:w(Xi(e.canisterId)?S.fromText(e.canisterId):void 0),install_mode:w(e.installMode)}},ss=e=>e===void 0?[]:[{freezing_threshold:w(e.freezingThreshold),controllers:e.controllers?[{controllers:e.controllers.map(t=>S.fromText(t))}]:[],log_visibility:w(e.logVisibility),wasm_memory_limit:w(e.wasmMemoryLimit),compute_allocation:w(e.computeAllocation),memory_allocation:w(e.memoryAllocation)}],yr=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:vo(t.payloadBytes)}}}if("ManageNeuron"in e){let t=e.ManageNeuron;return{ManageNeuron:ps(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:_s(t.neuronsFundEconomics)}}}if("RewardNodeProvider"in e){let t=e.RewardNodeProvider;return{RewardNodeProvider:{node_provider:t.nodeProvider?[ft(t.nodeProvider)]:[],amount_e8s:t.amountE8s,reward_mode:t.rewardMode!=null?[fr(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?[ft(n.nodeProvider)]:[],amount_e8s:n.amountE8s,reward_mode:n.rewardMode!=null?[fr(n.rewardMode)]:[]}))}}}if("AddOrRemoveNodeProvider"in e){let t=e.AddOrRemoveNodeProvider;return{AddOrRemoveNodeProvider:{change:t.change?[us(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,zi(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:w(t),target_swap_canister_id:w(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:w(o.saleDelaySeconds),neuron_basket_construction_parameters:w(o.neuronBasketConstructionParameters),max_direct_participation_icp_e8s:w(o.maxDirectParticipationIcpE8s),min_direct_participation_icp_e8s:w(o.minDirectParticipationIcpE8s)}]}}}if("CreateServiceNervousSystem"in e)return{CreateServiceNervousSystem:rs(e.CreateServiceNervousSystem)};if("InstallCode"in e)return{InstallCode:is(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:ss(t.settings)}}}throw new R(e)},as=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(bo)}}}if("ClaimOrRefresh"in e){let t=e.ClaimOrRefresh;return{ClaimOrRefresh:{by:t.by?[ds(t.by)]:[]}}}if("Configure"in e){let t=e.Configure;return{Configure:{operation:t.operation?[cs(t.operation)]:[]}}}if("RegisterVote"in e){let t=e.RegisterVote;return{RegisterVote:{vote:t.vote,proposal:t.proposal?[Nr(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:w(t)}}}if("MakeProposal"in e){let t=e.MakeProposal;return{MakeProposal:{url:t.url,title:[],action:t.action?[yr(t.action)]:[],summary:t.summary}}}if("Disburse"in e){let t=e.Disburse;return{Disburse:{to_account:t.toAccountId?[xo(t.toAccountId)]:[],amount:t.amount?[gr(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)},cs=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:w(t.visibility)}}}throw new R(e)},us=e=>{if("ToRemove"in e)return{ToRemove:ft(e.ToRemove)};if("ToAdd"in e)return{ToAdd:ft(e.ToAdd)};throw new R(e)},ft=e=>({id:e.id!=null?[S.fromText(e.id)]:[],reward_account:e.rewardAccount!=null?[xo(e.rewardAccount)]:[]}),gr=e=>({e8s:e}),xo=e=>({hash:$i(e)}),_s=e=>{if(lt(e))return[];let{maximumIcpXdrRate:t,maxTheoreticalNeuronsFundParticipationAmountXdr:n,neuronsFundMatchedFundingCurveCoefficients:o,minimumIcpXdrRate:r}=e,i=u=>lt(u)?[]:[{basis_points:w(u.basisPoints)}],s=u=>lt(u)?[]:[{human_readable:w(u.humanReadable)}],c=u=>lt(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)}]},fr=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?[xo(e.RewardToAccount.toAccount)]:[]}};throw new R(e)},ds=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)},Or=({neuronIds:e,includeEmptyNeurons:t,includePublicNeurons:n})=>({neuron_ids:BigUint64Array.from(e??[]),include_neurons_readable_by_caller:!e,include_empty_neurons_readable_by_caller:w(t),include_public_neurons_in_full_neurons:w(n)}),ps=({id:e,command:t,neuronIdOrSubaccount:n})=>({id:e?[bo(e)]:[],command:t?[as(t)]:[],neuron_id_or_subaccount:n?[Ji(n)]:[]}),Rr=({includeRewardStatus:e,beforeProposal:t,excludeTopic:n,includeStatus:o,limit:r,includeAllManageNeuronProposals:i,omitLargeFields:s})=>({include_reward_status:Int32Array.from(e),before_proposal:t?[Nr(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:w(s)}),hr=e=>({id:[],command:[{ClaimOrRefresh:{by:[{NeuronIdOrSubaccount:{}}]}}],neuron_id_or_subaccount:[{NeuronId:{id:e.neuronId}}]}),vr=({memo:e,controller:t})=>{let n={ClaimOrRefresh:{by:[{MemoAndController:{controller:t==null?[]:[t],memo:e}}]}};return{id:[],command:[n],neuron_id_or_subaccount:[]}},br=({neuronId:e,amount:t})=>({id:[],command:[{Split:{amount_e8s:t}}],neuron_id_or_subaccount:[{NeuronId:{id:e}}]});var xr=({neuronId:e,vote:t,proposalId:n})=>ie({neuronId:e,command:{RegisterVote:{vote:t,proposal:[{id:n}]}}}),Sr=e=>{let t={MakeProposal:{url:e.url,title:e.title!=null?[e.title]:[],summary:e.summary,action:[yr(e.action)]}};return{id:[],command:[t],neuron_id_or_subaccount:[{NeuronId:{id:e.neuronId}}]}},kr=({neuronId:e,topic:t,followees:n})=>ie({neuronId:e,command:{Follow:{topic:t,followees:n.map(o=>({id:o}))}}}),Tr=({neuronId:e,toAccountIdentifier:t,amount:n})=>ie({neuronId:e,command:{Disburse:{to_account:t!==void 0?[t.toAccountIdentifierHash()]:[],amount:n!==void 0?[gr(n)]:[]}}}),Cr=({neuronId:e,percentageToMerge:t})=>ie({neuronId:e,command:{MergeMaturity:{percentage_to_merge:t}}}),Pr=({neuronId:e,percentageToStake:t})=>ie({neuronId:e,command:{StakeMaturity:{percentage_to_stake:w(t)}}}),Fr=({neuronId:e,percentageToSpawn:t,newController:n,nonce:o})=>ie({neuronId:e,command:{Spawn:{percentage_to_spawn:t===void 0?[]:[t],new_controller:n===void 0?[]:[n],nonce:o===void 0?[]:[o]}}}),Vr=({neuronId:e,principal:t})=>U({neuronId:e,operation:{AddHotKey:{new_hot_key:[t]}}}),Mr=({neuronId:e,principal:t})=>U({neuronId:e,operation:{RemoveHotKey:{hot_key_to_remove:[t]}}}),Ar=({neuronId:e,additionalDissolveDelaySeconds:t})=>U({neuronId:e,operation:{IncreaseDissolveDelay:{additional_dissolve_delay_seconds:t}}}),Br=({neuronId:e,dissolveDelaySeconds:t})=>U({neuronId:e,operation:{SetDissolveTimestamp:{dissolve_timestamp_seconds:BigInt(t)}}}),Er=e=>U({neuronId:e,operation:{JoinCommunityFund:{}}}),qr=({neuronId:e,autoStake:t})=>U({neuronId:e,operation:{ChangeAutoStakeMaturity:{requested_setting_for_auto_stake_maturity:t}}}),Ur=e=>U({neuronId:e,operation:{LeaveCommunityFund:{}}}),Gr=({neuronId:e,visibility:t})=>U({neuronId:e,operation:{SetVisibility:{visibility:[t]}}}),So=({sourceNeuronId:e,targetNeuronId:t})=>ie({neuronId:t,command:{Merge:{source_neuron_id:[{id:e}]}}}),Kr=e=>U({neuronId:e,operation:{StartDissolving:{}}}),Hr=e=>U({neuronId:e,operation:{StopDissolving:{}}}),ie=({neuronId:e,command:t})=>({id:[{id:e}],command:[t],neuron_id_or_subaccount:[]}),U=({neuronId:e,operation:t})=>ie({neuronId:e,command:{Configure:{operation:[t]}}});import{accountIdentifierFromBytes as ls,principalToAccountIdentifier as ms}from"@dfinity/ledger-icp";import{Principal as jr}from"@dfinity/principal";import{fromDefinedNullable as wt,fromNullable as _,isNullish as Nt,nonNullish as be,toNullable as L,uint8ArrayToArrayOfNumber as fs,uint8ArrayToHexString as Wr}from"@dfinity/utils";var ko=({neuronId:e,neuronInfo:t,rawNeuron:n,canisterId:o})=>{let r=n?Ns({neuron:n,canisterId:o}):void 0;return{neuronId:e,dissolveDelaySeconds:t.dissolve_delay_seconds,recentBallots:t.recent_ballots.map(zr),neuronType:_(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:_(t.visibility),fullNeuron:r}},Ns=({neuron:e,canisterId:t})=>({id:e.id.length?se(e.id[0]):void 0,stakedMaturityE8sEquivalent:_(e.staked_maturity_e8s_equivalent),controller:e.controller.length?e.controller[0].toString():void 0,recentBallots:e.recent_ballots.map(zr),neuronType:_(e.neuron_type),kycVerified:e.kyc_verified,notForProfit:e.not_for_profit,cachedNeuronStake:e.cached_neuron_stake_e8s,createdTimestampSeconds:e.created_timestamp_seconds,autoStakeMaturity:_(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:ms(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?ws(e.dissolve_state[0]):void 0,spawnAtTimesSeconds:e.spawn_at_timestamp_seconds[0],followees:e.followees.map(([n,o])=>Jr({topic:n,followees:o})),visibility:_(e.visibility)}),Ra=({neuron:e,account:t})=>({id:be(e.id)?L({id:e.id}):[],staked_maturity_e8s_equivalent:L(e.stakedMaturityE8sEquivalent),controller:be(e.controller)?L(jr.from(e.controller)):[],recent_ballots:e.recentBallots.map(n=>({vote:n.vote,proposal_id:be(n.proposalId)?L({id:n.proposalId}):[]})),kyc_verified:e.kycVerified,neuron_type:L(e.neuronType),not_for_profit:e.notForProfit,cached_neuron_stake_e8s:e.cachedNeuronStake,created_timestamp_seconds:e.createdTimestampSeconds,auto_stake_maturity:L(e.autoStakeMaturity),maturity_e8s_equivalent:e.maturityE8sEquivalent,aging_since_timestamp_seconds:e.agingSinceTimestampSeconds,neuron_fees_e8s:e.neuronFees,hot_keys:e.hotKeys.map(n=>jr.from(n)),account:t,joined_community_fund_timestamp_seconds:L(e.joinedCommunityFundTimestampSeconds),dissolve_state:be(e.dissolveState)?[e.dissolveState]:[],spawn_at_timestamp_seconds:L(e.spawnAtTimesSeconds),followees:e.followees.map(n=>[n.topic,{followees:n.followees.map(o=>({id:o}))}]),visibility:L(e.visibility),transfer:[],known_neuron_data:[]}),zr=({vote:e,proposal_id:t})=>({vote:e,proposalId:t.length?se(t[0]):void 0}),ws=e=>"DissolveDelaySeconds"in e?{DissolveDelaySeconds:e.DissolveDelaySeconds}:{WhenDissolvedTimestampSeconds:e.WhenDissolvedTimestampSeconds},Jr=({topic:e,followees:t})=>({topic:e,followees:t.followees.map(se)}),se=({id:e})=>e,ys=e=>{if("NeuronId"in e)return{NeuronId:e.NeuronId.id};if("Subaccount"in e)return{Subaccount:fs(Uint8Array.from(e.Subaccount))};throw new R(e)},gs=({neuronId:e,ballot:t})=>{let{vote:n,voting_power:o}=t;return{neuronId:e,vote:n,votingPower:o}},Os=({title:e,url:t,action:n,summary:o})=>({title:e.length?e[0]:void 0,url:t,action:n.length?Yr(n[0]):void 0,summary:o}),Yr=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?se(t.id[0]):void 0,command:t.command.length?hs(t.command[0]):void 0,neuronIdOrSubaccount:t.neuron_id_or_subaccount.length?ys(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:xs(t.neurons_fund_economics)}}}if("RewardNodeProvider"in e){let t=e.RewardNodeProvider;return{RewardNodeProvider:{nodeProvider:t.node_provider.length?yt(t.node_provider[0]):void 0,amountE8s:t.amount_e8s,rewardMode:t.reward_mode.length?$r(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?yt(n.node_provider[0]):void 0,amountE8s:n.amount_e8s,rewardMode:n.reward_mode.length?$r(n.reward_mode[0]):void 0}))}}}if("AddOrRemoveNodeProvider"in e){let t=e.AddOrRemoveNodeProvider;return{AddOrRemoveNodeProvider:{change:t.change.length?bs(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])=>Jr({topic:n,followees:o}))}};if("RegisterKnownNeuron"in e){let t=e.RegisterKnownNeuron;return{RegisterKnownNeuron:Ts(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=_(t.params);return{OpenSnsTokenSwap:{communityFundInvestmentE8s:_(t.community_fund_investment_e8s),targetSwapCanisterId:_(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:_(n.sale_delay_seconds),neuronBasketConstructionParameters:_(n.neuron_basket_construction_parameters),maxDirectParticipationIcpE8s:_(n.max_direct_participation_icp_e8s),minDirectParticipationIcpE8s:_(n.min_direct_participation_icp_e8s)}}}}if("CreateServiceNervousSystem"in e){let t=e.CreateServiceNervousSystem;return{CreateServiceNervousSystem:{url:_(t.url),governanceParameters:As(_(t.governance_parameters)),fallbackControllerPrincipalIds:t.fallback_controller_principal_ids.map(n=>n.toString()),logo:Ir(_(t.logo)),name:_(t.name),ledgerParameters:Vs(_(t.ledger_parameters)),description:_(t.description),dappCanisters:t.dapp_canisters.map(Fs)??[],swapParameters:Es(_(t.swap_parameters)),initialTokenDistribution:Gs(_(t.initial_token_distribution))}}}if("InstallCode"in e){let t=e.InstallCode;return{InstallCode:{skipStoppingBeforeInstalling:_(t.skip_stopping_before_installing),canisterId:t.canister_id.length?t.canister_id[0].toString():void 0,installMode:_(t.install_mode),wasmModuleHash:Wr(wt(t.wasm_module_hash)),argHash:Wr(wt(t.arg_hash))}}}if("StopOrStartCanister"in e){let t=e.StopOrStartCanister;return{StopOrStartCanister:{canisterId:t.canister_id.length?t.canister_id[0].toString():void 0,action:_(t.action)}}}if("UpdateCanisterSettings"in e)return{UpdateCanisterSettings:{canisterId:e.UpdateCanisterSettings.canister_id.length?e.UpdateCanisterSettings.canister_id[0].toString():void 0,settings:Ks(wt(e.UpdateCanisterSettings.settings))}};throw new R(e)},Rs=e=>({no:e.no,yes:e.yes,total:e.total,timestampSeconds:e.timestamp_seconds}),hs=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(se)}}}if("ClaimOrRefresh"in e){let t=e.ClaimOrRefresh;return{ClaimOrRefresh:{by:t.by.length?ks(t.by[0]):void 0}}}if("Configure"in e){let t=e.Configure;return{Configure:{operation:t.operation.length?vs(t.operation[0]):void 0}}}if("RegisterVote"in e){let t=e.RegisterVote;return{RegisterVote:{vote:t.vote,proposal:t.proposal.length?se(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:_(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?Yr(t.action[0]):void 0,summary:t.summary}}}if("Disburse"in e){let t=e.Disburse;return{Disburse:{toAccountId:t.to_account.length?To(t.to_account[0]):void 0,amount:t.amount.length?Ss(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)},vs=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:_(t.visibility)}}}throw new R(e)},bs=e=>{if("ToRemove"in e)return{ToRemove:yt(e.ToRemove)};if("ToAdd"in e)return{ToAdd:yt(e.ToAdd)};throw new R(e)},xs=e=>{let t=_(e);if(Nt(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 p=_(l);if(Nt(p))return;let{basis_points:d}=p,m=_(d);return be(m)?{basisPoints:m}:void 0},c=l=>{let p=_(l);if(Nt(p))return;let{human_readable:d}=p,m=_(d);return be(m)?{humanReadable:m}:void 0},u=l=>{let p=_(l);if(Nt(p))return;let{full_participation_milestone_xdr:d,one_third_participation_milestone_xdr:m,contribution_threshold_xdr:y}=p;return{fullParticipationMilestoneXdr:c(d),oneThirdParticipationMilestoneXdr:c(m),contributionThresholdXdr:c(y)}};return{maximumIcpXdrRate:s(n),neuronsFundMatchedFundingCurveCoefficients:u(o),maxTheoreticalNeuronsFundParticipationAmountXdr:c(r),minimumIcpXdrRate:s(i)}},yt=e=>({id:e.id.length?e.id[0].toString():void 0,rewardAccount:e.reward_account.length?To(e.reward_account[0]):void 0}),Ss=e=>e.e8s,To=e=>ls(new Uint8Array(e.hash)),$r=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?To(e.RewardToAccount.to_account[0]):void 0}};throw new R(e)},ks=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)},Co=e=>({id:e.id.length?se(e.id[0]):void 0,ballots:e.ballots.map(t=>gs({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:_(e.deadline_timestamp_seconds),decidedTimestampSeconds:e.decided_timestamp_seconds,proposal:e.proposal.length?Os(e.proposal[0]):void 0,proposer:e.proposer.length?se(e.proposer[0]):void 0,latestTally:e.latest_tally.length?Rs(e.latest_tally[0]):void 0,executedTimestampSeconds:e.executed_timestamp_seconds,topic:e.topic,status:e.status,rewardStatus:e.reward_status}),Qr=({response:{neuron_infos:e,full_neurons:t},canisterId:n})=>e.map(([o,r])=>ko({neuronId:o,neuronInfo:r,rawNeuron:t.find(i=>i.id.length&&i.id[0].id===o),canisterId:n})),Zr=({proposal_info:e})=>({proposals:e.map(Co)}),Ts=({id:e,known_neuron_data:t})=>({id:e[0]?.id??BigInt(0),name:t[0]?.name??"",description:t[0]?.description[0]??""}),gt=e=>e===void 0?void 0:{basisPoints:_(e.basis_points)},G=e=>e===void 0?void 0:{seconds:_(e.seconds)},Cs=e=>e===void 0?void 0:{secondsAfterUtcMidnight:_(e.seconds_after_utc_midnight)},Ps=e=>e===void 0?void 0:{isoCodes:e.iso_codes},F=e=>e===void 0?void 0:{e8s:_(e.e8s)},Fs=e=>e===void 0||e.id.length===0?void 0:wt(e.id).toString(),Ir=e=>e===void 0?void 0:{base64Encoding:_(e.base64_encoding)},Vs=e=>e===void 0?void 0:{transactionFee:F(_(e.transaction_fee)),tokenSymbol:_(e.token_symbol),tokenLogo:Ir(_(e.token_logo)),tokenName:_(e.token_name)},Ms=e=>e===void 0?void 0:{rewardRateTransitionDuration:G(_(e.reward_rate_transition_duration)),initialRewardRate:gt(_(e.initial_reward_rate)),finalRewardRate:gt(_(e.final_reward_rate))},As=e=>e===void 0?void 0:{neuronMaximumDissolveDelayBonus:gt(_(e.neuron_maximum_dissolve_delay_bonus)),neuronMaximumAgeForAgeBonus:G(_(e.neuron_maximum_age_for_age_bonus)),neuronMaximumDissolveDelay:G(_(e.neuron_maximum_dissolve_delay)),neuronMinimumDissolveDelayToVote:G(_(e.neuron_minimum_dissolve_delay_to_vote)),neuronMaximumAgeBonus:gt(_(e.neuron_maximum_age_bonus)),neuronMinimumStake:F(_(e.neuron_minimum_stake)),proposalWaitForQuietDeadlineIncrease:G(_(e.proposal_wait_for_quiet_deadline_increase)),proposalInitialVotingPeriod:G(_(e.proposal_initial_voting_period)),proposalRejectionFee:F(_(e.proposal_rejection_fee)),votingRewardParameters:Ms(_(e.voting_reward_parameters))},Bs=e=>e===void 0?void 0:{dissolveDelayInterval:G(_(e.dissolve_delay_interval)),count:_(e.count)},Es=e=>e===void 0?void 0:{minimumParticipants:_(e.minimum_participants),duration:G(_(e.duration)),neuronBasketConstructionParameters:Bs(_(e.neuron_basket_construction_parameters)),confirmationText:_(e.confirmation_text),maximumParticipantIcp:F(_(e.maximum_participant_icp)),neuronsFundInvestmentIcp:F(_(e.neurons_fund_investment_icp)),minimumIcp:F(_(e.minimum_icp)),minimumParticipantIcp:F(_(e.minimum_participant_icp)),startTime:Cs(_(e.start_time)),maximumIcp:F(_(e.maximum_icp)),restrictedCountries:Ps(_(e.restricted_countries)),maxDirectParticipationIcp:F(_(e.maximum_direct_participation_icp)),minDirectParticipationIcp:F(_(e.minimum_direct_participation_icp)),neuronsFundParticipation:_(e.neurons_fund_participation)},Xr=e=>e===void 0?void 0:{total:F(_(e.total))},qs=e=>e===void 0?void 0:{controller:e.controller.length===0?void 0:e.controller[0].toString(),dissolveDelay:G(_(e.dissolve_delay)),memo:_(e.memo),vestingPeriod:G(_(e.vesting_period)),stake:F(_(e.stake))},Us=e=>e===void 0?void 0:{developerNeurons:e.developer_neurons.map(qs)},Gs=e=>e===void 0?void 0:{treasuryDistribution:Xr(_(e.treasury_distribution)),developerDistribution:Us(_(e.developer_distribution)),swapDistribution:Xr(_(e.swap_distribution))},Ks=e=>e===void 0?void 0:{freezingThreshold:_(e.freezing_threshold),controllers:_(e.controllers)?.controllers.map(t=>t.toString()),logVisibility:_(e.log_visibility),wasmMemoryLimit:_(e.wasm_memory_limit),computeAllocation:_(e.compute_allocation),memoryAllocation:_(e.memory_allocation)};var nt=e=>{let{command:t}=e,n=t[0];if(!n)throw new re({error_message:"Error updating neuron",error_type:0});if("Error"in n)throw new re(n.Error);return n},h=async({request:e,service:t})=>{let n=await t.manage_neuron(e);return nt(n)},Dr=async({request:e,service:t})=>{let n=await t.simulate_manage_neuron(e);return nt(n)};var Po=BigInt(1e8);var ti=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,includePublicNeurons:r})=>{let i=Or({neuronIds:n,includeEmptyNeurons:o,includePublicNeurons:r}),u=await(ot(o)&&ot(r)&&t?this.oldListNeuronsCertifiedService:this.getGovernanceService(t)).list_neurons(i);return Qr({response:u,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=Rr(t),r=await this.getGovernanceService(n).list_proposals(o);return Zr(r)};this.stakeNeuron=async({stake:t,principal:n,fromSubAccount:o,ledgerCanister:r,createdAt:i,fee:s})=>{if(t<Po)throw new tt(t);let c=new Uint8Array((0,Mo.default)(8)),u=ei(c),l=this.buildNeuronStakeSubAccount(c,n),p=Fo.fromPrincipal({principal:this.canisterId,subAccount:l});await r.transfer({memo:u,amount:t,fromSubAccount:o,to:p,createdAt:i,fee:s});let d=await this.claimOrRefreshNeuronFromAccount({controller:n,memo:u});if(ot(d))throw new et;return d};this.stakeNeuronIcrc1=async({stake:t,principal:n,fromSubAccount:o,ledgerCanister:r,createdAt:i,fee:s})=>{if(t<Po)throw new tt(t);let c=new Uint8Array((0,Mo.default)(8)),u=ei(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 p=await this.claimOrRefreshNeuronFromAccount({controller:n,memo:u});if(ot(p))throw new et;return p};this.increaseDissolveDelay=async({neuronId:t,additionalDissolveDelaySeconds:n})=>{let o=Ar({neuronId:t,additionalDissolveDelaySeconds:n});await h({request:o,service:this.certifiedService})};this.setDissolveDelay=async({neuronId:t,dissolveDelaySeconds:n})=>{let o=Br({neuronId:t,dissolveDelaySeconds:n});await h({request:o,service:this.certifiedService})};this.startDissolving=async t=>{let n=Kr(t);await h({request:n,service:this.certifiedService})};this.stopDissolving=async t=>{let n=Hr(t);await h({request:n,service:this.certifiedService})};this.joinCommunityFund=async t=>{let n=Er(t);await h({request:n,service:this.certifiedService})};this.autoStakeMaturity=async t=>{await h({request:qr(t),service:this.certifiedService})};this.leaveCommunityFund=async t=>{let n=Ur(t);await h({request:n,service:this.certifiedService})};this.setVisibility=async(t,n)=>{let o=Gr({neuronId:t,visibility:n});await h({request:o,service:this.certifiedService})};this.setNodeProviderAccount=async t=>{Lr(t);let n=Fo.fromHex(t),o=await this.certifiedService.update_node_provider({reward_account:[n.toAccountIdentifierHash()]});if("Err"in o)throw new re(o.Err)};this.mergeNeurons=async t=>{let n=So(t);await h({request:n,service:this.certifiedService})};this.simulateMergeNeurons=async t=>{let n=So(t),o=await Dr({request:n,service:this.certifiedService}),r,i,s,c;if("Merge"in o&&K(r=o.Merge)&&K(i=k(r.target_neuron_info))&&K(s=k(r.target_neuron))&&K(c=k(s.id)?.id))return ko({neuronId:c,neuronInfo:i,rawNeuron:s,canisterId:this.canisterId});throw new oe(`simulateMergeNeurons: Unrecognized Merge error in ${JSON.stringify(o)}`)};this.splitNeuron=async({neuronId:t,amount:n})=>{let o=br({neuronId:t,amount:n}),r=await this.certifiedService.manage_neuron(o),i=nt(r);if("Split"in i){let s=k(i.Split.created_neuron_id);if(ot(s))throw new re({error_message:"Unexpected error splitting neuron. No neuronId in Split response.",error_type:0});return s.id}throw new oe(`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?Co(o):void 0};this.makeProposal=async t=>{let n=Sr(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=xr({neuronId:t,vote:n,proposalId:o});await h({request:r,service:this.certifiedService})};this.setFollowees=async t=>{let n=kr(t);await h({request:n,service:this.certifiedService})};this.disburse=async({neuronId:t,toAccountId:n,amount:o})=>{K(n)&&Lr(n);let r=K(n)?Fo.fromHex(n):void 0,i=Tr({neuronId:t,toAccountIdentifier:r,amount:o});await h({request:i,service:this.certifiedService})};this.mergeMaturity=async({neuronId:t,percentageToMerge:n})=>{Vo(n);let o=Cr({neuronId:t,percentageToMerge:n});await h({request:o,service:this.certifiedService})};this.stakeMaturity=async({neuronId:t,percentageToStake:n})=>{Vo(n??100),await h({request:Pr({neuronId:t,percentageToStake:n}),service:this.certifiedService})};this.spawnNeuron=async({neuronId:t,percentageToSpawn:n,newController:o,nonce:r})=>{K(n)&&Vo(n);let i=Fr({neuronId:t,percentageToSpawn:n,newController:o,nonce:r}),s=await this.certifiedService.manage_neuron(i),c=nt(s),u;if("Spawn"in c&&K(u=k(c.Spawn.created_neuron_id)?.id))return u;throw new oe(`Unrecognized Spawn error in ${JSON.stringify(s)}`)};this.addHotkey=async({neuronId:t,principal:n})=>{let o=Vr({neuronId:t,principal:n});await h({request:o,service:this.certifiedService})};this.removeHotkey=async({neuronId:t,principal:n})=>{let o=Mr({neuronId:t,principal:n});await h({request:o,service:this.certifiedService})};this.claimOrRefreshNeuronFromAccount=async({memo:t,controller:n})=>{let o=vr({memo:t,controller:n}),r=await this.certifiedService.manage_neuron(o),i;if(K(i=k(r.command))&&"ClaimOrRefresh"in i)return k(i.ClaimOrRefresh.refreshed_neuron_id)?.id;throw new oe(`Unrecognized ClaimOrRefresh error in ${JSON.stringify(r)}`)};this.claimOrRefreshNeuron=async t=>{let n=hr(t),o=await this.service.manage_neuron(n),r;if(K(r=k(o.command))&&"ClaimOrRefresh"in r)return k(r.ClaimOrRefresh.refreshed_neuron_id)?.id;throw new oe(`Unrecognized ClaimOrRefresh error in ${JSON.stringify(o)}`)};this.buildNeuronStakeSubAccount=(t,n)=>js.fromBytes(this.getNeuronStakeSubAccountBytes(t,n));this.getNeuronStakeSubAccountBytes=(t,n)=>{let o=$s("neuron-stake"),r=Go.create();return r.update(Ws([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??Ao,{service:o,certifiedService:r,agent:i}=Xs({options:{...t,canisterId:n},idlFactory:pr,certifiedIdlFactory:dr}),s=t.oldListNeuronsServiceOverride??Hs.createActor(lr,{agent:i,canisterId:n});return new e(n,o,r,s,i)}getGovernanceService(t){return t?this.certifiedService:this.service}};export{pr as a,pt as b,et as c,tt as d,oe as e,re as f,R as g,Or as h,Ra as i,ti as j};
|
|
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-L6YE6E7N.js.map
|