@dfinity/sns 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/candid/sns_governance.certified.idl.js +23 -0
  2. package/dist/candid/sns_governance.d.ts +24 -0
  3. package/dist/candid/sns_governance.did +19 -1
  4. package/dist/candid/sns_governance.idl.js +23 -0
  5. package/dist/candid/sns_governance_test.certified.idl.js +23 -0
  6. package/dist/candid/sns_governance_test.d.ts +24 -0
  7. package/dist/candid/sns_governance_test.did +19 -1
  8. package/dist/candid/sns_governance_test.idl.js +23 -0
  9. package/dist/candid/sns_root.certified.idl.js +6 -0
  10. package/dist/candid/sns_root.d.ts +3 -0
  11. package/dist/candid/sns_root.did +4 -1
  12. package/dist/candid/sns_root.idl.js +6 -0
  13. package/dist/candid/sns_swap.certified.idl.js +18 -33
  14. package/dist/candid/sns_swap.d.ts +11 -11
  15. package/dist/candid/sns_swap.did +14 -11
  16. package/dist/candid/sns_swap.idl.js +18 -33
  17. package/dist/cjs/index.cjs.js +1 -1
  18. package/dist/cjs/index.cjs.js.map +3 -3
  19. package/dist/esm/chunk-7CU6QPD4.js +2 -0
  20. package/dist/esm/chunk-7CU6QPD4.js.map +7 -0
  21. package/dist/esm/chunk-C7HBQQIL.js +2 -0
  22. package/dist/esm/chunk-C7HBQQIL.js.map +7 -0
  23. package/dist/esm/chunk-K2WYATWO.js +2 -0
  24. package/dist/esm/chunk-K2WYATWO.js.map +7 -0
  25. package/dist/esm/{chunk-R7I3KJ5Z.js → chunk-TVXJJLBF.js} +2 -2
  26. package/dist/esm/governance.canister.js +1 -1
  27. package/dist/esm/index.js +1 -1
  28. package/dist/esm/index.js.map +3 -3
  29. package/dist/esm/root.canister.js +1 -1
  30. package/dist/esm/sns.js +1 -1
  31. package/dist/esm/swap.canister.js +1 -1
  32. package/package.json +6 -6
  33. package/dist/esm/chunk-34CD4QJG.js +0 -2
  34. package/dist/esm/chunk-34CD4QJG.js.map +0 -7
  35. package/dist/esm/chunk-4GE7OJRF.js +0 -2
  36. package/dist/esm/chunk-4GE7OJRF.js.map +0 -7
  37. package/dist/esm/chunk-VUTJEPVF.js +0 -2
  38. package/dist/esm/chunk-VUTJEPVF.js.map +0 -7
  39. /package/dist/esm/{chunk-R7I3KJ5Z.js.map → chunk-TVXJJLBF.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/swap.canister.ts", "../../candid/sns_swap.certified.idl.js", "../../candid/sns_swap.idl.js", "../../src/converters/swap.converters.ts", "../../src/errors/common.errors.ts", "../../src/errors/swap.errors.ts", "../../src/utils/error.utils.ts"],
4
+ "sourcesContent": ["import type { QueryParams } from \"@dfinity/utils\";\nimport {\n Canister,\n createServices,\n fromDefinedNullable,\n fromNullable,\n} from \"@dfinity/utils\";\nimport type {\n BuyerState,\n GetAutoFinalizationStatusResponse,\n GetBuyerStateRequest,\n GetDerivedStateResponse,\n GetLifecycleResponse,\n GetSaleParametersResponse,\n GetStateResponse,\n RefreshBuyerTokensRequest,\n RefreshBuyerTokensResponse,\n _SERVICE as SnsSwapService,\n Ticket,\n} from \"../candid/sns_swap\";\nimport { idlFactory as certifiedIdlFactory } from \"../candid/sns_swap.certified.idl\";\nimport { idlFactory } from \"../candid/sns_swap.idl\";\nimport { toNewSaleTicketRequest } from \"./converters/swap.converters\";\nimport { UnsupportedMethodError } from \"./errors/common.errors\";\nimport {\n SnsSwapGetOpenTicketError,\n SnsSwapNewTicketError,\n} from \"./errors/swap.errors\";\nimport type { SnsCanisterOptions } from \"./types/canister.options\";\nimport type { NewSaleTicketParams } from \"./types/swap.params\";\nimport { isMethodNotSupportedError } from \"./utils/error.utils\";\n\nexport class SnsSwapCanister extends Canister<SnsSwapService> {\n static create(options: SnsCanisterOptions<SnsSwapService>) {\n const { service, certifiedService, canisterId } =\n createServices<SnsSwapService>({\n options,\n idlFactory,\n certifiedIdlFactory,\n });\n\n return new SnsSwapCanister(canisterId, service, certifiedService);\n }\n\n /**\n * Get the state of the swap\n */\n state = (params: QueryParams): Promise<GetStateResponse> =>\n this.caller(params).get_state({});\n\n /**\n * Notify of the payment failure to remove the ticket\n */\n notifyPaymentFailure = async (): Promise<Ticket | undefined> => {\n const { ticket } = await this.caller({\n certified: true,\n }).notify_payment_failure({});\n return fromNullable(ticket);\n };\n\n /**\n * Notify of the user participating in the swap\n */\n notifyParticipation = async (\n params: RefreshBuyerTokensRequest,\n ): Promise<RefreshBuyerTokensResponse> =>\n await this.caller({ certified: true }).refresh_buyer_tokens(params);\n\n /**\n * Get user commitment\n */\n getUserCommitment = async (\n params: GetBuyerStateRequest & QueryParams,\n ): Promise<BuyerState | undefined> => {\n const { buyer_state } = await this.caller({\n certified: params.certified,\n }).get_buyer_state({ principal_id: params.principal_id });\n return fromNullable(buyer_state);\n };\n\n /**\n * Get sale buyers state\n */\n getDerivedState = async ({\n certified,\n }: QueryParams): Promise<GetDerivedStateResponse> => {\n return this.caller({ certified }).get_derived_state({});\n };\n\n /**\n * Get sale parameters\n */\n getSaleParameters = async ({\n certified,\n }: QueryParams): Promise<GetSaleParametersResponse> => {\n return this.caller({ certified }).get_sale_parameters({});\n };\n\n /**\n * Return a sale ticket if created and not yet removed (payment flow)\n */\n getOpenTicket = async (params: QueryParams): Promise<Ticket | undefined> => {\n const { result: response } = await this.caller({\n certified: params.certified,\n }).get_open_ticket({});\n const result = fromDefinedNullable(response);\n\n if (\"Ok\" in result) {\n return fromNullable(result.Ok.ticket);\n }\n\n const errorType = fromDefinedNullable(result?.Err?.error_type);\n throw new SnsSwapGetOpenTicketError(errorType);\n };\n\n /**\n * Create a sale ticket (payment flow)\n */\n newSaleTicket = async (params: NewSaleTicketParams): Promise<Ticket> => {\n const request = toNewSaleTicketRequest(params);\n const { result: response } = await this.caller({\n certified: true,\n }).new_sale_ticket(request);\n\n const result = fromDefinedNullable(response);\n\n if (\"Ok\" in result) {\n return fromDefinedNullable(result.Ok.ticket);\n }\n\n const errorData = result.Err;\n const error = new SnsSwapNewTicketError({\n errorType: errorData.error_type,\n invalidUserAmount: fromNullable(errorData.invalid_user_amount ?? []),\n existingTicket: fromNullable(errorData.existing_ticket ?? []),\n });\n\n throw error;\n };\n\n /**\n * Get sale lifecycle state\n */\n getLifecycle = async (params: QueryParams): Promise<GetLifecycleResponse> => {\n return this.caller(params).get_lifecycle({});\n };\n\n /**\n * Get sale lifecycle state\n */\n getFinalizationStatus = async (\n params: QueryParams,\n ): Promise<GetAutoFinalizationStatusResponse> => {\n try {\n return await this.caller(params).get_auto_finalization_status({});\n } catch (error) {\n // Throw a custom error if the method is not supported by the canister\n if (isMethodNotSupportedError(error)) {\n throw new UnsupportedMethodError(\"getFinalizationStatus\");\n }\n throw error;\n }\n };\n}\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_swap.did */\nexport const idlFactory = ({ IDL }) => {\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\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 Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const Init = IDL.Record({\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'sns_root_canister_id' : IDL.Text,\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 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat32),\n 'sns_token_e8s' : IDL.Opt(IDL.Nat64),\n 'nns_governance_canister_id' : IDL.Text,\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'icp_ledger_canister_id' : IDL.Text,\n 'sns_ledger_canister_id' : IDL.Text,\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'should_auto_finalize' : IDL.Opt(IDL.Bool),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_governance_canister_id' : IDL.Text,\n 'min_direct_participation_icp_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 ErrorRefundIcpRequest = IDL.Record({\n 'source_principal_id' : IDL.Opt(IDL.Principal),\n });\n const Ok = IDL.Record({ 'block_height' : IDL.Opt(IDL.Nat64) });\n const Err = IDL.Record({\n 'description' : IDL.Opt(IDL.Text),\n 'error_type' : IDL.Opt(IDL.Int32),\n });\n const Result = IDL.Variant({ 'Ok' : Ok, 'Err' : Err });\n const ErrorRefundIcpResponse = IDL.Record({ 'result' : IDL.Opt(Result) });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n const Possibility = IDL.Variant({\n 'Ok' : SetDappControllersResponse,\n 'Err' : CanisterCallError,\n });\n const SetDappControllersCallResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility),\n });\n const SweepResult = IDL.Record({\n 'failure' : IDL.Nat32,\n 'skipped' : IDL.Nat32,\n 'invalid' : IDL.Nat32,\n 'success' : IDL.Nat32,\n 'global_failures' : IDL.Nat32,\n });\n const GovernanceError = IDL.Record({\n 'error_message' : IDL.Text,\n 'error_type' : IDL.Int32,\n });\n const Response = IDL.Record({\n 'governance_error' : IDL.Opt(GovernanceError),\n });\n const Possibility_1 = IDL.Variant({\n 'Ok' : Response,\n 'Err' : CanisterCallError,\n });\n const SettleCommunityFundParticipationResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_1),\n });\n const Ok_1 = IDL.Record({\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_neurons_count' : IDL.Opt(IDL.Nat64),\n });\n const Error = IDL.Record({ 'message' : IDL.Opt(IDL.Text) });\n const Possibility_2 = IDL.Variant({ 'Ok' : Ok_1, 'Err' : Error });\n const SettleNeuronsFundParticipationResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_2),\n });\n const Possibility_3 = IDL.Variant({\n 'Ok' : IDL.Record({}),\n 'Err' : CanisterCallError,\n });\n const SetModeCallResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_3),\n });\n const FinalizeSwapResponse = IDL.Record({\n 'set_dapp_controllers_call_result' : IDL.Opt(SetDappControllersCallResult),\n 'create_sns_neuron_recipes_result' : IDL.Opt(SweepResult),\n 'settle_community_fund_participation_result' : IDL.Opt(\n SettleCommunityFundParticipationResult\n ),\n 'error_message' : IDL.Opt(IDL.Text),\n 'settle_neurons_fund_participation_result' : IDL.Opt(\n SettleNeuronsFundParticipationResult\n ),\n 'set_mode_call_result' : IDL.Opt(SetModeCallResult),\n 'sweep_icp_result' : IDL.Opt(SweepResult),\n 'claim_neuron_result' : IDL.Opt(SweepResult),\n 'sweep_sns_result' : IDL.Opt(SweepResult),\n });\n const GetAutoFinalizationStatusResponse = IDL.Record({\n 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),\n 'has_auto_finalize_been_attempted' : IDL.Opt(IDL.Bool),\n 'is_auto_finalize_enabled' : IDL.Opt(IDL.Bool),\n });\n const GetBuyerStateRequest = IDL.Record({\n 'principal_id' : IDL.Opt(IDL.Principal),\n });\n const TransferableAmount = IDL.Record({\n 'transfer_fee_paid_e8s' : IDL.Opt(IDL.Nat64),\n 'transfer_start_timestamp_seconds' : IDL.Nat64,\n 'amount_e8s' : IDL.Nat64,\n 'amount_transferred_e8s' : IDL.Opt(IDL.Nat64),\n 'transfer_success_timestamp_seconds' : IDL.Nat64,\n });\n const BuyerState = IDL.Record({\n 'icp' : IDL.Opt(TransferableAmount),\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n });\n const GetBuyerStateResponse = IDL.Record({\n 'buyer_state' : IDL.Opt(BuyerState),\n });\n const GetBuyersTotalResponse = IDL.Record({ 'buyers_total' : IDL.Nat64 });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const GetDerivedStateResponse = IDL.Record({\n 'sns_tokens_per_icp' : IDL.Opt(IDL.Float64),\n 'buyer_total_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'cf_participant_count' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participant_count' : IDL.Opt(IDL.Nat64),\n 'cf_neuron_count' : IDL.Opt(IDL.Nat64),\n });\n const GetInitResponse = IDL.Record({ 'init' : IDL.Opt(Init) });\n const GetLifecycleResponse = IDL.Record({\n 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'lifecycle' : IDL.Opt(IDL.Int32),\n 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n });\n const Icrc1Account = IDL.Record({\n 'owner' : IDL.Opt(IDL.Principal),\n 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const Ticket = IDL.Record({\n 'creation_time' : IDL.Nat64,\n 'ticket_id' : IDL.Nat64,\n 'account' : IDL.Opt(Icrc1Account),\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const Ok_2 = IDL.Record({ 'ticket' : IDL.Opt(Ticket) });\n const Err_1 = IDL.Record({ 'error_type' : IDL.Opt(IDL.Int32) });\n const Result_1 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_1 });\n const GetOpenTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });\n const Params = IDL.Record({\n 'min_participant_icp_e8s' : IDL.Nat64,\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'max_icp_e8s' : IDL.Nat64,\n 'swap_due_timestamp_seconds' : IDL.Nat64,\n 'min_participants' : IDL.Nat32,\n 'sns_token_e8s' : IDL.Nat64,\n 'sale_delay_seconds' : IDL.Opt(IDL.Nat64),\n 'max_participant_icp_e8s' : IDL.Nat64,\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_icp_e8s' : IDL.Nat64,\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const GetSaleParametersResponse = IDL.Record({ 'params' : IDL.Opt(Params) });\n const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });\n const NeuronAttributes = IDL.Record({\n 'dissolve_delay_seconds' : IDL.Nat64,\n 'memo' : IDL.Nat64,\n 'followees' : IDL.Vec(NeuronId),\n });\n const Principals = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });\n const CfInvestment = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'hotkey_principal' : IDL.Text,\n 'hotkeys' : IDL.Opt(Principals),\n 'nns_neuron_id' : IDL.Nat64,\n });\n const DirectInvestment = IDL.Record({ 'buyer_principal' : IDL.Text });\n const Investor = IDL.Variant({\n 'CommunityFund' : CfInvestment,\n 'Direct' : DirectInvestment,\n });\n const SnsNeuronRecipe = IDL.Record({\n 'sns' : IDL.Opt(TransferableAmount),\n 'claimed_status' : IDL.Opt(IDL.Int32),\n 'neuron_attributes' : IDL.Opt(NeuronAttributes),\n 'investor' : IDL.Opt(Investor),\n });\n const CfNeuron = IDL.Record({\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n 'hotkeys' : IDL.Opt(Principals),\n 'nns_neuron_id' : IDL.Nat64,\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const CfParticipant = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'hotkey_principal' : IDL.Text,\n 'cf_neurons' : IDL.Vec(CfNeuron),\n });\n const Swap = IDL.Record({\n 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),\n 'neuron_recipes' : IDL.Vec(SnsNeuronRecipe),\n 'next_ticket_id' : IDL.Opt(IDL.Nat64),\n 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'finalize_swap_in_progress' : IDL.Opt(IDL.Bool),\n 'cf_participants' : IDL.Vec(CfParticipant),\n 'init' : IDL.Opt(Init),\n 'already_tried_to_auto_finalize' : IDL.Opt(IDL.Bool),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'purge_old_tickets_last_completion_timestamp_nanoseconds' : IDL.Opt(\n IDL.Nat64\n ),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'lifecycle' : IDL.Int32,\n 'purge_old_tickets_next_principal' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'buyers' : IDL.Vec(IDL.Tuple(IDL.Text, BuyerState)),\n 'params' : IDL.Opt(Params),\n 'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),\n });\n const DerivedState = IDL.Record({\n 'sns_tokens_per_icp' : IDL.Float32,\n 'buyer_total_icp_e8s' : IDL.Nat64,\n 'cf_participant_count' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participant_count' : IDL.Opt(IDL.Nat64),\n 'cf_neuron_count' : IDL.Opt(IDL.Nat64),\n });\n const GetStateResponse = IDL.Record({\n 'swap' : IDL.Opt(Swap),\n 'derived' : IDL.Opt(DerivedState),\n });\n const ListCommunityFundParticipantsRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat64),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const ListCommunityFundParticipantsResponse = IDL.Record({\n 'cf_participants' : IDL.Vec(CfParticipant),\n });\n const ListDirectParticipantsRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat32),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const Participant = IDL.Record({\n 'participation' : IDL.Opt(BuyerState),\n 'participant_id' : IDL.Opt(IDL.Principal),\n });\n const ListDirectParticipantsResponse = IDL.Record({\n 'participants' : IDL.Vec(Participant),\n });\n const ListSnsNeuronRecipesRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat64),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const ListSnsNeuronRecipesResponse = IDL.Record({\n 'sns_neuron_recipes' : IDL.Vec(SnsNeuronRecipe),\n });\n const NewSaleTicketRequest = IDL.Record({\n 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const InvalidUserAmount = IDL.Record({\n 'min_amount_icp_e8s_included' : IDL.Nat64,\n 'max_amount_icp_e8s_included' : IDL.Nat64,\n });\n const Err_2 = IDL.Record({\n 'invalid_user_amount' : IDL.Opt(InvalidUserAmount),\n 'existing_ticket' : IDL.Opt(Ticket),\n 'error_type' : IDL.Int32,\n });\n const Result_2 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_2 });\n const NewSaleTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_2) });\n const RefreshBuyerTokensRequest = IDL.Record({\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'buyer' : IDL.Text,\n });\n const RefreshBuyerTokensResponse = IDL.Record({\n 'icp_accepted_participation_e8s' : IDL.Nat64,\n 'icp_ledger_account_balance_e8s' : IDL.Nat64,\n });\n return IDL.Service({\n 'error_refund_icp' : IDL.Func(\n [ErrorRefundIcpRequest],\n [ErrorRefundIcpResponse],\n [],\n ),\n 'finalize_swap' : IDL.Func([IDL.Record({})], [FinalizeSwapResponse], []),\n 'get_auto_finalization_status' : IDL.Func(\n [IDL.Record({})],\n [GetAutoFinalizationStatusResponse],\n [],\n ),\n 'get_buyer_state' : IDL.Func(\n [GetBuyerStateRequest],\n [GetBuyerStateResponse],\n [],\n ),\n 'get_buyers_total' : IDL.Func(\n [IDL.Record({})],\n [GetBuyersTotalResponse],\n [],\n ),\n 'get_canister_status' : IDL.Func(\n [IDL.Record({})],\n [CanisterStatusResultV2],\n [],\n ),\n 'get_derived_state' : IDL.Func(\n [IDL.Record({})],\n [GetDerivedStateResponse],\n [],\n ),\n 'get_init' : IDL.Func([IDL.Record({})], [GetInitResponse], []),\n 'get_lifecycle' : IDL.Func([IDL.Record({})], [GetLifecycleResponse], []),\n 'get_open_ticket' : IDL.Func([IDL.Record({})], [GetOpenTicketResponse], []),\n 'get_sale_parameters' : IDL.Func(\n [IDL.Record({})],\n [GetSaleParametersResponse],\n [],\n ),\n 'get_state' : IDL.Func([IDL.Record({})], [GetStateResponse], []),\n 'list_community_fund_participants' : IDL.Func(\n [ListCommunityFundParticipantsRequest],\n [ListCommunityFundParticipantsResponse],\n [],\n ),\n 'list_direct_participants' : IDL.Func(\n [ListDirectParticipantsRequest],\n [ListDirectParticipantsResponse],\n [],\n ),\n 'list_sns_neuron_recipes' : IDL.Func(\n [ListSnsNeuronRecipesRequest],\n [ListSnsNeuronRecipesResponse],\n [],\n ),\n 'new_sale_ticket' : IDL.Func(\n [NewSaleTicketRequest],\n [NewSaleTicketResponse],\n [],\n ),\n 'notify_payment_failure' : IDL.Func([IDL.Record({})], [Ok_2], []),\n 'refresh_buyer_tokens' : IDL.Func(\n [RefreshBuyerTokensRequest],\n [RefreshBuyerTokensResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\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 Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const Init = IDL.Record({\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'sns_root_canister_id' : IDL.Text,\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 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat32),\n 'sns_token_e8s' : IDL.Opt(IDL.Nat64),\n 'nns_governance_canister_id' : IDL.Text,\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'icp_ledger_canister_id' : IDL.Text,\n 'sns_ledger_canister_id' : IDL.Text,\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'should_auto_finalize' : IDL.Opt(IDL.Bool),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_governance_canister_id' : IDL.Text,\n 'min_direct_participation_icp_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 return [Init];\n};\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_swap.did */\nexport const idlFactory = ({ IDL }) => {\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\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 Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const Init = IDL.Record({\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'sns_root_canister_id' : IDL.Text,\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 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat32),\n 'sns_token_e8s' : IDL.Opt(IDL.Nat64),\n 'nns_governance_canister_id' : IDL.Text,\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'icp_ledger_canister_id' : IDL.Text,\n 'sns_ledger_canister_id' : IDL.Text,\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'should_auto_finalize' : IDL.Opt(IDL.Bool),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_governance_canister_id' : IDL.Text,\n 'min_direct_participation_icp_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 ErrorRefundIcpRequest = IDL.Record({\n 'source_principal_id' : IDL.Opt(IDL.Principal),\n });\n const Ok = IDL.Record({ 'block_height' : IDL.Opt(IDL.Nat64) });\n const Err = IDL.Record({\n 'description' : IDL.Opt(IDL.Text),\n 'error_type' : IDL.Opt(IDL.Int32),\n });\n const Result = IDL.Variant({ 'Ok' : Ok, 'Err' : Err });\n const ErrorRefundIcpResponse = IDL.Record({ 'result' : IDL.Opt(Result) });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n const Possibility = IDL.Variant({\n 'Ok' : SetDappControllersResponse,\n 'Err' : CanisterCallError,\n });\n const SetDappControllersCallResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility),\n });\n const SweepResult = IDL.Record({\n 'failure' : IDL.Nat32,\n 'skipped' : IDL.Nat32,\n 'invalid' : IDL.Nat32,\n 'success' : IDL.Nat32,\n 'global_failures' : IDL.Nat32,\n });\n const GovernanceError = IDL.Record({\n 'error_message' : IDL.Text,\n 'error_type' : IDL.Int32,\n });\n const Response = IDL.Record({\n 'governance_error' : IDL.Opt(GovernanceError),\n });\n const Possibility_1 = IDL.Variant({\n 'Ok' : Response,\n 'Err' : CanisterCallError,\n });\n const SettleCommunityFundParticipationResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_1),\n });\n const Ok_1 = IDL.Record({\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_neurons_count' : IDL.Opt(IDL.Nat64),\n });\n const Error = IDL.Record({ 'message' : IDL.Opt(IDL.Text) });\n const Possibility_2 = IDL.Variant({ 'Ok' : Ok_1, 'Err' : Error });\n const SettleNeuronsFundParticipationResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_2),\n });\n const Possibility_3 = IDL.Variant({\n 'Ok' : IDL.Record({}),\n 'Err' : CanisterCallError,\n });\n const SetModeCallResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_3),\n });\n const FinalizeSwapResponse = IDL.Record({\n 'set_dapp_controllers_call_result' : IDL.Opt(SetDappControllersCallResult),\n 'create_sns_neuron_recipes_result' : IDL.Opt(SweepResult),\n 'settle_community_fund_participation_result' : IDL.Opt(\n SettleCommunityFundParticipationResult\n ),\n 'error_message' : IDL.Opt(IDL.Text),\n 'settle_neurons_fund_participation_result' : IDL.Opt(\n SettleNeuronsFundParticipationResult\n ),\n 'set_mode_call_result' : IDL.Opt(SetModeCallResult),\n 'sweep_icp_result' : IDL.Opt(SweepResult),\n 'claim_neuron_result' : IDL.Opt(SweepResult),\n 'sweep_sns_result' : IDL.Opt(SweepResult),\n });\n const GetAutoFinalizationStatusResponse = IDL.Record({\n 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),\n 'has_auto_finalize_been_attempted' : IDL.Opt(IDL.Bool),\n 'is_auto_finalize_enabled' : IDL.Opt(IDL.Bool),\n });\n const GetBuyerStateRequest = IDL.Record({\n 'principal_id' : IDL.Opt(IDL.Principal),\n });\n const TransferableAmount = IDL.Record({\n 'transfer_fee_paid_e8s' : IDL.Opt(IDL.Nat64),\n 'transfer_start_timestamp_seconds' : IDL.Nat64,\n 'amount_e8s' : IDL.Nat64,\n 'amount_transferred_e8s' : IDL.Opt(IDL.Nat64),\n 'transfer_success_timestamp_seconds' : IDL.Nat64,\n });\n const BuyerState = IDL.Record({\n 'icp' : IDL.Opt(TransferableAmount),\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n });\n const GetBuyerStateResponse = IDL.Record({\n 'buyer_state' : IDL.Opt(BuyerState),\n });\n const GetBuyersTotalResponse = IDL.Record({ 'buyers_total' : IDL.Nat64 });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const GetDerivedStateResponse = IDL.Record({\n 'sns_tokens_per_icp' : IDL.Opt(IDL.Float64),\n 'buyer_total_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'cf_participant_count' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participant_count' : IDL.Opt(IDL.Nat64),\n 'cf_neuron_count' : IDL.Opt(IDL.Nat64),\n });\n const GetInitResponse = IDL.Record({ 'init' : IDL.Opt(Init) });\n const GetLifecycleResponse = IDL.Record({\n 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'lifecycle' : IDL.Opt(IDL.Int32),\n 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n });\n const Icrc1Account = IDL.Record({\n 'owner' : IDL.Opt(IDL.Principal),\n 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const Ticket = IDL.Record({\n 'creation_time' : IDL.Nat64,\n 'ticket_id' : IDL.Nat64,\n 'account' : IDL.Opt(Icrc1Account),\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const Ok_2 = IDL.Record({ 'ticket' : IDL.Opt(Ticket) });\n const Err_1 = IDL.Record({ 'error_type' : IDL.Opt(IDL.Int32) });\n const Result_1 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_1 });\n const GetOpenTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });\n const Params = IDL.Record({\n 'min_participant_icp_e8s' : IDL.Nat64,\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'max_icp_e8s' : IDL.Nat64,\n 'swap_due_timestamp_seconds' : IDL.Nat64,\n 'min_participants' : IDL.Nat32,\n 'sns_token_e8s' : IDL.Nat64,\n 'sale_delay_seconds' : IDL.Opt(IDL.Nat64),\n 'max_participant_icp_e8s' : IDL.Nat64,\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_icp_e8s' : IDL.Nat64,\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const GetSaleParametersResponse = IDL.Record({ 'params' : IDL.Opt(Params) });\n const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });\n const NeuronAttributes = IDL.Record({\n 'dissolve_delay_seconds' : IDL.Nat64,\n 'memo' : IDL.Nat64,\n 'followees' : IDL.Vec(NeuronId),\n });\n const Principals = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });\n const CfInvestment = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'hotkey_principal' : IDL.Text,\n 'hotkeys' : IDL.Opt(Principals),\n 'nns_neuron_id' : IDL.Nat64,\n });\n const DirectInvestment = IDL.Record({ 'buyer_principal' : IDL.Text });\n const Investor = IDL.Variant({\n 'CommunityFund' : CfInvestment,\n 'Direct' : DirectInvestment,\n });\n const SnsNeuronRecipe = IDL.Record({\n 'sns' : IDL.Opt(TransferableAmount),\n 'claimed_status' : IDL.Opt(IDL.Int32),\n 'neuron_attributes' : IDL.Opt(NeuronAttributes),\n 'investor' : IDL.Opt(Investor),\n });\n const CfNeuron = IDL.Record({\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n 'hotkeys' : IDL.Opt(Principals),\n 'nns_neuron_id' : IDL.Nat64,\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const CfParticipant = IDL.Record({\n 'controller' : IDL.Opt(IDL.Principal),\n 'hotkey_principal' : IDL.Text,\n 'cf_neurons' : IDL.Vec(CfNeuron),\n });\n const Swap = IDL.Record({\n 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),\n 'neuron_recipes' : IDL.Vec(SnsNeuronRecipe),\n 'next_ticket_id' : IDL.Opt(IDL.Nat64),\n 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'finalize_swap_in_progress' : IDL.Opt(IDL.Bool),\n 'cf_participants' : IDL.Vec(CfParticipant),\n 'init' : IDL.Opt(Init),\n 'already_tried_to_auto_finalize' : IDL.Opt(IDL.Bool),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'purge_old_tickets_last_completion_timestamp_nanoseconds' : IDL.Opt(\n IDL.Nat64\n ),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'lifecycle' : IDL.Int32,\n 'purge_old_tickets_next_principal' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'buyers' : IDL.Vec(IDL.Tuple(IDL.Text, BuyerState)),\n 'params' : IDL.Opt(Params),\n 'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),\n });\n const DerivedState = IDL.Record({\n 'sns_tokens_per_icp' : IDL.Float32,\n 'buyer_total_icp_e8s' : IDL.Nat64,\n 'cf_participant_count' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participant_count' : IDL.Opt(IDL.Nat64),\n 'cf_neuron_count' : IDL.Opt(IDL.Nat64),\n });\n const GetStateResponse = IDL.Record({\n 'swap' : IDL.Opt(Swap),\n 'derived' : IDL.Opt(DerivedState),\n });\n const ListCommunityFundParticipantsRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat64),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const ListCommunityFundParticipantsResponse = IDL.Record({\n 'cf_participants' : IDL.Vec(CfParticipant),\n });\n const ListDirectParticipantsRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat32),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const Participant = IDL.Record({\n 'participation' : IDL.Opt(BuyerState),\n 'participant_id' : IDL.Opt(IDL.Principal),\n });\n const ListDirectParticipantsResponse = IDL.Record({\n 'participants' : IDL.Vec(Participant),\n });\n const ListSnsNeuronRecipesRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat64),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const ListSnsNeuronRecipesResponse = IDL.Record({\n 'sns_neuron_recipes' : IDL.Vec(SnsNeuronRecipe),\n });\n const NewSaleTicketRequest = IDL.Record({\n 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const InvalidUserAmount = IDL.Record({\n 'min_amount_icp_e8s_included' : IDL.Nat64,\n 'max_amount_icp_e8s_included' : IDL.Nat64,\n });\n const Err_2 = IDL.Record({\n 'invalid_user_amount' : IDL.Opt(InvalidUserAmount),\n 'existing_ticket' : IDL.Opt(Ticket),\n 'error_type' : IDL.Int32,\n });\n const Result_2 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_2 });\n const NewSaleTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_2) });\n const RefreshBuyerTokensRequest = IDL.Record({\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'buyer' : IDL.Text,\n });\n const RefreshBuyerTokensResponse = IDL.Record({\n 'icp_accepted_participation_e8s' : IDL.Nat64,\n 'icp_ledger_account_balance_e8s' : IDL.Nat64,\n });\n return IDL.Service({\n 'error_refund_icp' : IDL.Func(\n [ErrorRefundIcpRequest],\n [ErrorRefundIcpResponse],\n [],\n ),\n 'finalize_swap' : IDL.Func([IDL.Record({})], [FinalizeSwapResponse], []),\n 'get_auto_finalization_status' : IDL.Func(\n [IDL.Record({})],\n [GetAutoFinalizationStatusResponse],\n ['query'],\n ),\n 'get_buyer_state' : IDL.Func(\n [GetBuyerStateRequest],\n [GetBuyerStateResponse],\n ['query'],\n ),\n 'get_buyers_total' : IDL.Func(\n [IDL.Record({})],\n [GetBuyersTotalResponse],\n [],\n ),\n 'get_canister_status' : IDL.Func(\n [IDL.Record({})],\n [CanisterStatusResultV2],\n [],\n ),\n 'get_derived_state' : IDL.Func(\n [IDL.Record({})],\n [GetDerivedStateResponse],\n ['query'],\n ),\n 'get_init' : IDL.Func([IDL.Record({})], [GetInitResponse], ['query']),\n 'get_lifecycle' : IDL.Func(\n [IDL.Record({})],\n [GetLifecycleResponse],\n ['query'],\n ),\n 'get_open_ticket' : IDL.Func(\n [IDL.Record({})],\n [GetOpenTicketResponse],\n ['query'],\n ),\n 'get_sale_parameters' : IDL.Func(\n [IDL.Record({})],\n [GetSaleParametersResponse],\n ['query'],\n ),\n 'get_state' : IDL.Func([IDL.Record({})], [GetStateResponse], ['query']),\n 'list_community_fund_participants' : IDL.Func(\n [ListCommunityFundParticipantsRequest],\n [ListCommunityFundParticipantsResponse],\n ['query'],\n ),\n 'list_direct_participants' : IDL.Func(\n [ListDirectParticipantsRequest],\n [ListDirectParticipantsResponse],\n ['query'],\n ),\n 'list_sns_neuron_recipes' : IDL.Func(\n [ListSnsNeuronRecipesRequest],\n [ListSnsNeuronRecipesResponse],\n ['query'],\n ),\n 'new_sale_ticket' : IDL.Func(\n [NewSaleTicketRequest],\n [NewSaleTicketResponse],\n [],\n ),\n 'notify_payment_failure' : IDL.Func([IDL.Record({})], [Ok_2], []),\n 'refresh_buyer_tokens' : IDL.Func(\n [RefreshBuyerTokensRequest],\n [RefreshBuyerTokensResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\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 Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const Init = IDL.Record({\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'sns_root_canister_id' : IDL.Text,\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 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat32),\n 'sns_token_e8s' : IDL.Opt(IDL.Nat64),\n 'nns_governance_canister_id' : IDL.Text,\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'icp_ledger_canister_id' : IDL.Text,\n 'sns_ledger_canister_id' : IDL.Text,\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'should_auto_finalize' : IDL.Opt(IDL.Bool),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_governance_canister_id' : IDL.Text,\n 'min_direct_participation_icp_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 return [Init];\n};\n", "import type { NewSaleTicketRequest } from \"../../candid/sns_swap\";\nimport type { NewSaleTicketParams } from \"../types/swap.params\";\n\n// Helper for building `NewSaleTicketRequest` structure\nexport const toNewSaleTicketRequest = ({\n subaccount,\n amount_icp_e8s,\n}: NewSaleTicketParams): NewSaleTicketRequest => ({\n subaccount: subaccount === undefined ? [] : [subaccount],\n amount_icp_e8s,\n});\n", "// This is possible specially in SNS projects/\n// Because they share the same canisters but in different versions.\nexport class UnsupportedMethodError extends Error {\n constructor(public readonly methodName: string) {\n super();\n }\n}\n", "import type { InvalidUserAmount, Ticket } from \"../../candid/sns_swap\";\nimport type {\n GetOpenTicketErrorType,\n NewSaleTicketResponseErrorType,\n} from \"../enums/swap.enums\";\n\nexport class SnsSwapNewTicketError extends Error {\n public errorType: NewSaleTicketResponseErrorType;\n public invalidUserAmount?: InvalidUserAmount;\n public existingTicket?: Ticket;\n\n constructor({\n errorType,\n invalidUserAmount,\n existingTicket,\n }: {\n errorType: NewSaleTicketResponseErrorType;\n invalidUserAmount?: InvalidUserAmount;\n existingTicket?: Ticket;\n }) {\n super();\n this.errorType = errorType;\n this.invalidUserAmount = invalidUserAmount;\n this.existingTicket = existingTicket;\n }\n}\n\nexport class SnsSwapGetOpenTicketError extends Error {\n constructor(public errorType: GetOpenTicketErrorType) {\n super();\n }\n}\n", "import { nonNullish } from \"@dfinity/utils\";\n\n/**\n * Identifies errors of method not being present in the canister.\n *\n * This is useful because SNS projects have different versions of SNS canisters.\n * Therefore, what works in the latest version might not work in the previous one.\n *\n * Error message example: \"Call was rejected:\n * Request ID: 3a6ef904b35fd19721c95c3df2b0b00b8abefba7f0ad188f5c472809b772c914\n * Reject code: 3\n * Reject text: Canister 75ffu-oaaaa-aaaaa-aabbq-cai has no update method 'get_auto_finalization_status'\"\n */\nexport const isMethodNotSupportedError = (err: unknown): boolean => {\n if (typeof err === \"object\" && nonNullish(err) && \"message\" in err) {\n const message = err.message as string;\n return (\n message.includes(\"has no update method\") ||\n message.includes(\"has no query method\")\n );\n }\n return false;\n};\n"],
5
+ "mappings": "AACA,OACE,YAAAA,GACA,kBAAAC,GACA,uBAAAC,EACA,gBAAAC,MACK,iBCLA,IAAMC,GAAa,CAAC,CAAE,IAAAC,CAAI,IAAM,CACrC,IAAMC,EAAqCD,EAAI,OAAO,CACpD,gCAAoCA,EAAI,MACxC,MAAUA,EAAI,KAChB,CAAC,EACKE,EAA2BF,EAAI,OAAO,CAC1C,gBAAoBA,EAAI,I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AAI,CACF,OAAO,MAAM,KAAK,OAAOA,CAAM,EAAE,6BAA6B,CAAC,CAAC,CAClE,OAASc,EAAO,CAEd,MAAIC,GAA0BD,CAAK,EAC3B,IAAIE,EAAuB,uBAAuB,EAEpDF,CACR,CACF,EAjIA,OAAO,OAAOG,EAA6C,CACzD,GAAM,CAAE,QAAAC,EAAS,iBAAAC,EAAkB,WAAAC,CAAW,EAC5CC,GAA+B,CAC7B,QAAAJ,EACA,WAAAK,GACA,oBAAAA,EACF,CAAC,EAEH,OAAO,IAAIxB,EAAgBsB,EAAYF,EAASC,CAAgB,CAClE,CAyHF",
6
+ "names": ["Canister", "createServices", "fromDefinedNullable", "fromNullable", "idlFactory", "IDL", "NeuronBasketConstructionParameters", "LinearScalingCoefficient", "IdealMatchedParticipationFunction", "NeuronsFundParticipationConstraints", "Countries", "Init", "ErrorRefundIcpRequest", "Ok", "Err", "Result", "ErrorRefundIcpResponse", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "Possibility", "SetDappControllersCallResult", "SweepResult", "GovernanceError", "Response", "Possibility_1", "SettleCommunityFundParticipationResult", "Ok_1", "Error", "Possibility_2", "SettleNeuronsFundParticipationResult", "Possibility_3", "SetModeCallResult", "FinalizeSwapResponse", "GetAutoFinalizationStatusResponse", "GetBuyerStateRequest", "TransferableAmount", "BuyerState", "GetBuyerStateResponse", "GetBuyersTotalResponse", "CanisterStatusType", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "GetDerivedStateResponse", "GetInitResponse", "GetLifecycleResponse", "Icrc1Account", "Ticket", "Ok_2", "Err_1", "Result_1", "GetOpenTicketResponse", "Params", "GetSaleParametersResponse", "NeuronId", "NeuronAttributes", "Principals", "CfInvestment", "DirectInvestment", "Investor", "SnsNeuronRecipe", "CfNeuron", "CfParticipant", "Swap", "DerivedState", "GetStateResponse", "ListCommunityFundParticipantsRequest", "ListCommunityFundParticipantsResponse", "ListDirectParticipantsRequest", "Participant", "ListDirectParticipantsResponse", "ListSnsNeuronRecipesRequest", "ListSnsNeuronRecipesResponse", "NewSaleTicketRequest", "InvalidUserAmount", "Err_2", "Result_2", "NewSaleTicketResponse", "RefreshBuyerTokensRequest", "RefreshBuyerTokensResponse", "idlFactory", "IDL", "NeuronBasketConstructionParameters", "LinearScalingCoefficient", "IdealMatchedParticipationFunction", "NeuronsFundParticipationConstraints", "Countries", "Init", "ErrorRefundIcpRequest", "Ok", "Err", "Result", "ErrorRefundIcpResponse", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "Possibility", "SetDappControllersCallResult", "SweepResult", "GovernanceError", "Response", "Possibility_1", "SettleCommunityFundParticipationResult", "Ok_1", "Error", "Possibility_2", "SettleNeuronsFundParticipationResult", "Possibility_3", "SetModeCallResult", "FinalizeSwapResponse", "GetAutoFinalizationStatusResponse", "GetBuyerStateRequest", "TransferableAmount", "BuyerState", "GetBuyerStateResponse", "GetBuyersTotalResponse", "CanisterStatusType", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "GetDerivedStateResponse", "GetInitResponse", "GetLifecycleResponse", "Icrc1Account", "Ticket", "Ok_2", "Err_1", "Result_1", "GetOpenTicketResponse", "Params", "GetSaleParametersResponse", "NeuronId", "NeuronAttributes", "Principals", "CfInvestment", "DirectInvestment", "Investor", "SnsNeuronRecipe", "CfNeuron", "CfParticipant", "Swap", "DerivedState", "GetStateResponse", "ListCommunityFundParticipantsRequest", "ListCommunityFundParticipantsResponse", "ListDirectParticipantsRequest", "Participant", "ListDirectParticipantsResponse", "ListSnsNeuronRecipesRequest", "ListSnsNeuronRecipesResponse", "NewSaleTicketRequest", "InvalidUserAmount", "Err_2", "Result_2", "NewSaleTicketResponse", "RefreshBuyerTokensRequest", "RefreshBuyerTokensResponse", "toNewSaleTicketRequest", "subaccount", "amount_icp_e8s", "UnsupportedMethodError", "methodName", "SnsSwapNewTicketError", "errorType", "invalidUserAmount", "existingTicket", "SnsSwapGetOpenTicketError", "nonNullish", "isMethodNotSupportedError", "err", "message", "SnsSwapCanister", "_SnsSwapCanister", "Canister", "params", "ticket", "fromNullable", "buyer_state", "certified", "response", "result", "fromDefinedNullable", "errorType", "SnsSwapGetOpenTicketError", "request", "toNewSaleTicketRequest", "errorData", "SnsSwapNewTicketError", "error", "isMethodNotSupportedError", "UnsupportedMethodError", "options", "service", "certifiedService", "canisterId", "createServices", "idlFactory"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{Canister as f,createServices as F}from"@dfinity/utils";var V=({IDL:t})=>{let S=t.Record({dapp_canister_ids:t.Vec(t.Principal),testflight:t.Bool,latest_ledger_archive_poll_timestamp_seconds:t.Opt(t.Nat64),archive_canister_ids:t.Vec(t.Principal),governance_canister_id:t.Opt(t.Principal),index_canister_id:t.Opt(t.Principal),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal)}),i=t.Record({canister_id:t.Principal}),s=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),a=t.Variant({controllers:t.Null,public:t.Null}),r=t.Record({freezing_threshold:t.Opt(t.Nat),controllers:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat),log_visibility:t.Opt(a),wasm_memory_limit:t.Opt(t.Nat),memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),c=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:r,idle_cycles_burned_per_day:t.Opt(t.Nat),module_hash:t.Opt(t.Vec(t.Nat8)),reserved_cycles:t.Opt(t.Nat)}),o=t.Variant({reinstall:t.Null,upgrade:t.Null,install:t.Null}),p=t.Record({arg:t.Vec(t.Nat8),wasm_module:t.Vec(t.Nat8),stop_before_installing:t.Bool,mode:o,canister_id:t.Principal,memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),l=t.Record({update_canister_list:t.Opt(t.Bool)}),_=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),d=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:_,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),e=t.Record({status:t.Opt(d),canister_id:t.Opt(t.Principal)}),u=t.Record({root:t.Opt(e),swap:t.Opt(e),ledger:t.Opt(e),index:t.Opt(e),governance:t.Opt(e),dapps:t.Vec(e),archives:t.Vec(e)}),m=t.Record({root:t.Opt(t.Principal),swap:t.Opt(t.Principal),ledger:t.Opt(t.Principal),index:t.Opt(t.Principal),governance:t.Opt(t.Principal),dapps:t.Vec(t.Principal),archives:t.Vec(t.Principal)}),O=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),R=t.Record({failure_reason:t.Opt(t.Text)}),g=t.Record({canister_id:t.Opt(t.Principal)}),n=t.Record({canister_ids:t.Vec(t.Principal)}),N=t.Record({canister_ids:t.Opt(n),controller_principal_ids:t.Vec(t.Principal)}),y=t.Record({code:t.Opt(t.Int32),description:t.Text}),P=t.Record({err:t.Opt(y),dapp_canister_id:t.Opt(t.Principal)}),C=t.Record({failed_updates:t.Vec(P)});return t.Service({canister_status:t.Func([i],[c],[]),change_canister:t.Func([p],[],[]),get_build_metadata:t.Func([],[t.Text],[]),get_sns_canisters_summary:t.Func([l],[u],[]),list_sns_canisters:t.Func([t.Record({})],[m],[]),manage_dapp_canister_settings:t.Func([O],[R],[]),register_dapp_canister:t.Func([g],[t.Record({})],[]),register_dapp_canisters:t.Func([n],[t.Record({})],[]),set_dapp_controllers:t.Func([N],[C],[])})};var h=({IDL:t})=>{let S=t.Record({dapp_canister_ids:t.Vec(t.Principal),testflight:t.Bool,latest_ledger_archive_poll_timestamp_seconds:t.Opt(t.Nat64),archive_canister_ids:t.Vec(t.Principal),governance_canister_id:t.Opt(t.Principal),index_canister_id:t.Opt(t.Principal),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal)}),i=t.Record({canister_id:t.Principal}),s=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),a=t.Variant({controllers:t.Null,public:t.Null}),r=t.Record({freezing_threshold:t.Opt(t.Nat),controllers:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat),log_visibility:t.Opt(a),wasm_memory_limit:t.Opt(t.Nat),memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),c=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:r,idle_cycles_burned_per_day:t.Opt(t.Nat),module_hash:t.Opt(t.Vec(t.Nat8)),reserved_cycles:t.Opt(t.Nat)}),o=t.Variant({reinstall:t.Null,upgrade:t.Null,install:t.Null}),p=t.Record({arg:t.Vec(t.Nat8),wasm_module:t.Vec(t.Nat8),stop_before_installing:t.Bool,mode:o,canister_id:t.Principal,memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),l=t.Record({update_canister_list:t.Opt(t.Bool)}),_=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),d=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:_,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),e=t.Record({status:t.Opt(d),canister_id:t.Opt(t.Principal)}),u=t.Record({root:t.Opt(e),swap:t.Opt(e),ledger:t.Opt(e),index:t.Opt(e),governance:t.Opt(e),dapps:t.Vec(e),archives:t.Vec(e)}),m=t.Record({root:t.Opt(t.Principal),swap:t.Opt(t.Principal),ledger:t.Opt(t.Principal),index:t.Opt(t.Principal),governance:t.Opt(t.Principal),dapps:t.Vec(t.Principal),archives:t.Vec(t.Principal)}),O=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),R=t.Record({failure_reason:t.Opt(t.Text)}),g=t.Record({canister_id:t.Opt(t.Principal)}),n=t.Record({canister_ids:t.Vec(t.Principal)}),N=t.Record({canister_ids:t.Opt(n),controller_principal_ids:t.Vec(t.Principal)}),y=t.Record({code:t.Opt(t.Int32),description:t.Text}),P=t.Record({err:t.Opt(y),dapp_canister_id:t.Opt(t.Principal)}),C=t.Record({failed_updates:t.Vec(P)});return t.Service({canister_status:t.Func([i],[c],[]),change_canister:t.Func([p],[],[]),get_build_metadata:t.Func([],[t.Text],["query"]),get_sns_canisters_summary:t.Func([l],[u],[]),list_sns_canisters:t.Func([t.Record({})],[m],["query"]),manage_dapp_canister_settings:t.Func([O],[R],[]),register_dapp_canister:t.Func([g],[t.Record({})],[]),register_dapp_canisters:t.Func([n],[t.Record({})],[]),set_dapp_controllers:t.Func([N],[C],[])})};var v=class t extends f{constructor(){super(...arguments);this.listSnsCanisters=async({certified:i=!0})=>this.caller({certified:i}).list_sns_canisters({})}static create(i){let{service:s,certifiedService:a,canisterId:r}=F({options:i,idlFactory:h,certifiedIdlFactory:V});return new t(r,s,a)}};export{v as a};
2
+ //# sourceMappingURL=chunk-K2WYATWO.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/root.canister.ts", "../../candid/sns_root.certified.idl.js", "../../candid/sns_root.idl.js"],
4
+ "sourcesContent": ["import { Canister, createServices } from \"@dfinity/utils\";\nimport type {\n ListSnsCanistersResponse,\n _SERVICE as SnsRootService,\n} from \"../candid/sns_root\";\nimport { idlFactory as certifiedIdlFactory } from \"../candid/sns_root.certified.idl\";\nimport { idlFactory } from \"../candid/sns_root.idl\";\nimport type { SnsCanisterOptions } from \"./types/canister.options\";\n\nexport class SnsRootCanister extends Canister<SnsRootService> {\n static create(options: SnsCanisterOptions<SnsRootService>) {\n const { service, certifiedService, canisterId } =\n createServices<SnsRootService>({\n options,\n idlFactory,\n certifiedIdlFactory,\n });\n\n return new SnsRootCanister(canisterId, service, certifiedService);\n }\n\n /**\n * List the canisters that are part of the Sns.\n *\n * Source code: https://github.com/dfinity/ic/blob/master/rs/sns/root/src/lib.rs\n *\n * @param {Object} params\n * @param {boolean} [params.certified=true] - Query or update calls\n *\n * @returns {ListSnsCanistersResponse} - A list of canisters ('root' | 'governance' | 'ledger' | 'dapps' | 'swap' | 'archives')\n */\n listSnsCanisters = async ({\n certified = true,\n }: {\n certified?: boolean;\n }): Promise<ListSnsCanistersResponse> => {\n return this.caller({ certified }).list_sns_canisters({});\n };\n}\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_root.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n const CanisterIdRecord = IDL.Record({ 'canister_id' : IDL.Principal });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const LogVisibility = IDL.Variant({\n 'controllers' : IDL.Null,\n 'public' : IDL.Null,\n });\n const DefiniteCanisterSettings = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat),\n 'controllers' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat),\n 'log_visibility' : IDL.Opt(LogVisibility),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const CanisterStatusResult = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettings,\n 'idle_cycles_burned_per_day' : IDL.Opt(IDL.Nat),\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'reserved_cycles' : IDL.Opt(IDL.Nat),\n });\n const CanisterInstallMode = IDL.Variant({\n 'reinstall' : IDL.Null,\n 'upgrade' : IDL.Null,\n 'install' : IDL.Null,\n });\n const ChangeCanisterRequest = IDL.Record({\n 'arg' : IDL.Vec(IDL.Nat8),\n 'wasm_module' : IDL.Vec(IDL.Nat8),\n 'stop_before_installing' : IDL.Bool,\n 'mode' : CanisterInstallMode,\n 'canister_id' : IDL.Principal,\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const GetSnsCanistersSummaryRequest = IDL.Record({\n 'update_canister_list' : IDL.Opt(IDL.Bool),\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const CanisterSummary = IDL.Record({\n 'status' : IDL.Opt(CanisterStatusResultV2),\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const GetSnsCanistersSummaryResponse = IDL.Record({\n 'root' : IDL.Opt(CanisterSummary),\n 'swap' : IDL.Opt(CanisterSummary),\n 'ledger' : IDL.Opt(CanisterSummary),\n 'index' : IDL.Opt(CanisterSummary),\n 'governance' : IDL.Opt(CanisterSummary),\n 'dapps' : IDL.Vec(CanisterSummary),\n 'archives' : IDL.Vec(CanisterSummary),\n });\n const ListSnsCanistersResponse = IDL.Record({\n 'root' : IDL.Opt(IDL.Principal),\n 'swap' : IDL.Opt(IDL.Principal),\n 'ledger' : IDL.Opt(IDL.Principal),\n 'index' : IDL.Opt(IDL.Principal),\n 'governance' : IDL.Opt(IDL.Principal),\n 'dapps' : IDL.Vec(IDL.Principal),\n 'archives' : IDL.Vec(IDL.Principal),\n });\n const ManageDappCanisterSettingsRequest = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat64),\n 'canister_ids' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat64),\n 'log_visibility' : IDL.Opt(IDL.Int32),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat64),\n 'memory_allocation' : IDL.Opt(IDL.Nat64),\n 'compute_allocation' : IDL.Opt(IDL.Nat64),\n });\n const ManageDappCanisterSettingsResponse = IDL.Record({\n 'failure_reason' : IDL.Opt(IDL.Text),\n });\n const RegisterDappCanisterRequest = IDL.Record({\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const RegisterDappCanistersRequest = IDL.Record({\n 'canister_ids' : IDL.Vec(IDL.Principal),\n });\n const SetDappControllersRequest = IDL.Record({\n 'canister_ids' : IDL.Opt(RegisterDappCanistersRequest),\n 'controller_principal_ids' : IDL.Vec(IDL.Principal),\n });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n return IDL.Service({\n 'canister_status' : IDL.Func(\n [CanisterIdRecord],\n [CanisterStatusResult],\n [],\n ),\n 'change_canister' : IDL.Func([ChangeCanisterRequest], [], []),\n 'get_build_metadata' : IDL.Func([], [IDL.Text], []),\n 'get_sns_canisters_summary' : IDL.Func(\n [GetSnsCanistersSummaryRequest],\n [GetSnsCanistersSummaryResponse],\n [],\n ),\n 'list_sns_canisters' : IDL.Func(\n [IDL.Record({})],\n [ListSnsCanistersResponse],\n [],\n ),\n 'manage_dapp_canister_settings' : IDL.Func(\n [ManageDappCanisterSettingsRequest],\n [ManageDappCanisterSettingsResponse],\n [],\n ),\n 'register_dapp_canister' : IDL.Func(\n [RegisterDappCanisterRequest],\n [IDL.Record({})],\n [],\n ),\n 'register_dapp_canisters' : IDL.Func(\n [RegisterDappCanistersRequest],\n [IDL.Record({})],\n [],\n ),\n 'set_dapp_controllers' : IDL.Func(\n [SetDappControllersRequest],\n [SetDappControllersResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n return [SnsRootCanister];\n};\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_root.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n const CanisterIdRecord = IDL.Record({ 'canister_id' : IDL.Principal });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const LogVisibility = IDL.Variant({\n 'controllers' : IDL.Null,\n 'public' : IDL.Null,\n });\n const DefiniteCanisterSettings = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat),\n 'controllers' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat),\n 'log_visibility' : IDL.Opt(LogVisibility),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const CanisterStatusResult = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettings,\n 'idle_cycles_burned_per_day' : IDL.Opt(IDL.Nat),\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'reserved_cycles' : IDL.Opt(IDL.Nat),\n });\n const CanisterInstallMode = IDL.Variant({\n 'reinstall' : IDL.Null,\n 'upgrade' : IDL.Null,\n 'install' : IDL.Null,\n });\n const ChangeCanisterRequest = IDL.Record({\n 'arg' : IDL.Vec(IDL.Nat8),\n 'wasm_module' : IDL.Vec(IDL.Nat8),\n 'stop_before_installing' : IDL.Bool,\n 'mode' : CanisterInstallMode,\n 'canister_id' : IDL.Principal,\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const GetSnsCanistersSummaryRequest = IDL.Record({\n 'update_canister_list' : IDL.Opt(IDL.Bool),\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const CanisterSummary = IDL.Record({\n 'status' : IDL.Opt(CanisterStatusResultV2),\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const GetSnsCanistersSummaryResponse = IDL.Record({\n 'root' : IDL.Opt(CanisterSummary),\n 'swap' : IDL.Opt(CanisterSummary),\n 'ledger' : IDL.Opt(CanisterSummary),\n 'index' : IDL.Opt(CanisterSummary),\n 'governance' : IDL.Opt(CanisterSummary),\n 'dapps' : IDL.Vec(CanisterSummary),\n 'archives' : IDL.Vec(CanisterSummary),\n });\n const ListSnsCanistersResponse = IDL.Record({\n 'root' : IDL.Opt(IDL.Principal),\n 'swap' : IDL.Opt(IDL.Principal),\n 'ledger' : IDL.Opt(IDL.Principal),\n 'index' : IDL.Opt(IDL.Principal),\n 'governance' : IDL.Opt(IDL.Principal),\n 'dapps' : IDL.Vec(IDL.Principal),\n 'archives' : IDL.Vec(IDL.Principal),\n });\n const ManageDappCanisterSettingsRequest = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat64),\n 'canister_ids' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat64),\n 'log_visibility' : IDL.Opt(IDL.Int32),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat64),\n 'memory_allocation' : IDL.Opt(IDL.Nat64),\n 'compute_allocation' : IDL.Opt(IDL.Nat64),\n });\n const ManageDappCanisterSettingsResponse = IDL.Record({\n 'failure_reason' : IDL.Opt(IDL.Text),\n });\n const RegisterDappCanisterRequest = IDL.Record({\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const RegisterDappCanistersRequest = IDL.Record({\n 'canister_ids' : IDL.Vec(IDL.Principal),\n });\n const SetDappControllersRequest = IDL.Record({\n 'canister_ids' : IDL.Opt(RegisterDappCanistersRequest),\n 'controller_principal_ids' : IDL.Vec(IDL.Principal),\n });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n return IDL.Service({\n 'canister_status' : IDL.Func(\n [CanisterIdRecord],\n [CanisterStatusResult],\n [],\n ),\n 'change_canister' : IDL.Func([ChangeCanisterRequest], [], []),\n 'get_build_metadata' : IDL.Func([], [IDL.Text], ['query']),\n 'get_sns_canisters_summary' : IDL.Func(\n [GetSnsCanistersSummaryRequest],\n [GetSnsCanistersSummaryResponse],\n [],\n ),\n 'list_sns_canisters' : IDL.Func(\n [IDL.Record({})],\n [ListSnsCanistersResponse],\n ['query'],\n ),\n 'manage_dapp_canister_settings' : IDL.Func(\n [ManageDappCanisterSettingsRequest],\n [ManageDappCanisterSettingsResponse],\n [],\n ),\n 'register_dapp_canister' : IDL.Func(\n [RegisterDappCanisterRequest],\n [IDL.Record({})],\n [],\n ),\n 'register_dapp_canisters' : IDL.Func(\n [RegisterDappCanistersRequest],\n [IDL.Record({})],\n [],\n ),\n 'set_dapp_controllers' : IDL.Func(\n [SetDappControllersRequest],\n [SetDappControllersResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' :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I,OAAO,CAAC,CAAC,CAAC,EACf,CAACc,CAAwB,EACzB,CAAC,OAAO,CACV,EACF,8BAAkCd,EAAI,KAClC,CAACe,CAAiC,EAClC,CAACC,CAAkC,EACnC,CAAC,CACH,EACF,uBAA2BhB,EAAI,KAC3B,CAACiB,CAA2B,EAC5B,CAACjB,EAAI,OAAO,CAAC,CAAC,CAAC,EACf,CAAC,CACH,EACF,wBAA4BA,EAAI,KAC5B,CAACkB,CAA4B,EAC7B,CAAClB,EAAI,OAAO,CAAC,CAAC,CAAC,EACf,CAAC,CACH,EACF,qBAAyBA,EAAI,KACzB,CAACmB,CAAyB,EAC1B,CAACG,CAA0B,EAC3B,CAAC,CACH,CACJ,CAAC,CACH,EF5JO,IAAMC,EAAN,MAAMC,UAAwBC,CAAyB,CAAvD,kCAsBL,sBAAmB,MAAO,CACxB,UAAAC,EAAY,EACd,IAGS,KAAK,OAAO,CAAE,UAAAA,CAAU,CAAC,EAAE,mBAAmB,CAAC,CAAC,EA1BzD,OAAO,OAAOC,EAA6C,CACzD,GAAM,CAAE,QAAAC,EAAS,iBAAAC,EAAkB,WAAAC,CAAW,EAC5CC,EAA+B,CAC7B,QAAAJ,EACA,WAAAK,EACA,oBAAAA,CACF,CAAC,EAEH,OAAO,IAAIR,EAAgBM,EAAYF,EAASC,CAAgB,CAClE,CAmBF",
6
+ "names": ["Canister", "createServices", "idlFactory", "IDL", "SnsRootCanister", "CanisterIdRecord", "CanisterStatusType", "LogVisibility", "DefiniteCanisterSettings", "CanisterStatusResult", "CanisterInstallMode", "ChangeCanisterRequest", "GetSnsCanistersSummaryRequest", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "CanisterSummary", "GetSnsCanistersSummaryResponse", "ListSnsCanistersResponse", "ManageDappCanisterSettingsRequest", "ManageDappCanisterSettingsResponse", "RegisterDappCanisterRequest", "RegisterDappCanistersRequest", "SetDappControllersRequest", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "idlFactory", "IDL", "SnsRootCanister", "CanisterIdRecord", "CanisterStatusType", "LogVisibility", "DefiniteCanisterSettings", "CanisterStatusResult", "CanisterInstallMode", "ChangeCanisterRequest", "GetSnsCanistersSummaryRequest", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "CanisterSummary", "GetSnsCanistersSummaryResponse", "ListSnsCanistersResponse", "ManageDappCanisterSettingsRequest", "ManageDappCanisterSettingsResponse", "RegisterDappCanisterRequest", "RegisterDappCanistersRequest", "SetDappControllersRequest", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "SnsRootCanister", "_SnsRootCanister", "Canister", "certified", "options", "service", "certifiedService", "canisterId", "createServices", "idlFactory"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-VUTJEPVF.js";import{a as d}from"./chunk-4GE7OJRF.js";import{b as m}from"./chunk-CQAJ2SZB.js";import{d as S}from"./chunk-34CD4QJG.js";import{IcrcIndexCanister as u,IcrcLedgerCanister as P}from"@dfinity/ledger-icrc";import{assertNonNullish as r,fromNullable as e}from"@dfinity/utils";var W=async({agent:n,rootOptions:f,certified:t=!0})=>{let s=d.create({...f,agent:n}),{ledger:C,swap:I,governance:l,index:y}=await s.listSnsCanisters({certified:t}),i=e(l),o=e(C),a=e(I),p=e(y);return r(i),r(o),r(a),r(p),new m({root:s,governance:c.create({canisterId:i,agent:n}),ledger:P.create({canisterId:o,agent:n}),swap:S.create({canisterId:a,agent:n}),index:u.create({canisterId:p,agent:n}),certified:t})};export{W as a};
2
- //# sourceMappingURL=chunk-R7I3KJ5Z.js.map
1
+ import{b as c}from"./chunk-7CU6QPD4.js";import{a as d}from"./chunk-K2WYATWO.js";import{b as m}from"./chunk-CQAJ2SZB.js";import{d as S}from"./chunk-C7HBQQIL.js";import{IcrcIndexCanister as u,IcrcLedgerCanister as P}from"@dfinity/ledger-icrc";import{assertNonNullish as r,fromNullable as e}from"@dfinity/utils";var W=async({agent:n,rootOptions:f,certified:t=!0})=>{let s=d.create({...f,agent:n}),{ledger:C,swap:I,governance:l,index:y}=await s.listSnsCanisters({certified:t}),i=e(l),o=e(C),a=e(I),p=e(y);return r(i),r(o),r(a),r(p),new m({root:s,governance:c.create({canisterId:i,agent:n}),ledger:P.create({canisterId:o,agent:n}),swap:S.create({canisterId:a,agent:n}),index:u.create({canisterId:p,agent:n}),certified:t})};export{W as a};
2
+ //# sourceMappingURL=chunk-TVXJJLBF.js.map
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-VUTJEPVF.js";import"./chunk-4INNMFYU.js";export{a as SnsGovernanceCanister};
1
+ import{b as a}from"./chunk-7CU6QPD4.js";import"./chunk-4INNMFYU.js";export{a as SnsGovernanceCanister};
2
2
  //# sourceMappingURL=governance.canister.js.map
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as Ve}from"./chunk-R7I3KJ5Z.js";import{a as ne,b as ae}from"./chunk-VUTJEPVF.js";import{a as re}from"./chunk-4GE7OJRF.js";import{a as fe,b as Te}from"./chunk-CQAJ2SZB.js";import{a as Lt}from"./chunk-4INNMFYU.js";import{a as ve,b as ye,c as Se,d as ie}from"./chunk-34CD4QJG.js";var _e=(o=>(o[o.NEURON_PERMISSION_TYPE_UNSPECIFIED=0]="NEURON_PERMISSION_TYPE_UNSPECIFIED",o[o.NEURON_PERMISSION_TYPE_CONFIGURE_DISSOLVE_STATE=1]="NEURON_PERMISSION_TYPE_CONFIGURE_DISSOLVE_STATE",o[o.NEURON_PERMISSION_TYPE_MANAGE_PRINCIPALS=2]="NEURON_PERMISSION_TYPE_MANAGE_PRINCIPALS",o[o.NEURON_PERMISSION_TYPE_SUBMIT_PROPOSAL=3]="NEURON_PERMISSION_TYPE_SUBMIT_PROPOSAL",o[o.NEURON_PERMISSION_TYPE_VOTE=4]="NEURON_PERMISSION_TYPE_VOTE",o[o.NEURON_PERMISSION_TYPE_DISBURSE=5]="NEURON_PERMISSION_TYPE_DISBURSE",o[o.NEURON_PERMISSION_TYPE_SPLIT=6]="NEURON_PERMISSION_TYPE_SPLIT",o[o.NEURON_PERMISSION_TYPE_MERGE_MATURITY=7]="NEURON_PERMISSION_TYPE_MERGE_MATURITY",o[o.NEURON_PERMISSION_TYPE_DISBURSE_MATURITY=8]="NEURON_PERMISSION_TYPE_DISBURSE_MATURITY",o[o.NEURON_PERMISSION_TYPE_STAKE_MATURITY=9]="NEURON_PERMISSION_TYPE_STAKE_MATURITY",o[o.NEURON_PERMISSION_TYPE_MANAGE_VOTING_PERMISSION=10]="NEURON_PERMISSION_TYPE_MANAGE_VOTING_PERMISSION",o))(_e||{}),ce=(a=>(a[a.PROPOSAL_REWARD_STATUS_UNSPECIFIED=0]="PROPOSAL_REWARD_STATUS_UNSPECIFIED",a[a.PROPOSAL_REWARD_STATUS_ACCEPT_VOTES=1]="PROPOSAL_REWARD_STATUS_ACCEPT_VOTES",a[a.PROPOSAL_REWARD_STATUS_READY_TO_SETTLE=2]="PROPOSAL_REWARD_STATUS_READY_TO_SETTLE",a[a.PROPOSAL_REWARD_STATUS_SETTLED=3]="PROPOSAL_REWARD_STATUS_SETTLED",a))(ce||{}),pe=(e=>(e[e.PROPOSAL_DECISION_STATUS_UNSPECIFIED=0]="PROPOSAL_DECISION_STATUS_UNSPECIFIED",e[e.PROPOSAL_DECISION_STATUS_OPEN=1]="PROPOSAL_DECISION_STATUS_OPEN",e[e.PROPOSAL_DECISION_STATUS_REJECTED=2]="PROPOSAL_DECISION_STATUS_REJECTED",e[e.PROPOSAL_DECISION_STATUS_ADOPTED=3]="PROPOSAL_DECISION_STATUS_ADOPTED",e[e.PROPOSAL_DECISION_STATUS_EXECUTED=4]="PROPOSAL_DECISION_STATUS_EXECUTED",e[e.PROPOSAL_DECISION_STATUS_FAILED=5]="PROPOSAL_DECISION_STATUS_FAILED",e))(pe||{}),de=(s=>(s[s.Unspecified=0]="Unspecified",s[s.Yes=1]="Yes",s[s.No=2]="No",s))(de||{});var ue=(e=>(e[e.Unspecified=0]="Unspecified",e[e.Pending=1]="Pending",e[e.Open=2]="Open",e[e.Committed=3]="Committed",e[e.Aborted=4]="Aborted",e[e.Adopted=5]="Adopted",e))(ue||{}),le=(s=>(s[s.TYPE_UNSPECIFIED=0]="TYPE_UNSPECIFIED",s[s.TYPE_SALE_NOT_OPEN=1]="TYPE_SALE_NOT_OPEN",s[s.TYPE_SALE_CLOSED=2]="TYPE_SALE_CLOSED",s))(le||{}),me=(n=>(n[n.TYPE_UNSPECIFIED=0]="TYPE_UNSPECIFIED",n[n.TYPE_SALE_NOT_OPEN=1]="TYPE_SALE_NOT_OPEN",n[n.TYPE_SALE_CLOSED=2]="TYPE_SALE_CLOSED",n[n.TYPE_TICKET_EXISTS=3]="TYPE_TICKET_EXISTS",n[n.TYPE_INVALID_USER_AMOUNT=4]="TYPE_INVALID_USER_AMOUNT",n[n.TYPE_INVALID_SUBACCOUNT=5]="TYPE_INVALID_SUBACCOUNT",n[n.TYPE_INVALID_PRINCIPAL=6]="TYPE_INVALID_PRINCIPAL",n))(me||{});import{Canister as Ne,createServices as Oe,fromNullable as Re,isNullish as ge,toNullable as oe}from"@dfinity/utils";var te=({IDL:t})=>{let A=t.Record({validator_canister_id:t.Opt(t.Principal),target_canister_id:t.Opt(t.Principal),validator_method_name:t.Opt(t.Text),target_method_name:t.Opt(t.Text)}),u=t.Variant({NativeNervousSystemFunction:t.Record({}),GenericNervousSystemFunction:A}),s=t.Record({id:t.Nat64,name:t.Text,description:t.Opt(t.Text),function_type:t.Opt(u)}),a=t.Record({not_dissolving_neurons_e8s_buckets:t.Vec(t.Tuple(t.Nat64,t.Float64)),garbage_collectable_neurons_count:t.Nat64,neurons_with_invalid_stake_count:t.Nat64,not_dissolving_neurons_count_buckets:t.Vec(t.Tuple(t.Nat64,t.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:t.Nat64,dissolved_neurons_count:t.Nat64,total_staked_e8s:t.Nat64,total_supply_governance_tokens:t.Nat64,not_dissolving_neurons_count:t.Nat64,dissolved_neurons_e8s:t.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:t.Nat64,dissolving_neurons_count_buckets:t.Vec(t.Tuple(t.Nat64,t.Nat64)),dissolving_neurons_count:t.Nat64,dissolving_neurons_e8s_buckets:t.Vec(t.Tuple(t.Nat64,t.Float64)),timestamp_seconds:t.Nat64}),c=t.Record({current_basis_points:t.Opt(t.Int32),updated_at_timestamp_seconds:t.Opt(t.Nat64)}),e=t.Record({id:t.Vec(t.Nat8)}),n=t.Record({followees:t.Vec(e)}),E=t.Record({followees:t.Vec(t.Tuple(t.Nat64,n))}),p=t.Record({permissions:t.Vec(t.Int32)}),G=t.Record({final_reward_rate_basis_points:t.Opt(t.Nat64),initial_reward_rate_basis_points:t.Opt(t.Nat64),reward_rate_transition_duration_seconds:t.Opt(t.Nat64),round_duration_seconds:t.Opt(t.Nat64)}),o=t.Record({default_followees:t.Opt(E),max_dissolve_delay_seconds:t.Opt(t.Nat64),max_dissolve_delay_bonus_percentage:t.Opt(t.Nat64),max_followees_per_function:t.Opt(t.Nat64),neuron_claimer_permissions:t.Opt(p),neuron_minimum_stake_e8s:t.Opt(t.Nat64),max_neuron_age_for_age_bonus:t.Opt(t.Nat64),initial_voting_period_seconds:t.Opt(t.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:t.Opt(t.Nat64),reject_cost_e8s:t.Opt(t.Nat64),max_proposals_to_keep_per_action:t.Opt(t.Nat32),wait_for_quiet_deadline_increase_seconds:t.Opt(t.Nat64),max_number_of_neurons:t.Opt(t.Nat64),transaction_fee_e8s:t.Opt(t.Nat64),max_number_of_proposals_with_ballots:t.Opt(t.Nat64),max_age_bonus_percentage:t.Opt(t.Nat64),neuron_grantable_permissions:t.Opt(p),voting_rewards_parameters:t.Opt(G),maturity_modulation_disabled:t.Opt(t.Bool),max_number_of_principals_per_neuron:t.Opt(t.Nat64)}),l=t.Record({archive_wasm_hash:t.Vec(t.Nat8),root_wasm_hash:t.Vec(t.Nat8),swap_wasm_hash:t.Vec(t.Nat8),ledger_wasm_hash:t.Vec(t.Nat8),governance_wasm_hash:t.Vec(t.Nat8),index_wasm_hash:t.Vec(t.Nat8)}),i=t.Record({id:t.Nat64}),R=t.Record({rounds_since_last_distribution:t.Opt(t.Nat64),actual_timestamp_seconds:t.Nat64,end_timestamp_seconds:t.Opt(t.Nat64),total_available_e8s_equivalent:t.Opt(t.Nat64),distributed_e8s_equivalent:t.Nat64,round:t.Nat64,settled_proposals:t.Vec(i)}),g=t.Record({mark_failed_at_seconds:t.Nat64,checking_upgrade_lock:t.Nat64,proposal_id:t.Nat64,target_version:t.Opt(l)}),_=t.Record({error_message:t.Text,error_type:t.Int32}),m=t.Record({subaccount:t.Vec(t.Nat8)}),r=t.Record({owner:t.Opt(t.Principal),subaccount:t.Opt(m)}),v=t.Record({human_readable:t.Opt(t.Text)}),U=t.Record({e8s:t.Opt(t.Nat64)}),q=t.Record({xdrs_per_icp:t.Opt(v),icps_per_token:t.Opt(v),tokens:t.Opt(U)}),B=t.Record({token:t.Opt(t.Int32),account:t.Opt(r),valuation_factors:t.Opt(q),timestamp_seconds:t.Opt(t.Nat64)}),y=t.Record({valuation:t.Opt(B)}),z=t.Variant({TransferSnsTreasuryFunds:y,MintSnsTokens:y}),Y=t.Record({vote:t.Int32,cast_timestamp_seconds:t.Nat64,voting_power:t.Nat64}),S=t.Record({basis_points:t.Opt(t.Nat64)}),W=t.Record({no:t.Nat64,yes:t.Nat64,total:t.Nat64,timestamp_seconds:t.Nat64}),j=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),Q=t.Record({canister_ids:t.Vec(t.Principal)}),K=t.Record({from_treasury:t.Int32,to_principal:t.Opt(t.Principal),to_subaccount:t.Opt(m),memo:t.Opt(t.Nat64),amount_e8s:t.Nat64}),X=t.Record({new_canister_wasm:t.Vec(t.Nat8),mode:t.Opt(t.Int32),canister_id:t.Opt(t.Principal),canister_upgrade_arg:t.Opt(t.Vec(t.Nat8))}),J=t.Record({canister_ids:t.Vec(t.Principal),new_controllers:t.Vec(t.Principal)}),H=t.Record({to_principal:t.Opt(t.Principal),to_subaccount:t.Opt(m),memo:t.Opt(t.Nat64),amount_e8s:t.Opt(t.Nat64)}),f=t.Record({url:t.Opt(t.Text),logo:t.Opt(t.Text),name:t.Opt(t.Text),description:t.Opt(t.Text)}),Z=t.Record({function_id:t.Nat64,payload:t.Vec(t.Nat8)}),$=t.Record({token_symbol:t.Opt(t.Text),transfer_fee:t.Opt(t.Nat64),token_logo:t.Opt(t.Text),token_name:t.Opt(t.Text)}),I=t.Record({motion_text:t.Text}),D=t.Variant({ManageNervousSystemParameters:o,AddGenericNervousSystemFunction:s,ManageDappCanisterSettings:j,RemoveGenericNervousSystemFunction:t.Nat64,UpgradeSnsToNextVersion:t.Record({}),RegisterDappCanisters:Q,TransferSnsTreasuryFunds:K,UpgradeSnsControlledCanister:X,DeregisterDappCanisters:J,MintSnsTokens:H,Unspecified:t.Record({}),ManageSnsMetadata:f,ExecuteGenericNervousSystemFunction:Z,ManageLedgerParameters:$,Motion:I}),N=t.Record({url:t.Text,title:t.Text,action:t.Opt(D),summary:t.Text}),L=t.Record({current_deadline_timestamp_seconds:t.Nat64}),O=t.Record({id:t.Opt(i),payload_text_rendering:t.Opt(t.Text),action:t.Nat64,failure_reason:t.Opt(_),action_auxiliary:t.Opt(z),ballots:t.Vec(t.Tuple(t.Text,Y)),minimum_yes_proportion_of_total:t.Opt(S),reward_event_round:t.Nat64,failed_timestamp_seconds:t.Nat64,reward_event_end_timestamp_seconds:t.Opt(t.Nat64),proposal_creation_timestamp_seconds:t.Nat64,initial_voting_period_seconds:t.Nat64,reject_cost_e8s:t.Nat64,latest_tally:t.Opt(W),wait_for_quiet_deadline_increase_seconds:t.Nat64,decided_timestamp_seconds:t.Nat64,proposal:t.Opt(N),proposer:t.Opt(e),wait_for_quiet_state:t.Opt(L),minimum_yes_proportion_of_exercised:t.Opt(S),is_eligible_for_rewards:t.Bool,executed_timestamp_seconds:t.Nat64}),T=t.Record({memo:t.Nat64,amount_e8s:t.Nat64}),V=t.Record({function_id:t.Nat64,followees:t.Vec(e)}),P=t.Record({to_account:t.Opt(r),percentage_to_disburse:t.Nat32}),tt=t.Record({requested_setting_for_auto_stake_maturity:t.Bool}),et=t.Record({additional_dissolve_delay_seconds:t.Nat32}),ot=t.Record({dissolve_timestamp_seconds:t.Nat64}),st=t.Variant({ChangeAutoStakeMaturity:tt,StopDissolving:t.Record({}),StartDissolving:t.Record({}),IncreaseDissolveDelay:et,SetDissolveTimestamp:ot}),b=t.Record({operation:t.Opt(st)}),x=t.Record({vote:t.Int32,proposal:t.Opt(i)}),nt=t.Record({amount_to_be_disbursed_e8s:t.Nat64,to_account:t.Opt(r)}),at=t.Record({controller:t.Opt(t.Principal),memo:t.Nat64}),rt=t.Variant({MemoAndController:at,NeuronId:t.Record({})}),M=t.Record({by:t.Opt(rt)}),w=t.Record({permissions_to_remove:t.Opt(p),principal_id:t.Opt(t.Principal)}),h=t.Record({permissions_to_add:t.Opt(p),principal_id:t.Opt(t.Principal)}),F=t.Record({percentage_to_merge:t.Nat32}),it=t.Record({e8s:t.Nat64}),C=t.Record({to_account:t.Opt(r),amount:t.Opt(it)}),_t=t.Variant({Split:T,Follow:V,DisburseMaturity:P,Configure:b,RegisterVote:x,SyncCommand:t.Record({}),MakeProposal:N,FinalizeDisburseMaturity:nt,ClaimOrRefreshNeuron:M,RemoveNeuronPermissions:w,AddNeuronPermissions:h,MergeMaturity:F,Disburse:C}),ct=t.Record({command:t.Opt(_t),timestamp:t.Nat64}),pt=t.Record({principal:t.Opt(t.Principal),permission_type:t.Vec(t.Int32)}),dt=t.Variant({DissolveDelaySeconds:t.Nat64,WhenDissolvedTimestampSeconds:t.Nat64}),ut=t.Record({timestamp_of_disbursement_seconds:t.Nat64,amount_e8s:t.Nat64,account_to_disburse_to:t.Opt(r),finalize_disbursement_timestamp_seconds:t.Opt(t.Nat64)}),d=t.Record({id:t.Opt(e),staked_maturity_e8s_equivalent:t.Opt(t.Nat64),permissions:t.Vec(pt),maturity_e8s_equivalent:t.Nat64,cached_neuron_stake_e8s:t.Nat64,created_timestamp_seconds:t.Nat64,source_nns_neuron_id:t.Opt(t.Nat64),auto_stake_maturity:t.Opt(t.Bool),aging_since_timestamp_seconds:t.Nat64,dissolve_state:t.Opt(dt),voting_power_percentage_multiplier:t.Nat64,vesting_period_seconds:t.Opt(t.Nat64),disburse_maturity_in_progress:t.Vec(ut),followees:t.Vec(t.Tuple(t.Nat64,n)),neuron_fees_e8s:t.Nat64}),se=t.Record({root_canister_id:t.Opt(t.Principal),id_to_nervous_system_functions:t.Vec(t.Tuple(t.Nat64,s)),metrics:t.Opt(a),maturity_modulation:t.Opt(c),mode:t.Int32,parameters:t.Opt(o),is_finalizing_disburse_maturity:t.Opt(t.Bool),deployed_version:t.Opt(l),sns_initialization_parameters:t.Text,latest_reward_event:t.Opt(R),pending_version:t.Opt(g),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal),proposals:t.Vec(t.Tuple(t.Nat64,O)),in_flight_commands:t.Vec(t.Tuple(t.Text,ct)),sns_metadata:t.Opt(f),neurons:t.Vec(t.Tuple(t.Text,d)),genesis_timestamp_seconds:t.Nat64}),lt=t.Record({id:t.Opt(e),amount_e8s:t.Opt(t.Nat64)}),mt=t.Record({new_maturity_e8s:t.Opt(t.Nat64)}),Nt=t.Record({controller:t.Opt(t.Principal),dissolve_delay_seconds:t.Opt(t.Nat64),source_nns_neuron_id:t.Opt(t.Nat64),stake_e8s:t.Opt(t.Nat64),followees:t.Vec(e),hotkey:t.Opt(t.Principal),neuron_id:t.Opt(e)}),Ot=t.Record({neuron_parameters:t.Vec(Nt)}),Rt=t.Record({id:t.Opt(e),status:t.Int32}),gt=t.Record({swap_neurons:t.Vec(Rt)}),vt=t.Variant({Ok:gt,Err:t.Int32}),yt=t.Record({claim_swap_neurons_result:t.Opt(vt)}),St=t.Record({maturity_modulation:t.Opt(c)}),ft=t.Record({url:t.Opt(t.Text),logo:t.Opt(t.Text),name:t.Opt(t.Text),description:t.Opt(t.Text)}),Tt=t.Record({mode:t.Opt(t.Int32)}),Vt=t.Record({neuron_id:t.Opt(e)}),Pt=t.Variant({Error:_,Neuron:d}),bt=t.Record({result:t.Opt(Pt)}),k=t.Record({proposal_id:t.Opt(i)}),xt=t.Variant({Error:_,Proposal:O}),Mt=t.Record({result:t.Opt(xt)}),wt=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),ht=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),Ft=t.Record({status:wt,memory_size:t.Nat,cycles:t.Nat,settings:ht,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),Ct=t.Record({deployed_version:t.Opt(l),pending_version:t.Opt(g)}),kt=t.Record({sns_initialization_parameters:t.Text}),At=t.Record({reserved_ids:t.Vec(t.Nat64),functions:t.Vec(s)}),Et=t.Record({of_principal:t.Opt(t.Principal),limit:t.Nat32,start_page_at:t.Opt(e)}),Gt=t.Record({neurons:t.Vec(d)}),Ut=t.Record({include_reward_status:t.Vec(t.Int32),before_proposal:t.Opt(i),limit:t.Nat32,exclude_type:t.Vec(t.Nat64),include_status:t.Vec(t.Int32)}),qt=t.Record({include_ballots_by_caller:t.Opt(t.Bool),proposals:t.Vec(O)}),Bt=t.Record({percentage_to_stake:t.Opt(t.Nat32)}),zt=t.Variant({Split:T,Follow:V,DisburseMaturity:P,ClaimOrRefresh:M,Configure:b,RegisterVote:x,MakeProposal:N,StakeMaturity:Bt,RemoveNeuronPermissions:w,AddNeuronPermissions:h,MergeMaturity:F,Disburse:C}),Yt=t.Record({subaccount:t.Vec(t.Nat8),command:t.Opt(zt)}),Wt=t.Record({created_neuron_id:t.Opt(e)}),jt=t.Record({amount_disbursed_e8s:t.Nat64,amount_deducted_e8s:t.Opt(t.Nat64)}),Qt=t.Record({refreshed_neuron_id:t.Opt(e)}),Kt=t.Record({maturity_e8s:t.Nat64,staked_maturity_e8s:t.Nat64}),Xt=t.Record({merged_maturity_e8s:t.Nat64,new_stake_e8s:t.Nat64}),Jt=t.Record({transfer_block_height:t.Nat64}),Ht=t.Variant({Error:_,Split:Wt,Follow:t.Record({}),DisburseMaturity:jt,ClaimOrRefresh:Qt,Configure:t.Record({}),RegisterVote:t.Record({}),MakeProposal:k,RemoveNeuronPermission:t.Record({}),StakeMaturity:Kt,MergeMaturity:Xt,Disburse:Jt,AddNeuronPermission:t.Record({})}),Zt=t.Record({command:t.Opt(Ht)}),$t=t.Record({recipient:t.Opt(r),amount_e8s:t.Opt(t.Nat64)}),It=t.Record({mode:t.Int32});return t.Service({add_maturity:t.Func([lt],[mt],[]),claim_swap_neurons:t.Func([Ot],[yt],[]),fail_stuck_upgrade_in_progress:t.Func([t.Record({})],[t.Record({})],[]),get_build_metadata:t.Func([],[t.Text],[]),get_latest_reward_event:t.Func([],[R],[]),get_maturity_modulation:t.Func([t.Record({})],[St],[]),get_metadata:t.Func([t.Record({})],[ft],[]),get_mode:t.Func([t.Record({})],[Tt],[]),get_nervous_system_parameters:t.Func([t.Null],[o],[]),get_neuron:t.Func([Vt],[bt],[]),get_proposal:t.Func([k],[Mt],[]),get_root_canister_status:t.Func([t.Null],[Ft],[]),get_running_sns_version:t.Func([t.Record({})],[Ct],[]),get_sns_initialization_parameters:t.Func([t.Record({})],[kt],[]),list_nervous_system_functions:t.Func([],[At],[]),list_neurons:t.Func([Et],[Gt],[]),list_proposals:t.Func([Ut],[qt],[]),manage_neuron:t.Func([Yt],[Zt],[]),mint_tokens:t.Func([$t],[t.Record({})],[]),set_mode:t.Func([It],[t.Record({})],[]),update_neuron:t.Func([d],[t.Opt(_)],[])})};var ee=({IDL:t})=>{let A=t.Record({validator_canister_id:t.Opt(t.Principal),target_canister_id:t.Opt(t.Principal),validator_method_name:t.Opt(t.Text),target_method_name:t.Opt(t.Text)}),u=t.Variant({NativeNervousSystemFunction:t.Record({}),GenericNervousSystemFunction:A}),s=t.Record({id:t.Nat64,name:t.Text,description:t.Opt(t.Text),function_type:t.Opt(u)}),a=t.Record({not_dissolving_neurons_e8s_buckets:t.Vec(t.Tuple(t.Nat64,t.Float64)),garbage_collectable_neurons_count:t.Nat64,neurons_with_invalid_stake_count:t.Nat64,not_dissolving_neurons_count_buckets:t.Vec(t.Tuple(t.Nat64,t.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:t.Nat64,dissolved_neurons_count:t.Nat64,total_staked_e8s:t.Nat64,total_supply_governance_tokens:t.Nat64,not_dissolving_neurons_count:t.Nat64,dissolved_neurons_e8s:t.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:t.Nat64,dissolving_neurons_count_buckets:t.Vec(t.Tuple(t.Nat64,t.Nat64)),dissolving_neurons_count:t.Nat64,dissolving_neurons_e8s_buckets:t.Vec(t.Tuple(t.Nat64,t.Float64)),timestamp_seconds:t.Nat64}),c=t.Record({current_basis_points:t.Opt(t.Int32),updated_at_timestamp_seconds:t.Opt(t.Nat64)}),e=t.Record({id:t.Vec(t.Nat8)}),n=t.Record({followees:t.Vec(e)}),E=t.Record({followees:t.Vec(t.Tuple(t.Nat64,n))}),p=t.Record({permissions:t.Vec(t.Int32)}),G=t.Record({final_reward_rate_basis_points:t.Opt(t.Nat64),initial_reward_rate_basis_points:t.Opt(t.Nat64),reward_rate_transition_duration_seconds:t.Opt(t.Nat64),round_duration_seconds:t.Opt(t.Nat64)}),o=t.Record({default_followees:t.Opt(E),max_dissolve_delay_seconds:t.Opt(t.Nat64),max_dissolve_delay_bonus_percentage:t.Opt(t.Nat64),max_followees_per_function:t.Opt(t.Nat64),neuron_claimer_permissions:t.Opt(p),neuron_minimum_stake_e8s:t.Opt(t.Nat64),max_neuron_age_for_age_bonus:t.Opt(t.Nat64),initial_voting_period_seconds:t.Opt(t.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:t.Opt(t.Nat64),reject_cost_e8s:t.Opt(t.Nat64),max_proposals_to_keep_per_action:t.Opt(t.Nat32),wait_for_quiet_deadline_increase_seconds:t.Opt(t.Nat64),max_number_of_neurons:t.Opt(t.Nat64),transaction_fee_e8s:t.Opt(t.Nat64),max_number_of_proposals_with_ballots:t.Opt(t.Nat64),max_age_bonus_percentage:t.Opt(t.Nat64),neuron_grantable_permissions:t.Opt(p),voting_rewards_parameters:t.Opt(G),maturity_modulation_disabled:t.Opt(t.Bool),max_number_of_principals_per_neuron:t.Opt(t.Nat64)}),l=t.Record({archive_wasm_hash:t.Vec(t.Nat8),root_wasm_hash:t.Vec(t.Nat8),swap_wasm_hash:t.Vec(t.Nat8),ledger_wasm_hash:t.Vec(t.Nat8),governance_wasm_hash:t.Vec(t.Nat8),index_wasm_hash:t.Vec(t.Nat8)}),i=t.Record({id:t.Nat64}),R=t.Record({rounds_since_last_distribution:t.Opt(t.Nat64),actual_timestamp_seconds:t.Nat64,end_timestamp_seconds:t.Opt(t.Nat64),total_available_e8s_equivalent:t.Opt(t.Nat64),distributed_e8s_equivalent:t.Nat64,round:t.Nat64,settled_proposals:t.Vec(i)}),g=t.Record({mark_failed_at_seconds:t.Nat64,checking_upgrade_lock:t.Nat64,proposal_id:t.Nat64,target_version:t.Opt(l)}),_=t.Record({error_message:t.Text,error_type:t.Int32}),m=t.Record({subaccount:t.Vec(t.Nat8)}),r=t.Record({owner:t.Opt(t.Principal),subaccount:t.Opt(m)}),v=t.Record({human_readable:t.Opt(t.Text)}),U=t.Record({e8s:t.Opt(t.Nat64)}),q=t.Record({xdrs_per_icp:t.Opt(v),icps_per_token:t.Opt(v),tokens:t.Opt(U)}),B=t.Record({token:t.Opt(t.Int32),account:t.Opt(r),valuation_factors:t.Opt(q),timestamp_seconds:t.Opt(t.Nat64)}),y=t.Record({valuation:t.Opt(B)}),z=t.Variant({TransferSnsTreasuryFunds:y,MintSnsTokens:y}),Y=t.Record({vote:t.Int32,cast_timestamp_seconds:t.Nat64,voting_power:t.Nat64}),S=t.Record({basis_points:t.Opt(t.Nat64)}),W=t.Record({no:t.Nat64,yes:t.Nat64,total:t.Nat64,timestamp_seconds:t.Nat64}),j=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),Q=t.Record({canister_ids:t.Vec(t.Principal)}),K=t.Record({from_treasury:t.Int32,to_principal:t.Opt(t.Principal),to_subaccount:t.Opt(m),memo:t.Opt(t.Nat64),amount_e8s:t.Nat64}),X=t.Record({new_canister_wasm:t.Vec(t.Nat8),mode:t.Opt(t.Int32),canister_id:t.Opt(t.Principal),canister_upgrade_arg:t.Opt(t.Vec(t.Nat8))}),J=t.Record({canister_ids:t.Vec(t.Principal),new_controllers:t.Vec(t.Principal)}),H=t.Record({to_principal:t.Opt(t.Principal),to_subaccount:t.Opt(m),memo:t.Opt(t.Nat64),amount_e8s:t.Opt(t.Nat64)}),f=t.Record({url:t.Opt(t.Text),logo:t.Opt(t.Text),name:t.Opt(t.Text),description:t.Opt(t.Text)}),Z=t.Record({function_id:t.Nat64,payload:t.Vec(t.Nat8)}),$=t.Record({token_symbol:t.Opt(t.Text),transfer_fee:t.Opt(t.Nat64),token_logo:t.Opt(t.Text),token_name:t.Opt(t.Text)}),I=t.Record({motion_text:t.Text}),D=t.Variant({ManageNervousSystemParameters:o,AddGenericNervousSystemFunction:s,ManageDappCanisterSettings:j,RemoveGenericNervousSystemFunction:t.Nat64,UpgradeSnsToNextVersion:t.Record({}),RegisterDappCanisters:Q,TransferSnsTreasuryFunds:K,UpgradeSnsControlledCanister:X,DeregisterDappCanisters:J,MintSnsTokens:H,Unspecified:t.Record({}),ManageSnsMetadata:f,ExecuteGenericNervousSystemFunction:Z,ManageLedgerParameters:$,Motion:I}),N=t.Record({url:t.Text,title:t.Text,action:t.Opt(D),summary:t.Text}),L=t.Record({current_deadline_timestamp_seconds:t.Nat64}),O=t.Record({id:t.Opt(i),payload_text_rendering:t.Opt(t.Text),action:t.Nat64,failure_reason:t.Opt(_),action_auxiliary:t.Opt(z),ballots:t.Vec(t.Tuple(t.Text,Y)),minimum_yes_proportion_of_total:t.Opt(S),reward_event_round:t.Nat64,failed_timestamp_seconds:t.Nat64,reward_event_end_timestamp_seconds:t.Opt(t.Nat64),proposal_creation_timestamp_seconds:t.Nat64,initial_voting_period_seconds:t.Nat64,reject_cost_e8s:t.Nat64,latest_tally:t.Opt(W),wait_for_quiet_deadline_increase_seconds:t.Nat64,decided_timestamp_seconds:t.Nat64,proposal:t.Opt(N),proposer:t.Opt(e),wait_for_quiet_state:t.Opt(L),minimum_yes_proportion_of_exercised:t.Opt(S),is_eligible_for_rewards:t.Bool,executed_timestamp_seconds:t.Nat64}),T=t.Record({memo:t.Nat64,amount_e8s:t.Nat64}),V=t.Record({function_id:t.Nat64,followees:t.Vec(e)}),P=t.Record({to_account:t.Opt(r),percentage_to_disburse:t.Nat32}),tt=t.Record({requested_setting_for_auto_stake_maturity:t.Bool}),et=t.Record({additional_dissolve_delay_seconds:t.Nat32}),ot=t.Record({dissolve_timestamp_seconds:t.Nat64}),st=t.Variant({ChangeAutoStakeMaturity:tt,StopDissolving:t.Record({}),StartDissolving:t.Record({}),IncreaseDissolveDelay:et,SetDissolveTimestamp:ot}),b=t.Record({operation:t.Opt(st)}),x=t.Record({vote:t.Int32,proposal:t.Opt(i)}),nt=t.Record({amount_to_be_disbursed_e8s:t.Nat64,to_account:t.Opt(r)}),at=t.Record({controller:t.Opt(t.Principal),memo:t.Nat64}),rt=t.Variant({MemoAndController:at,NeuronId:t.Record({})}),M=t.Record({by:t.Opt(rt)}),w=t.Record({permissions_to_remove:t.Opt(p),principal_id:t.Opt(t.Principal)}),h=t.Record({permissions_to_add:t.Opt(p),principal_id:t.Opt(t.Principal)}),F=t.Record({percentage_to_merge:t.Nat32}),it=t.Record({e8s:t.Nat64}),C=t.Record({to_account:t.Opt(r),amount:t.Opt(it)}),_t=t.Variant({Split:T,Follow:V,DisburseMaturity:P,Configure:b,RegisterVote:x,SyncCommand:t.Record({}),MakeProposal:N,FinalizeDisburseMaturity:nt,ClaimOrRefreshNeuron:M,RemoveNeuronPermissions:w,AddNeuronPermissions:h,MergeMaturity:F,Disburse:C}),ct=t.Record({command:t.Opt(_t),timestamp:t.Nat64}),pt=t.Record({principal:t.Opt(t.Principal),permission_type:t.Vec(t.Int32)}),dt=t.Variant({DissolveDelaySeconds:t.Nat64,WhenDissolvedTimestampSeconds:t.Nat64}),ut=t.Record({timestamp_of_disbursement_seconds:t.Nat64,amount_e8s:t.Nat64,account_to_disburse_to:t.Opt(r),finalize_disbursement_timestamp_seconds:t.Opt(t.Nat64)}),d=t.Record({id:t.Opt(e),staked_maturity_e8s_equivalent:t.Opt(t.Nat64),permissions:t.Vec(pt),maturity_e8s_equivalent:t.Nat64,cached_neuron_stake_e8s:t.Nat64,created_timestamp_seconds:t.Nat64,source_nns_neuron_id:t.Opt(t.Nat64),auto_stake_maturity:t.Opt(t.Bool),aging_since_timestamp_seconds:t.Nat64,dissolve_state:t.Opt(dt),voting_power_percentage_multiplier:t.Nat64,vesting_period_seconds:t.Opt(t.Nat64),disburse_maturity_in_progress:t.Vec(ut),followees:t.Vec(t.Tuple(t.Nat64,n)),neuron_fees_e8s:t.Nat64}),se=t.Record({root_canister_id:t.Opt(t.Principal),id_to_nervous_system_functions:t.Vec(t.Tuple(t.Nat64,s)),metrics:t.Opt(a),maturity_modulation:t.Opt(c),mode:t.Int32,parameters:t.Opt(o),is_finalizing_disburse_maturity:t.Opt(t.Bool),deployed_version:t.Opt(l),sns_initialization_parameters:t.Text,latest_reward_event:t.Opt(R),pending_version:t.Opt(g),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal),proposals:t.Vec(t.Tuple(t.Nat64,O)),in_flight_commands:t.Vec(t.Tuple(t.Text,ct)),sns_metadata:t.Opt(f),neurons:t.Vec(t.Tuple(t.Text,d)),genesis_timestamp_seconds:t.Nat64}),lt=t.Record({id:t.Opt(e),amount_e8s:t.Opt(t.Nat64)}),mt=t.Record({new_maturity_e8s:t.Opt(t.Nat64)}),Nt=t.Record({controller:t.Opt(t.Principal),dissolve_delay_seconds:t.Opt(t.Nat64),source_nns_neuron_id:t.Opt(t.Nat64),stake_e8s:t.Opt(t.Nat64),followees:t.Vec(e),hotkey:t.Opt(t.Principal),neuron_id:t.Opt(e)}),Ot=t.Record({neuron_parameters:t.Vec(Nt)}),Rt=t.Record({id:t.Opt(e),status:t.Int32}),gt=t.Record({swap_neurons:t.Vec(Rt)}),vt=t.Variant({Ok:gt,Err:t.Int32}),yt=t.Record({claim_swap_neurons_result:t.Opt(vt)}),St=t.Record({maturity_modulation:t.Opt(c)}),ft=t.Record({url:t.Opt(t.Text),logo:t.Opt(t.Text),name:t.Opt(t.Text),description:t.Opt(t.Text)}),Tt=t.Record({mode:t.Opt(t.Int32)}),Vt=t.Record({neuron_id:t.Opt(e)}),Pt=t.Variant({Error:_,Neuron:d}),bt=t.Record({result:t.Opt(Pt)}),k=t.Record({proposal_id:t.Opt(i)}),xt=t.Variant({Error:_,Proposal:O}),Mt=t.Record({result:t.Opt(xt)}),wt=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),ht=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),Ft=t.Record({status:wt,memory_size:t.Nat,cycles:t.Nat,settings:ht,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),Ct=t.Record({deployed_version:t.Opt(l),pending_version:t.Opt(g)}),kt=t.Record({sns_initialization_parameters:t.Text}),At=t.Record({reserved_ids:t.Vec(t.Nat64),functions:t.Vec(s)}),Et=t.Record({of_principal:t.Opt(t.Principal),limit:t.Nat32,start_page_at:t.Opt(e)}),Gt=t.Record({neurons:t.Vec(d)}),Ut=t.Record({include_reward_status:t.Vec(t.Int32),before_proposal:t.Opt(i),limit:t.Nat32,exclude_type:t.Vec(t.Nat64),include_status:t.Vec(t.Int32)}),qt=t.Record({include_ballots_by_caller:t.Opt(t.Bool),proposals:t.Vec(O)}),Bt=t.Record({percentage_to_stake:t.Opt(t.Nat32)}),zt=t.Variant({Split:T,Follow:V,DisburseMaturity:P,ClaimOrRefresh:M,Configure:b,RegisterVote:x,MakeProposal:N,StakeMaturity:Bt,RemoveNeuronPermissions:w,AddNeuronPermissions:h,MergeMaturity:F,Disburse:C}),Yt=t.Record({subaccount:t.Vec(t.Nat8),command:t.Opt(zt)}),Wt=t.Record({created_neuron_id:t.Opt(e)}),jt=t.Record({amount_disbursed_e8s:t.Nat64,amount_deducted_e8s:t.Opt(t.Nat64)}),Qt=t.Record({refreshed_neuron_id:t.Opt(e)}),Kt=t.Record({maturity_e8s:t.Nat64,staked_maturity_e8s:t.Nat64}),Xt=t.Record({merged_maturity_e8s:t.Nat64,new_stake_e8s:t.Nat64}),Jt=t.Record({transfer_block_height:t.Nat64}),Ht=t.Variant({Error:_,Split:Wt,Follow:t.Record({}),DisburseMaturity:jt,ClaimOrRefresh:Qt,Configure:t.Record({}),RegisterVote:t.Record({}),MakeProposal:k,RemoveNeuronPermission:t.Record({}),StakeMaturity:Kt,MergeMaturity:Xt,Disburse:Jt,AddNeuronPermission:t.Record({})}),Zt=t.Record({command:t.Opt(Ht)}),$t=t.Record({recipient:t.Opt(r),amount_e8s:t.Opt(t.Nat64)}),It=t.Record({mode:t.Int32});return t.Service({add_maturity:t.Func([lt],[mt],[]),claim_swap_neurons:t.Func([Ot],[yt],[]),fail_stuck_upgrade_in_progress:t.Func([t.Record({})],[t.Record({})],[]),get_build_metadata:t.Func([],[t.Text],["query"]),get_latest_reward_event:t.Func([],[R],["query"]),get_maturity_modulation:t.Func([t.Record({})],[St],[]),get_metadata:t.Func([t.Record({})],[ft],["query"]),get_mode:t.Func([t.Record({})],[Tt],["query"]),get_nervous_system_parameters:t.Func([t.Null],[o],["query"]),get_neuron:t.Func([Vt],[bt],["query"]),get_proposal:t.Func([k],[Mt],["query"]),get_root_canister_status:t.Func([t.Null],[Ft],[]),get_running_sns_version:t.Func([t.Record({})],[Ct],["query"]),get_sns_initialization_parameters:t.Func([t.Record({})],[kt],["query"]),list_nervous_system_functions:t.Func([],[At],["query"]),list_neurons:t.Func([Et],[Gt],["query"]),list_proposals:t.Func([Ut],[qt],["query"]),manage_neuron:t.Func([Yt],[Zt],[]),mint_tokens:t.Func([$t],[t.Record({})],[]),set_mode:t.Func([It],[t.Record({})],[]),update_neuron:t.Func([d],[t.Opt(_)],[])})};var Dt=class t extends Ne{constructor(){super(...arguments);this.addMaturity=async u=>{let{id:s,amountE8s:a}=u,{new_maturity_e8s:c}=await this.caller(u).add_maturity({id:oe(s),amount_e8s:oe(a)}),e=Re(c);if(ge(e)||e<a)throw new Lt("No maturity added")}}static create(u){let{service:s,certifiedService:a,canisterId:c}=Oe({options:u,idlFactory:ee,certifiedIdlFactory:te});return new t(c,s,a)}};export{le as GetOpenTicketErrorType,me as NewSaleTicketResponseErrorType,ae as SnsGovernanceCanister,Lt as SnsGovernanceError,Dt as SnsGovernanceTestCanister,_e as SnsNeuronPermissionType,pe as SnsProposalDecisionStatus,ce as SnsProposalRewardStatus,re as SnsRootCanister,ie as SnsSwapCanister,Se as SnsSwapGetOpenTicketError,ue as SnsSwapLifecycle,ye as SnsSwapNewTicketError,de as SnsVote,Te as SnsWrapper,ve as UnsupportedMethodError,ne as fromCandidAction,Ve as initSnsWrapper,fe as neuronSubaccount};
1
+ import{a as he}from"./chunk-TVXJJLBF.js";import{a as pe,b as de}from"./chunk-7CU6QPD4.js";import{a as ue}from"./chunk-K2WYATWO.js";import{a as Me,b as we}from"./chunk-CQAJ2SZB.js";import{a as ae}from"./chunk-4INNMFYU.js";import{a as Pe,b as be,c as xe,d as le}from"./chunk-C7HBQQIL.js";var me=(o=>(o[o.NEURON_PERMISSION_TYPE_UNSPECIFIED=0]="NEURON_PERMISSION_TYPE_UNSPECIFIED",o[o.NEURON_PERMISSION_TYPE_CONFIGURE_DISSOLVE_STATE=1]="NEURON_PERMISSION_TYPE_CONFIGURE_DISSOLVE_STATE",o[o.NEURON_PERMISSION_TYPE_MANAGE_PRINCIPALS=2]="NEURON_PERMISSION_TYPE_MANAGE_PRINCIPALS",o[o.NEURON_PERMISSION_TYPE_SUBMIT_PROPOSAL=3]="NEURON_PERMISSION_TYPE_SUBMIT_PROPOSAL",o[o.NEURON_PERMISSION_TYPE_VOTE=4]="NEURON_PERMISSION_TYPE_VOTE",o[o.NEURON_PERMISSION_TYPE_DISBURSE=5]="NEURON_PERMISSION_TYPE_DISBURSE",o[o.NEURON_PERMISSION_TYPE_SPLIT=6]="NEURON_PERMISSION_TYPE_SPLIT",o[o.NEURON_PERMISSION_TYPE_MERGE_MATURITY=7]="NEURON_PERMISSION_TYPE_MERGE_MATURITY",o[o.NEURON_PERMISSION_TYPE_DISBURSE_MATURITY=8]="NEURON_PERMISSION_TYPE_DISBURSE_MATURITY",o[o.NEURON_PERMISSION_TYPE_STAKE_MATURITY=9]="NEURON_PERMISSION_TYPE_STAKE_MATURITY",o[o.NEURON_PERMISSION_TYPE_MANAGE_VOTING_PERMISSION=10]="NEURON_PERMISSION_TYPE_MANAGE_VOTING_PERMISSION",o))(me||{}),Ne=(a=>(a[a.PROPOSAL_REWARD_STATUS_UNSPECIFIED=0]="PROPOSAL_REWARD_STATUS_UNSPECIFIED",a[a.PROPOSAL_REWARD_STATUS_ACCEPT_VOTES=1]="PROPOSAL_REWARD_STATUS_ACCEPT_VOTES",a[a.PROPOSAL_REWARD_STATUS_READY_TO_SETTLE=2]="PROPOSAL_REWARD_STATUS_READY_TO_SETTLE",a[a.PROPOSAL_REWARD_STATUS_SETTLED=3]="PROPOSAL_REWARD_STATUS_SETTLED",a))(Ne||{}),Oe=(e=>(e[e.PROPOSAL_DECISION_STATUS_UNSPECIFIED=0]="PROPOSAL_DECISION_STATUS_UNSPECIFIED",e[e.PROPOSAL_DECISION_STATUS_OPEN=1]="PROPOSAL_DECISION_STATUS_OPEN",e[e.PROPOSAL_DECISION_STATUS_REJECTED=2]="PROPOSAL_DECISION_STATUS_REJECTED",e[e.PROPOSAL_DECISION_STATUS_ADOPTED=3]="PROPOSAL_DECISION_STATUS_ADOPTED",e[e.PROPOSAL_DECISION_STATUS_EXECUTED=4]="PROPOSAL_DECISION_STATUS_EXECUTED",e[e.PROPOSAL_DECISION_STATUS_FAILED=5]="PROPOSAL_DECISION_STATUS_FAILED",e))(Oe||{}),Re=(s=>(s[s.Unspecified=0]="Unspecified",s[s.Yes=1]="Yes",s[s.No=2]="No",s))(Re||{});var ge=(e=>(e[e.Unspecified=0]="Unspecified",e[e.Pending=1]="Pending",e[e.Open=2]="Open",e[e.Committed=3]="Committed",e[e.Aborted=4]="Aborted",e[e.Adopted=5]="Adopted",e))(ge||{}),ve=(s=>(s[s.TYPE_UNSPECIFIED=0]="TYPE_UNSPECIFIED",s[s.TYPE_SALE_NOT_OPEN=1]="TYPE_SALE_NOT_OPEN",s[s.TYPE_SALE_CLOSED=2]="TYPE_SALE_CLOSED",s))(ve||{}),ye=(n=>(n[n.TYPE_UNSPECIFIED=0]="TYPE_UNSPECIFIED",n[n.TYPE_SALE_NOT_OPEN=1]="TYPE_SALE_NOT_OPEN",n[n.TYPE_SALE_CLOSED=2]="TYPE_SALE_CLOSED",n[n.TYPE_TICKET_EXISTS=3]="TYPE_TICKET_EXISTS",n[n.TYPE_INVALID_USER_AMOUNT=4]="TYPE_INVALID_USER_AMOUNT",n[n.TYPE_INVALID_SUBACCOUNT=5]="TYPE_INVALID_SUBACCOUNT",n[n.TYPE_INVALID_PRINCIPAL=6]="TYPE_INVALID_PRINCIPAL",n))(ye||{});import{Canister as Se,createServices as fe,fromNullable as Ve,isNullish as Te,toNullable as ce}from"@dfinity/utils";var re=({IDL:t})=>{let A=t.Record({validator_canister_id:t.Opt(t.Principal),target_canister_id:t.Opt(t.Principal),validator_method_name:t.Opt(t.Text),target_method_name:t.Opt(t.Text)}),u=t.Variant({NativeNervousSystemFunction:t.Record({}),GenericNervousSystemFunction:A}),s=t.Record({id:t.Nat64,name:t.Text,description:t.Opt(t.Text),function_type:t.Opt(u)}),a=t.Record({not_dissolving_neurons_e8s_buckets:t.Vec(t.Tuple(t.Nat64,t.Float64)),garbage_collectable_neurons_count:t.Nat64,neurons_with_invalid_stake_count:t.Nat64,not_dissolving_neurons_count_buckets:t.Vec(t.Tuple(t.Nat64,t.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:t.Nat64,dissolved_neurons_count:t.Nat64,total_staked_e8s:t.Nat64,total_supply_governance_tokens:t.Nat64,not_dissolving_neurons_count:t.Nat64,dissolved_neurons_e8s:t.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:t.Nat64,dissolving_neurons_count_buckets:t.Vec(t.Tuple(t.Nat64,t.Nat64)),dissolving_neurons_count:t.Nat64,dissolving_neurons_e8s_buckets:t.Vec(t.Tuple(t.Nat64,t.Float64)),timestamp_seconds:t.Nat64}),_=t.Record({current_basis_points:t.Opt(t.Int32),updated_at_timestamp_seconds:t.Opt(t.Nat64)}),e=t.Record({id:t.Vec(t.Nat8)}),n=t.Record({followees:t.Vec(e)}),E=t.Record({followees:t.Vec(t.Tuple(t.Nat64,n))}),p=t.Record({permissions:t.Vec(t.Int32)}),G=t.Record({final_reward_rate_basis_points:t.Opt(t.Nat64),initial_reward_rate_basis_points:t.Opt(t.Nat64),reward_rate_transition_duration_seconds:t.Opt(t.Nat64),round_duration_seconds:t.Opt(t.Nat64)}),o=t.Record({default_followees:t.Opt(E),max_dissolve_delay_seconds:t.Opt(t.Nat64),max_dissolve_delay_bonus_percentage:t.Opt(t.Nat64),max_followees_per_function:t.Opt(t.Nat64),neuron_claimer_permissions:t.Opt(p),neuron_minimum_stake_e8s:t.Opt(t.Nat64),max_neuron_age_for_age_bonus:t.Opt(t.Nat64),initial_voting_period_seconds:t.Opt(t.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:t.Opt(t.Nat64),reject_cost_e8s:t.Opt(t.Nat64),max_proposals_to_keep_per_action:t.Opt(t.Nat32),wait_for_quiet_deadline_increase_seconds:t.Opt(t.Nat64),max_number_of_neurons:t.Opt(t.Nat64),transaction_fee_e8s:t.Opt(t.Nat64),max_number_of_proposals_with_ballots:t.Opt(t.Nat64),max_age_bonus_percentage:t.Opt(t.Nat64),neuron_grantable_permissions:t.Opt(p),voting_rewards_parameters:t.Opt(G),maturity_modulation_disabled:t.Opt(t.Bool),max_number_of_principals_per_neuron:t.Opt(t.Nat64)}),l=t.Record({archive_wasm_hash:t.Vec(t.Nat8),root_wasm_hash:t.Vec(t.Nat8),swap_wasm_hash:t.Vec(t.Nat8),ledger_wasm_hash:t.Vec(t.Nat8),governance_wasm_hash:t.Vec(t.Nat8),index_wasm_hash:t.Vec(t.Nat8)}),i=t.Record({id:t.Nat64}),R=t.Record({rounds_since_last_distribution:t.Opt(t.Nat64),actual_timestamp_seconds:t.Nat64,end_timestamp_seconds:t.Opt(t.Nat64),total_available_e8s_equivalent:t.Opt(t.Nat64),distributed_e8s_equivalent:t.Nat64,round:t.Nat64,settled_proposals:t.Vec(i)}),g=t.Record({mark_failed_at_seconds:t.Nat64,checking_upgrade_lock:t.Nat64,proposal_id:t.Nat64,target_version:t.Opt(l)}),c=t.Record({error_message:t.Text,error_type:t.Int32}),m=t.Record({subaccount:t.Vec(t.Nat8)}),r=t.Record({owner:t.Opt(t.Principal),subaccount:t.Opt(m)}),v=t.Record({human_readable:t.Opt(t.Text)}),U=t.Record({e8s:t.Opt(t.Nat64)}),q=t.Record({xdrs_per_icp:t.Opt(v),icps_per_token:t.Opt(v),tokens:t.Opt(U)}),B=t.Record({token:t.Opt(t.Int32),account:t.Opt(r),valuation_factors:t.Opt(q),timestamp_seconds:t.Opt(t.Nat64)}),y=t.Record({valuation:t.Opt(B)}),z=t.Variant({TransferSnsTreasuryFunds:y,MintSnsTokens:y}),Y=t.Record({vote:t.Int32,cast_timestamp_seconds:t.Nat64,voting_power:t.Nat64}),S=t.Record({basis_points:t.Opt(t.Nat64)}),W=t.Record({no:t.Nat64,yes:t.Nat64,total:t.Nat64,timestamp_seconds:t.Nat64}),j=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),Q=t.Record({canister_ids:t.Vec(t.Principal)}),K=t.Record({from_treasury:t.Int32,to_principal:t.Opt(t.Principal),to_subaccount:t.Opt(m),memo:t.Opt(t.Nat64),amount_e8s:t.Nat64}),X=t.Record({new_canister_wasm:t.Vec(t.Nat8),mode:t.Opt(t.Int32),canister_id:t.Opt(t.Principal),canister_upgrade_arg:t.Opt(t.Vec(t.Nat8))}),J=t.Record({canister_ids:t.Vec(t.Principal),new_controllers:t.Vec(t.Principal)}),H=t.Record({to_principal:t.Opt(t.Principal),to_subaccount:t.Opt(m),memo:t.Opt(t.Nat64),amount_e8s:t.Opt(t.Nat64)}),f=t.Record({url:t.Opt(t.Text),logo:t.Opt(t.Text),name:t.Opt(t.Text),description:t.Opt(t.Text)}),Z=t.Record({function_id:t.Nat64,payload:t.Vec(t.Nat8)}),$=t.Record({token_symbol:t.Opt(t.Text),transfer_fee:t.Opt(t.Nat64),token_logo:t.Opt(t.Text),token_name:t.Opt(t.Text)}),I=t.Record({motion_text:t.Text}),D=t.Variant({ManageNervousSystemParameters:o,AddGenericNervousSystemFunction:s,ManageDappCanisterSettings:j,RemoveGenericNervousSystemFunction:t.Nat64,UpgradeSnsToNextVersion:t.Record({}),RegisterDappCanisters:Q,TransferSnsTreasuryFunds:K,UpgradeSnsControlledCanister:X,DeregisterDappCanisters:J,MintSnsTokens:H,Unspecified:t.Record({}),ManageSnsMetadata:f,ExecuteGenericNervousSystemFunction:Z,ManageLedgerParameters:$,Motion:I}),N=t.Record({url:t.Text,title:t.Text,action:t.Opt(D),summary:t.Text}),L=t.Record({current_deadline_timestamp_seconds:t.Nat64}),O=t.Record({id:t.Opt(i),payload_text_rendering:t.Opt(t.Text),action:t.Nat64,failure_reason:t.Opt(c),action_auxiliary:t.Opt(z),ballots:t.Vec(t.Tuple(t.Text,Y)),minimum_yes_proportion_of_total:t.Opt(S),reward_event_round:t.Nat64,failed_timestamp_seconds:t.Nat64,reward_event_end_timestamp_seconds:t.Opt(t.Nat64),proposal_creation_timestamp_seconds:t.Nat64,initial_voting_period_seconds:t.Nat64,reject_cost_e8s:t.Nat64,latest_tally:t.Opt(W),wait_for_quiet_deadline_increase_seconds:t.Nat64,decided_timestamp_seconds:t.Nat64,proposal:t.Opt(N),proposer:t.Opt(e),wait_for_quiet_state:t.Opt(L),minimum_yes_proportion_of_exercised:t.Opt(S),is_eligible_for_rewards:t.Bool,executed_timestamp_seconds:t.Nat64}),V=t.Record({memo:t.Nat64,amount_e8s:t.Nat64}),T=t.Record({function_id:t.Nat64,followees:t.Vec(e)}),P=t.Record({to_account:t.Opt(r),percentage_to_disburse:t.Nat32}),tt=t.Record({requested_setting_for_auto_stake_maturity:t.Bool}),et=t.Record({additional_dissolve_delay_seconds:t.Nat32}),ot=t.Record({dissolve_timestamp_seconds:t.Nat64}),st=t.Variant({ChangeAutoStakeMaturity:tt,StopDissolving:t.Record({}),StartDissolving:t.Record({}),IncreaseDissolveDelay:et,SetDissolveTimestamp:ot}),b=t.Record({operation:t.Opt(st)}),x=t.Record({vote:t.Int32,proposal:t.Opt(i)}),nt=t.Record({amount_to_be_disbursed_e8s:t.Nat64,to_account:t.Opt(r)}),at=t.Record({controller:t.Opt(t.Principal),memo:t.Nat64}),rt=t.Variant({MemoAndController:at,NeuronId:t.Record({})}),M=t.Record({by:t.Opt(rt)}),w=t.Record({permissions_to_remove:t.Opt(p),principal_id:t.Opt(t.Principal)}),h=t.Record({permissions_to_add:t.Opt(p),principal_id:t.Opt(t.Principal)}),F=t.Record({percentage_to_merge:t.Nat32}),it=t.Record({e8s:t.Nat64}),C=t.Record({to_account:t.Opt(r),amount:t.Opt(it)}),ct=t.Variant({Split:V,Follow:T,DisburseMaturity:P,Configure:b,RegisterVote:x,SyncCommand:t.Record({}),MakeProposal:N,FinalizeDisburseMaturity:nt,ClaimOrRefreshNeuron:M,RemoveNeuronPermissions:w,AddNeuronPermissions:h,MergeMaturity:F,Disburse:C}),_t=t.Record({command:t.Opt(ct),timestamp:t.Nat64}),pt=t.Record({principal:t.Opt(t.Principal),permission_type:t.Vec(t.Int32)}),dt=t.Variant({DissolveDelaySeconds:t.Nat64,WhenDissolvedTimestampSeconds:t.Nat64}),ut=t.Record({timestamp_of_disbursement_seconds:t.Nat64,amount_e8s:t.Nat64,account_to_disburse_to:t.Opt(r),finalize_disbursement_timestamp_seconds:t.Opt(t.Nat64)}),d=t.Record({id:t.Opt(e),staked_maturity_e8s_equivalent:t.Opt(t.Nat64),permissions:t.Vec(pt),maturity_e8s_equivalent:t.Nat64,cached_neuron_stake_e8s:t.Nat64,created_timestamp_seconds:t.Nat64,source_nns_neuron_id:t.Opt(t.Nat64),auto_stake_maturity:t.Opt(t.Bool),aging_since_timestamp_seconds:t.Nat64,dissolve_state:t.Opt(dt),voting_power_percentage_multiplier:t.Nat64,vesting_period_seconds:t.Opt(t.Nat64),disburse_maturity_in_progress:t.Vec(ut),followees:t.Vec(t.Tuple(t.Nat64,n)),neuron_fees_e8s:t.Nat64}),_e=t.Record({root_canister_id:t.Opt(t.Principal),id_to_nervous_system_functions:t.Vec(t.Tuple(t.Nat64,s)),metrics:t.Opt(a),maturity_modulation:t.Opt(_),mode:t.Int32,parameters:t.Opt(o),is_finalizing_disburse_maturity:t.Opt(t.Bool),deployed_version:t.Opt(l),sns_initialization_parameters:t.Text,latest_reward_event:t.Opt(R),pending_version:t.Opt(g),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal),proposals:t.Vec(t.Tuple(t.Nat64,O)),in_flight_commands:t.Vec(t.Tuple(t.Text,_t)),sns_metadata:t.Opt(f),neurons:t.Vec(t.Tuple(t.Text,d)),genesis_timestamp_seconds:t.Nat64}),lt=t.Record({id:t.Opt(e),amount_e8s:t.Opt(t.Nat64)}),mt=t.Record({new_maturity_e8s:t.Opt(t.Nat64)}),Nt=t.Record({principals:t.Vec(t.Principal)}),Ot=t.Record({nns_neuron_hotkeys:t.Opt(Nt),nns_neuron_controller:t.Opt(t.Principal),nns_neuron_id:t.Opt(t.Nat64)}),Rt=t.Variant({NeuronsFund:Ot,Direct:t.Record({})}),gt=t.Record({neuron_ids:t.Vec(e)}),vt=t.Record({controller:t.Opt(t.Principal),dissolve_delay_seconds:t.Opt(t.Nat64),participant:t.Opt(Rt),stake_e8s:t.Opt(t.Nat64),followees:t.Opt(gt),neuron_id:t.Opt(e)}),yt=t.Record({neuron_recipes:t.Vec(vt)}),St=t.Record({controller:t.Opt(t.Principal),dissolve_delay_seconds:t.Opt(t.Nat64),source_nns_neuron_id:t.Opt(t.Nat64),stake_e8s:t.Opt(t.Nat64),followees:t.Vec(e),hotkey:t.Opt(t.Principal),neuron_id:t.Opt(e)}),ft=t.Record({neuron_recipes:t.Opt(yt),neuron_parameters:t.Vec(St)}),Vt=t.Record({id:t.Opt(e),status:t.Int32}),Tt=t.Record({swap_neurons:t.Vec(Vt)}),Pt=t.Variant({Ok:Tt,Err:t.Int32}),bt=t.Record({claim_swap_neurons_result:t.Opt(Pt)}),xt=t.Record({maturity_modulation:t.Opt(_)}),Mt=t.Record({url:t.Opt(t.Text),logo:t.Opt(t.Text),name:t.Opt(t.Text),description:t.Opt(t.Text)}),wt=t.Record({mode:t.Opt(t.Int32)}),ht=t.Record({neuron_id:t.Opt(e)}),Ft=t.Variant({Error:c,Neuron:d}),Ct=t.Record({result:t.Opt(Ft)}),k=t.Record({proposal_id:t.Opt(i)}),kt=t.Variant({Error:c,Proposal:O}),At=t.Record({result:t.Opt(kt)}),Et=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),Gt=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),Ut=t.Record({status:Et,memory_size:t.Nat,cycles:t.Nat,settings:Gt,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),qt=t.Record({deployed_version:t.Opt(l),pending_version:t.Opt(g)}),Bt=t.Record({sns_initialization_parameters:t.Text}),zt=t.Record({reserved_ids:t.Vec(t.Nat64),functions:t.Vec(s)}),Yt=t.Record({of_principal:t.Opt(t.Principal),limit:t.Nat32,start_page_at:t.Opt(e)}),Wt=t.Record({neurons:t.Vec(d)}),jt=t.Record({include_reward_status:t.Vec(t.Int32),before_proposal:t.Opt(i),limit:t.Nat32,exclude_type:t.Vec(t.Nat64),include_status:t.Vec(t.Int32)}),Qt=t.Record({include_ballots_by_caller:t.Opt(t.Bool),proposals:t.Vec(O)}),Kt=t.Record({percentage_to_stake:t.Opt(t.Nat32)}),Xt=t.Variant({Split:V,Follow:T,DisburseMaturity:P,ClaimOrRefresh:M,Configure:b,RegisterVote:x,MakeProposal:N,StakeMaturity:Kt,RemoveNeuronPermissions:w,AddNeuronPermissions:h,MergeMaturity:F,Disburse:C}),Jt=t.Record({subaccount:t.Vec(t.Nat8),command:t.Opt(Xt)}),Ht=t.Record({created_neuron_id:t.Opt(e)}),Zt=t.Record({amount_disbursed_e8s:t.Nat64,amount_deducted_e8s:t.Opt(t.Nat64)}),$t=t.Record({refreshed_neuron_id:t.Opt(e)}),It=t.Record({maturity_e8s:t.Nat64,staked_maturity_e8s:t.Nat64}),Dt=t.Record({merged_maturity_e8s:t.Nat64,new_stake_e8s:t.Nat64}),Lt=t.Record({transfer_block_height:t.Nat64}),te=t.Variant({Error:c,Split:Ht,Follow:t.Record({}),DisburseMaturity:Zt,ClaimOrRefresh:$t,Configure:t.Record({}),RegisterVote:t.Record({}),MakeProposal:k,RemoveNeuronPermission:t.Record({}),StakeMaturity:It,MergeMaturity:Dt,Disburse:Lt,AddNeuronPermission:t.Record({})}),ee=t.Record({command:t.Opt(te)}),oe=t.Record({recipient:t.Opt(r),amount_e8s:t.Opt(t.Nat64)}),se=t.Record({mode:t.Int32});return t.Service({add_maturity:t.Func([lt],[mt],[]),claim_swap_neurons:t.Func([ft],[bt],[]),fail_stuck_upgrade_in_progress:t.Func([t.Record({})],[t.Record({})],[]),get_build_metadata:t.Func([],[t.Text],[]),get_latest_reward_event:t.Func([],[R],[]),get_maturity_modulation:t.Func([t.Record({})],[xt],[]),get_metadata:t.Func([t.Record({})],[Mt],[]),get_mode:t.Func([t.Record({})],[wt],[]),get_nervous_system_parameters:t.Func([t.Null],[o],[]),get_neuron:t.Func([ht],[Ct],[]),get_proposal:t.Func([k],[At],[]),get_root_canister_status:t.Func([t.Null],[Ut],[]),get_running_sns_version:t.Func([t.Record({})],[qt],[]),get_sns_initialization_parameters:t.Func([t.Record({})],[Bt],[]),list_nervous_system_functions:t.Func([],[zt],[]),list_neurons:t.Func([Yt],[Wt],[]),list_proposals:t.Func([jt],[Qt],[]),manage_neuron:t.Func([Jt],[ee],[]),mint_tokens:t.Func([oe],[t.Record({})],[]),set_mode:t.Func([se],[t.Record({})],[]),update_neuron:t.Func([d],[t.Opt(c)],[])})};var ie=({IDL:t})=>{let A=t.Record({validator_canister_id:t.Opt(t.Principal),target_canister_id:t.Opt(t.Principal),validator_method_name:t.Opt(t.Text),target_method_name:t.Opt(t.Text)}),u=t.Variant({NativeNervousSystemFunction:t.Record({}),GenericNervousSystemFunction:A}),s=t.Record({id:t.Nat64,name:t.Text,description:t.Opt(t.Text),function_type:t.Opt(u)}),a=t.Record({not_dissolving_neurons_e8s_buckets:t.Vec(t.Tuple(t.Nat64,t.Float64)),garbage_collectable_neurons_count:t.Nat64,neurons_with_invalid_stake_count:t.Nat64,not_dissolving_neurons_count_buckets:t.Vec(t.Tuple(t.Nat64,t.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:t.Nat64,dissolved_neurons_count:t.Nat64,total_staked_e8s:t.Nat64,total_supply_governance_tokens:t.Nat64,not_dissolving_neurons_count:t.Nat64,dissolved_neurons_e8s:t.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:t.Nat64,dissolving_neurons_count_buckets:t.Vec(t.Tuple(t.Nat64,t.Nat64)),dissolving_neurons_count:t.Nat64,dissolving_neurons_e8s_buckets:t.Vec(t.Tuple(t.Nat64,t.Float64)),timestamp_seconds:t.Nat64}),_=t.Record({current_basis_points:t.Opt(t.Int32),updated_at_timestamp_seconds:t.Opt(t.Nat64)}),e=t.Record({id:t.Vec(t.Nat8)}),n=t.Record({followees:t.Vec(e)}),E=t.Record({followees:t.Vec(t.Tuple(t.Nat64,n))}),p=t.Record({permissions:t.Vec(t.Int32)}),G=t.Record({final_reward_rate_basis_points:t.Opt(t.Nat64),initial_reward_rate_basis_points:t.Opt(t.Nat64),reward_rate_transition_duration_seconds:t.Opt(t.Nat64),round_duration_seconds:t.Opt(t.Nat64)}),o=t.Record({default_followees:t.Opt(E),max_dissolve_delay_seconds:t.Opt(t.Nat64),max_dissolve_delay_bonus_percentage:t.Opt(t.Nat64),max_followees_per_function:t.Opt(t.Nat64),neuron_claimer_permissions:t.Opt(p),neuron_minimum_stake_e8s:t.Opt(t.Nat64),max_neuron_age_for_age_bonus:t.Opt(t.Nat64),initial_voting_period_seconds:t.Opt(t.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:t.Opt(t.Nat64),reject_cost_e8s:t.Opt(t.Nat64),max_proposals_to_keep_per_action:t.Opt(t.Nat32),wait_for_quiet_deadline_increase_seconds:t.Opt(t.Nat64),max_number_of_neurons:t.Opt(t.Nat64),transaction_fee_e8s:t.Opt(t.Nat64),max_number_of_proposals_with_ballots:t.Opt(t.Nat64),max_age_bonus_percentage:t.Opt(t.Nat64),neuron_grantable_permissions:t.Opt(p),voting_rewards_parameters:t.Opt(G),maturity_modulation_disabled:t.Opt(t.Bool),max_number_of_principals_per_neuron:t.Opt(t.Nat64)}),l=t.Record({archive_wasm_hash:t.Vec(t.Nat8),root_wasm_hash:t.Vec(t.Nat8),swap_wasm_hash:t.Vec(t.Nat8),ledger_wasm_hash:t.Vec(t.Nat8),governance_wasm_hash:t.Vec(t.Nat8),index_wasm_hash:t.Vec(t.Nat8)}),i=t.Record({id:t.Nat64}),R=t.Record({rounds_since_last_distribution:t.Opt(t.Nat64),actual_timestamp_seconds:t.Nat64,end_timestamp_seconds:t.Opt(t.Nat64),total_available_e8s_equivalent:t.Opt(t.Nat64),distributed_e8s_equivalent:t.Nat64,round:t.Nat64,settled_proposals:t.Vec(i)}),g=t.Record({mark_failed_at_seconds:t.Nat64,checking_upgrade_lock:t.Nat64,proposal_id:t.Nat64,target_version:t.Opt(l)}),c=t.Record({error_message:t.Text,error_type:t.Int32}),m=t.Record({subaccount:t.Vec(t.Nat8)}),r=t.Record({owner:t.Opt(t.Principal),subaccount:t.Opt(m)}),v=t.Record({human_readable:t.Opt(t.Text)}),U=t.Record({e8s:t.Opt(t.Nat64)}),q=t.Record({xdrs_per_icp:t.Opt(v),icps_per_token:t.Opt(v),tokens:t.Opt(U)}),B=t.Record({token:t.Opt(t.Int32),account:t.Opt(r),valuation_factors:t.Opt(q),timestamp_seconds:t.Opt(t.Nat64)}),y=t.Record({valuation:t.Opt(B)}),z=t.Variant({TransferSnsTreasuryFunds:y,MintSnsTokens:y}),Y=t.Record({vote:t.Int32,cast_timestamp_seconds:t.Nat64,voting_power:t.Nat64}),S=t.Record({basis_points:t.Opt(t.Nat64)}),W=t.Record({no:t.Nat64,yes:t.Nat64,total:t.Nat64,timestamp_seconds:t.Nat64}),j=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),Q=t.Record({canister_ids:t.Vec(t.Principal)}),K=t.Record({from_treasury:t.Int32,to_principal:t.Opt(t.Principal),to_subaccount:t.Opt(m),memo:t.Opt(t.Nat64),amount_e8s:t.Nat64}),X=t.Record({new_canister_wasm:t.Vec(t.Nat8),mode:t.Opt(t.Int32),canister_id:t.Opt(t.Principal),canister_upgrade_arg:t.Opt(t.Vec(t.Nat8))}),J=t.Record({canister_ids:t.Vec(t.Principal),new_controllers:t.Vec(t.Principal)}),H=t.Record({to_principal:t.Opt(t.Principal),to_subaccount:t.Opt(m),memo:t.Opt(t.Nat64),amount_e8s:t.Opt(t.Nat64)}),f=t.Record({url:t.Opt(t.Text),logo:t.Opt(t.Text),name:t.Opt(t.Text),description:t.Opt(t.Text)}),Z=t.Record({function_id:t.Nat64,payload:t.Vec(t.Nat8)}),$=t.Record({token_symbol:t.Opt(t.Text),transfer_fee:t.Opt(t.Nat64),token_logo:t.Opt(t.Text),token_name:t.Opt(t.Text)}),I=t.Record({motion_text:t.Text}),D=t.Variant({ManageNervousSystemParameters:o,AddGenericNervousSystemFunction:s,ManageDappCanisterSettings:j,RemoveGenericNervousSystemFunction:t.Nat64,UpgradeSnsToNextVersion:t.Record({}),RegisterDappCanisters:Q,TransferSnsTreasuryFunds:K,UpgradeSnsControlledCanister:X,DeregisterDappCanisters:J,MintSnsTokens:H,Unspecified:t.Record({}),ManageSnsMetadata:f,ExecuteGenericNervousSystemFunction:Z,ManageLedgerParameters:$,Motion:I}),N=t.Record({url:t.Text,title:t.Text,action:t.Opt(D),summary:t.Text}),L=t.Record({current_deadline_timestamp_seconds:t.Nat64}),O=t.Record({id:t.Opt(i),payload_text_rendering:t.Opt(t.Text),action:t.Nat64,failure_reason:t.Opt(c),action_auxiliary:t.Opt(z),ballots:t.Vec(t.Tuple(t.Text,Y)),minimum_yes_proportion_of_total:t.Opt(S),reward_event_round:t.Nat64,failed_timestamp_seconds:t.Nat64,reward_event_end_timestamp_seconds:t.Opt(t.Nat64),proposal_creation_timestamp_seconds:t.Nat64,initial_voting_period_seconds:t.Nat64,reject_cost_e8s:t.Nat64,latest_tally:t.Opt(W),wait_for_quiet_deadline_increase_seconds:t.Nat64,decided_timestamp_seconds:t.Nat64,proposal:t.Opt(N),proposer:t.Opt(e),wait_for_quiet_state:t.Opt(L),minimum_yes_proportion_of_exercised:t.Opt(S),is_eligible_for_rewards:t.Bool,executed_timestamp_seconds:t.Nat64}),V=t.Record({memo:t.Nat64,amount_e8s:t.Nat64}),T=t.Record({function_id:t.Nat64,followees:t.Vec(e)}),P=t.Record({to_account:t.Opt(r),percentage_to_disburse:t.Nat32}),tt=t.Record({requested_setting_for_auto_stake_maturity:t.Bool}),et=t.Record({additional_dissolve_delay_seconds:t.Nat32}),ot=t.Record({dissolve_timestamp_seconds:t.Nat64}),st=t.Variant({ChangeAutoStakeMaturity:tt,StopDissolving:t.Record({}),StartDissolving:t.Record({}),IncreaseDissolveDelay:et,SetDissolveTimestamp:ot}),b=t.Record({operation:t.Opt(st)}),x=t.Record({vote:t.Int32,proposal:t.Opt(i)}),nt=t.Record({amount_to_be_disbursed_e8s:t.Nat64,to_account:t.Opt(r)}),at=t.Record({controller:t.Opt(t.Principal),memo:t.Nat64}),rt=t.Variant({MemoAndController:at,NeuronId:t.Record({})}),M=t.Record({by:t.Opt(rt)}),w=t.Record({permissions_to_remove:t.Opt(p),principal_id:t.Opt(t.Principal)}),h=t.Record({permissions_to_add:t.Opt(p),principal_id:t.Opt(t.Principal)}),F=t.Record({percentage_to_merge:t.Nat32}),it=t.Record({e8s:t.Nat64}),C=t.Record({to_account:t.Opt(r),amount:t.Opt(it)}),ct=t.Variant({Split:V,Follow:T,DisburseMaturity:P,Configure:b,RegisterVote:x,SyncCommand:t.Record({}),MakeProposal:N,FinalizeDisburseMaturity:nt,ClaimOrRefreshNeuron:M,RemoveNeuronPermissions:w,AddNeuronPermissions:h,MergeMaturity:F,Disburse:C}),_t=t.Record({command:t.Opt(ct),timestamp:t.Nat64}),pt=t.Record({principal:t.Opt(t.Principal),permission_type:t.Vec(t.Int32)}),dt=t.Variant({DissolveDelaySeconds:t.Nat64,WhenDissolvedTimestampSeconds:t.Nat64}),ut=t.Record({timestamp_of_disbursement_seconds:t.Nat64,amount_e8s:t.Nat64,account_to_disburse_to:t.Opt(r),finalize_disbursement_timestamp_seconds:t.Opt(t.Nat64)}),d=t.Record({id:t.Opt(e),staked_maturity_e8s_equivalent:t.Opt(t.Nat64),permissions:t.Vec(pt),maturity_e8s_equivalent:t.Nat64,cached_neuron_stake_e8s:t.Nat64,created_timestamp_seconds:t.Nat64,source_nns_neuron_id:t.Opt(t.Nat64),auto_stake_maturity:t.Opt(t.Bool),aging_since_timestamp_seconds:t.Nat64,dissolve_state:t.Opt(dt),voting_power_percentage_multiplier:t.Nat64,vesting_period_seconds:t.Opt(t.Nat64),disburse_maturity_in_progress:t.Vec(ut),followees:t.Vec(t.Tuple(t.Nat64,n)),neuron_fees_e8s:t.Nat64}),_e=t.Record({root_canister_id:t.Opt(t.Principal),id_to_nervous_system_functions:t.Vec(t.Tuple(t.Nat64,s)),metrics:t.Opt(a),maturity_modulation:t.Opt(_),mode:t.Int32,parameters:t.Opt(o),is_finalizing_disburse_maturity:t.Opt(t.Bool),deployed_version:t.Opt(l),sns_initialization_parameters:t.Text,latest_reward_event:t.Opt(R),pending_version:t.Opt(g),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal),proposals:t.Vec(t.Tuple(t.Nat64,O)),in_flight_commands:t.Vec(t.Tuple(t.Text,_t)),sns_metadata:t.Opt(f),neurons:t.Vec(t.Tuple(t.Text,d)),genesis_timestamp_seconds:t.Nat64}),lt=t.Record({id:t.Opt(e),amount_e8s:t.Opt(t.Nat64)}),mt=t.Record({new_maturity_e8s:t.Opt(t.Nat64)}),Nt=t.Record({principals:t.Vec(t.Principal)}),Ot=t.Record({nns_neuron_hotkeys:t.Opt(Nt),nns_neuron_controller:t.Opt(t.Principal),nns_neuron_id:t.Opt(t.Nat64)}),Rt=t.Variant({NeuronsFund:Ot,Direct:t.Record({})}),gt=t.Record({neuron_ids:t.Vec(e)}),vt=t.Record({controller:t.Opt(t.Principal),dissolve_delay_seconds:t.Opt(t.Nat64),participant:t.Opt(Rt),stake_e8s:t.Opt(t.Nat64),followees:t.Opt(gt),neuron_id:t.Opt(e)}),yt=t.Record({neuron_recipes:t.Vec(vt)}),St=t.Record({controller:t.Opt(t.Principal),dissolve_delay_seconds:t.Opt(t.Nat64),source_nns_neuron_id:t.Opt(t.Nat64),stake_e8s:t.Opt(t.Nat64),followees:t.Vec(e),hotkey:t.Opt(t.Principal),neuron_id:t.Opt(e)}),ft=t.Record({neuron_recipes:t.Opt(yt),neuron_parameters:t.Vec(St)}),Vt=t.Record({id:t.Opt(e),status:t.Int32}),Tt=t.Record({swap_neurons:t.Vec(Vt)}),Pt=t.Variant({Ok:Tt,Err:t.Int32}),bt=t.Record({claim_swap_neurons_result:t.Opt(Pt)}),xt=t.Record({maturity_modulation:t.Opt(_)}),Mt=t.Record({url:t.Opt(t.Text),logo:t.Opt(t.Text),name:t.Opt(t.Text),description:t.Opt(t.Text)}),wt=t.Record({mode:t.Opt(t.Int32)}),ht=t.Record({neuron_id:t.Opt(e)}),Ft=t.Variant({Error:c,Neuron:d}),Ct=t.Record({result:t.Opt(Ft)}),k=t.Record({proposal_id:t.Opt(i)}),kt=t.Variant({Error:c,Proposal:O}),At=t.Record({result:t.Opt(kt)}),Et=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),Gt=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),Ut=t.Record({status:Et,memory_size:t.Nat,cycles:t.Nat,settings:Gt,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),qt=t.Record({deployed_version:t.Opt(l),pending_version:t.Opt(g)}),Bt=t.Record({sns_initialization_parameters:t.Text}),zt=t.Record({reserved_ids:t.Vec(t.Nat64),functions:t.Vec(s)}),Yt=t.Record({of_principal:t.Opt(t.Principal),limit:t.Nat32,start_page_at:t.Opt(e)}),Wt=t.Record({neurons:t.Vec(d)}),jt=t.Record({include_reward_status:t.Vec(t.Int32),before_proposal:t.Opt(i),limit:t.Nat32,exclude_type:t.Vec(t.Nat64),include_status:t.Vec(t.Int32)}),Qt=t.Record({include_ballots_by_caller:t.Opt(t.Bool),proposals:t.Vec(O)}),Kt=t.Record({percentage_to_stake:t.Opt(t.Nat32)}),Xt=t.Variant({Split:V,Follow:T,DisburseMaturity:P,ClaimOrRefresh:M,Configure:b,RegisterVote:x,MakeProposal:N,StakeMaturity:Kt,RemoveNeuronPermissions:w,AddNeuronPermissions:h,MergeMaturity:F,Disburse:C}),Jt=t.Record({subaccount:t.Vec(t.Nat8),command:t.Opt(Xt)}),Ht=t.Record({created_neuron_id:t.Opt(e)}),Zt=t.Record({amount_disbursed_e8s:t.Nat64,amount_deducted_e8s:t.Opt(t.Nat64)}),$t=t.Record({refreshed_neuron_id:t.Opt(e)}),It=t.Record({maturity_e8s:t.Nat64,staked_maturity_e8s:t.Nat64}),Dt=t.Record({merged_maturity_e8s:t.Nat64,new_stake_e8s:t.Nat64}),Lt=t.Record({transfer_block_height:t.Nat64}),te=t.Variant({Error:c,Split:Ht,Follow:t.Record({}),DisburseMaturity:Zt,ClaimOrRefresh:$t,Configure:t.Record({}),RegisterVote:t.Record({}),MakeProposal:k,RemoveNeuronPermission:t.Record({}),StakeMaturity:It,MergeMaturity:Dt,Disburse:Lt,AddNeuronPermission:t.Record({})}),ee=t.Record({command:t.Opt(te)}),oe=t.Record({recipient:t.Opt(r),amount_e8s:t.Opt(t.Nat64)}),se=t.Record({mode:t.Int32});return t.Service({add_maturity:t.Func([lt],[mt],[]),claim_swap_neurons:t.Func([ft],[bt],[]),fail_stuck_upgrade_in_progress:t.Func([t.Record({})],[t.Record({})],[]),get_build_metadata:t.Func([],[t.Text],["query"]),get_latest_reward_event:t.Func([],[R],["query"]),get_maturity_modulation:t.Func([t.Record({})],[xt],[]),get_metadata:t.Func([t.Record({})],[Mt],["query"]),get_mode:t.Func([t.Record({})],[wt],["query"]),get_nervous_system_parameters:t.Func([t.Null],[o],["query"]),get_neuron:t.Func([ht],[Ct],["query"]),get_proposal:t.Func([k],[At],["query"]),get_root_canister_status:t.Func([t.Null],[Ut],[]),get_running_sns_version:t.Func([t.Record({})],[qt],["query"]),get_sns_initialization_parameters:t.Func([t.Record({})],[Bt],["query"]),list_nervous_system_functions:t.Func([],[zt],["query"]),list_neurons:t.Func([Yt],[Wt],["query"]),list_proposals:t.Func([jt],[Qt],["query"]),manage_neuron:t.Func([Jt],[ee],[]),mint_tokens:t.Func([oe],[t.Record({})],[]),set_mode:t.Func([se],[t.Record({})],[]),update_neuron:t.Func([d],[t.Opt(c)],[])})};var ne=class t extends Se{constructor(){super(...arguments);this.addMaturity=async u=>{let{id:s,amountE8s:a}=u,{new_maturity_e8s:_}=await this.caller(u).add_maturity({id:ce(s),amount_e8s:ce(a)}),e=Ve(_);if(Te(e)||e<a)throw new ae("No maturity added")}}static create(u){let{service:s,certifiedService:a,canisterId:_}=fe({options:u,idlFactory:ie,certifiedIdlFactory:re});return new t(_,s,a)}};export{ve as GetOpenTicketErrorType,ye as NewSaleTicketResponseErrorType,de as SnsGovernanceCanister,ae as SnsGovernanceError,ne as SnsGovernanceTestCanister,me as SnsNeuronPermissionType,Oe as SnsProposalDecisionStatus,Ne as SnsProposalRewardStatus,ue as SnsRootCanister,le as SnsSwapCanister,xe as SnsSwapGetOpenTicketError,ge as SnsSwapLifecycle,be as SnsSwapNewTicketError,Re as SnsVote,we as SnsWrapper,Pe as UnsupportedMethodError,pe as fromCandidAction,he as initSnsWrapper,Me as neuronSubaccount};
2
2
  //# sourceMappingURL=index.js.map