@dfinity/sns 3.6.0 → 3.7.0-beta-2025-06-26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -82
- package/dist/candid/sns_governance.certified.idl.js +61 -10
- package/dist/candid/sns_governance.d.ts +28 -0
- package/dist/candid/sns_governance.did +55 -1
- package/dist/candid/sns_governance.idl.js +65 -10
- package/dist/candid/sns_governance_test.certified.idl.js +61 -10
- package/dist/candid/sns_governance_test.d.ts +28 -0
- package/dist/candid/sns_governance_test.did +55 -1
- package/dist/candid/sns_governance_test.idl.js +65 -10
- package/dist/candid/sns_root.certified.idl.js +0 -2
- package/dist/candid/sns_root.d.ts +0 -2
- package/dist/candid/sns_root.did +1 -3
- package/dist/candid/sns_root.idl.js +0 -2
- package/dist/candid/sns_swap.did +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +4 -4
- package/dist/esm/chunk-56ABQWOI.js +2 -0
- package/dist/esm/chunk-56ABQWOI.js.map +7 -0
- package/dist/esm/chunk-C4535TGA.js +7 -0
- package/dist/esm/chunk-C4535TGA.js.map +7 -0
- package/dist/esm/{chunk-7RSE53BN.js → chunk-IMCH2CXJ.js} +2 -2
- package/dist/esm/chunk-IMCH2CXJ.js.map +7 -0
- package/dist/esm/chunk-KCQOYKOJ.js +2 -0
- package/dist/esm/chunk-KCQOYKOJ.js.map +7 -0
- package/dist/esm/chunk-RABWAJNE.js +2 -0
- package/dist/esm/chunk-RABWAJNE.js.map +7 -0
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/root.canister.js +1 -1
- package/dist/esm/sns.js +1 -1
- package/dist/esm/sns.wrapper.js +1 -1
- package/dist/esm/swap.canister.js +1 -1
- package/dist/types/governance.canister.d.ts +1 -2
- package/dist/types/sns.d.ts +1 -1
- package/dist/types/sns.wrapper.d.ts +2 -2
- package/dist/types/swap.canister.d.ts +1 -2
- package/dist/types/types/actions.d.ts +7 -1
- package/dist/types/types/governance.params.d.ts +1 -2
- package/package.json +7 -7
- package/dist/esm/chunk-7RSE53BN.js.map +0 -7
- package/dist/esm/chunk-HIRPCVPC.js +0 -2
- package/dist/esm/chunk-HIRPCVPC.js.map +0 -7
- package/dist/esm/chunk-PUAIJI6X.js +0 -2
- package/dist/esm/chunk-PUAIJI6X.js.map +0 -7
- package/dist/esm/chunk-TJDVNGQZ.js +0 -7
- package/dist/esm/chunk-TJDVNGQZ.js.map +0 -7
- package/dist/esm/chunk-V7RSNTZY.js +0 -2
- package/dist/esm/chunk-V7RSNTZY.js.map +0 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-RABWAJNE.js";export{a as SnsRootCanister};
|
|
2
2
|
//# sourceMappingURL=root.canister.js.map
|
package/dist/esm/sns.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-56ABQWOI.js";import"./chunk-KCQOYKOJ.js";import"./chunk-RABWAJNE.js";import"./chunk-C4535TGA.js";import"./chunk-4INNMFYU.js";import"./chunk-IMCH2CXJ.js";export{a as initSnsWrapper};
|
|
2
2
|
//# sourceMappingURL=sns.js.map
|
package/dist/esm/sns.wrapper.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
1
|
+
import{b as a}from"./chunk-C4535TGA.js";import"./chunk-4INNMFYU.js";export{a as SnsWrapper};
|
|
2
2
|
//# sourceMappingURL=sns.wrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as a}from"./chunk-
|
|
1
|
+
import{d as a}from"./chunk-IMCH2CXJ.js";export{a as SnsSwapCanister};
|
|
2
2
|
//# sourceMappingURL=swap.canister.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { Canister } from "@dfinity/utils";
|
|
1
|
+
import { Canister, type QueryParams } from "@dfinity/utils";
|
|
3
2
|
import type { GetMetadataResponse, ListNervousSystemFunctionsResponse, ListProposalsResponse, ListTopicsResponse, ManageNeuron, ManageNeuronResponse, NervousSystemParameters, Neuron, NeuronId, ProposalData, _SERVICE as SnsGovernanceService } from "../candid/sns_governance";
|
|
4
3
|
import type { SnsCanisterOptions } from "./types/canister.options";
|
|
5
4
|
import type { SnsClaimNeuronParams, SnsDisburseNeuronParams, SnsGetNeuronParams, SnsGetProposalParams, SnsIncreaseDissolveDelayParams, SnsListNeuronsParams, SnsListProposalsParams, SnsListTopicsParams, SnsNeuronAutoStakeMaturityParams, SnsNeuronDisburseMaturityParams, SnsNeuronPermissionsParams, SnsNeuronStakeMaturityParams, SnsRegisterVoteParams, SnsSetDissolveTimestampParams, SnsSetFollowingParams, SnsSetTopicFollowees, SnsSplitNeuronParams } from "./types/governance.params";
|
package/dist/types/sns.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Agent } from "@dfinity/agent";
|
|
2
|
-
import type
|
|
2
|
+
import { type QueryParams } from "@dfinity/utils";
|
|
3
3
|
import type { _SERVICE as SnsRootService } from "../candid/sns_root";
|
|
4
4
|
import { SnsWrapper } from "./sns.wrapper";
|
|
5
5
|
import type { SnsCanisterOptions } from "./types/canister.options";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BalanceParams, GetAccountTransactionsParams, IcrcAccount, IcrcBlockIndex, IcrcGetTransactions, IcrcIndexCanister, IcrcLedgerCanister, IcrcTokenMetadataResponse, IcrcTokens, TransferParams } from "@dfinity/ledger-icrc";
|
|
2
2
|
import type { Principal } from "@dfinity/principal";
|
|
3
|
-
import type
|
|
3
|
+
import { type QueryParams } from "@dfinity/utils";
|
|
4
4
|
import type { GetMetadataResponse, ListNervousSystemFunctionsResponse, ListProposalsResponse, NervousSystemParameters, Neuron, NeuronId, ProposalData } from "../candid/sns_governance";
|
|
5
5
|
import type { BuyerState, GetAutoFinalizationStatusResponse, GetBuyerStateRequest, GetDerivedStateResponse, GetLifecycleResponse, GetSaleParametersResponse, GetStateResponse, RefreshBuyerTokensRequest, RefreshBuyerTokensResponse, Ticket } from "../candid/sns_swap";
|
|
6
6
|
import type { SnsGovernanceCanister } from "./governance.canister";
|
|
@@ -37,7 +37,7 @@ export declare class SnsWrapper {
|
|
|
37
37
|
/**
|
|
38
38
|
* Constructor to instantiate a Sns
|
|
39
39
|
*/
|
|
40
|
-
constructor({ root, governance, ledger, swap, index
|
|
40
|
+
constructor({ root, governance, ledger, swap, index, certified, }: SnsWrapperOptions);
|
|
41
41
|
/**
|
|
42
42
|
* Binds the list of canister ids of the Sns.
|
|
43
43
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { Canister } from "@dfinity/utils";
|
|
1
|
+
import { Canister, type QueryParams } from "@dfinity/utils";
|
|
3
2
|
import type { BuyerState, GetAutoFinalizationStatusResponse, GetBuyerStateRequest, GetDerivedStateResponse, GetLifecycleResponse, GetSaleParametersResponse, GetStateResponse, RefreshBuyerTokensRequest, RefreshBuyerTokensResponse, _SERVICE as SnsSwapService, Ticket } from "../candid/sns_swap";
|
|
4
3
|
import type { SnsCanisterOptions } from "./types/canister.options";
|
|
5
4
|
import type { NewSaleTicketParams } from "./types/swap.params";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Principal } from "@dfinity/principal";
|
|
2
|
-
import type { DefaultFollowees, DeregisterDappCanisters, ExecuteGenericNervousSystemFunction, Motion, NeuronPermissionList, RegisterDappCanisters, Subaccount, Topic } from "../../candid/sns_governance";
|
|
2
|
+
import type { DefaultFollowees, DeregisterDappCanisters, ExecuteGenericNervousSystemFunction, ExtensionInit, Motion, NeuronPermissionList, RegisterDappCanisters, Subaccount, Topic } from "../../candid/sns_governance";
|
|
3
3
|
import type { Option } from "./common";
|
|
4
4
|
export type Action = {
|
|
5
5
|
ManageNervousSystemParameters: NervousSystemParameters;
|
|
@@ -13,6 +13,8 @@ export type Action = {
|
|
|
13
13
|
UpgradeSnsToNextVersion: Record<string, never>;
|
|
14
14
|
} | {
|
|
15
15
|
RegisterDappCanisters: RegisterDappCanisters;
|
|
16
|
+
} | {
|
|
17
|
+
RegisterExtension: RegisterExtension;
|
|
16
18
|
} | {
|
|
17
19
|
TransferSnsTreasuryFunds: TransferSnsTreasuryFunds;
|
|
18
20
|
} | {
|
|
@@ -102,3 +104,7 @@ export interface ManageSnsMetadata {
|
|
|
102
104
|
name: Option<string>;
|
|
103
105
|
description: Option<string>;
|
|
104
106
|
}
|
|
107
|
+
export interface RegisterExtension {
|
|
108
|
+
chunked_canister_wasm: Option<ChunkedCanisterWasm>;
|
|
109
|
+
extension_init: Option<ExtensionInit>;
|
|
110
|
+
}
|
|
@@ -26,8 +26,7 @@ export interface SnsListProposalsParams extends QueryParams {
|
|
|
26
26
|
includeStatus?: SnsProposalDecisionStatus[];
|
|
27
27
|
includeTopics?: Array<Topic | null>;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
30
|
-
}
|
|
29
|
+
export type SnsListTopicsParams = QueryParams;
|
|
31
30
|
/**
|
|
32
31
|
* The parameters to get an sns proposal
|
|
33
32
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfinity/sns",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0-beta-2025-06-26",
|
|
4
4
|
"description": "A library for interfacing with a Service Nervous System (SNS) project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/cjs/index.cjs.js",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"sns"
|
|
37
37
|
],
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@dfinity/agent": "
|
|
40
|
-
"@dfinity/candid": "
|
|
41
|
-
"@dfinity/ledger-icrc": "
|
|
42
|
-
"@dfinity/principal": "
|
|
43
|
-
"@dfinity/utils": "
|
|
39
|
+
"@dfinity/agent": "*",
|
|
40
|
+
"@dfinity/candid": "*",
|
|
41
|
+
"@dfinity/ledger-icrc": "*",
|
|
42
|
+
"@dfinity/principal": "*",
|
|
43
|
+
"@dfinity/utils": "*"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@noble/hashes": "^1.3.2"
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
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 'wasm_memory_threshold' : IDL.Opt(IDL.Nat),\n 'controllers' : IDL.Vec(IDL.Principal),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const QueryStats = IDL.Record({\n 'response_payload_bytes_total' : IDL.Opt(IDL.Nat),\n 'num_instructions_total' : IDL.Opt(IDL.Nat),\n 'num_calls_total' : IDL.Opt(IDL.Nat),\n 'request_payload_bytes_total' : IDL.Opt(IDL.Nat),\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'query_stats' : IDL.Opt(QueryStats),\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 Timers = IDL.Record({\n 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'requires_periodic_tasks' : IDL.Opt(IDL.Bool),\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 'timers' : IDL.Opt(Timers),\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 GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });\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 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], []),\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 'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []),\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 'wasm_memory_threshold' : IDL.Opt(IDL.Nat),\n 'controllers' : IDL.Vec(IDL.Principal),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const QueryStats = IDL.Record({\n 'response_payload_bytes_total' : IDL.Opt(IDL.Nat),\n 'num_instructions_total' : IDL.Opt(IDL.Nat),\n 'num_calls_total' : IDL.Opt(IDL.Nat),\n 'request_payload_bytes_total' : IDL.Opt(IDL.Nat),\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'query_stats' : IDL.Opt(QueryStats),\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 Timers = IDL.Record({\n 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'requires_periodic_tasks' : IDL.Opt(IDL.Bool),\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 'timers' : IDL.Opt(Timers),\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 GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });\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 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], ['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 'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []),\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,E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M,KAAK,OAAO,CAC7C,UAAW,EACb,CAAC,EAAE,gBAAgBK,CAAO,EAEpBJ,EAASC,EAAoBF,CAAQ,EAE3C,GAAI,OAAQC,EACV,OAAOC,EAAoBD,EAAO,GAAG,MAAM,EAG7C,IAAMM,EAAYN,EAAO,IAOzB,MANc,IAAIO,EAAsB,CACtC,UAAWD,EAAU,WACrB,kBAAmBV,EAAaU,EAAU,qBAAuB,CAAC,CAAC,EACnE,eAAgBV,EAAaU,EAAU,iBAAmB,CAAC,CAAC,CAC9D,CAAC,CAGH,EAKA,kBAAe,MAAOZ,GACb,KAAK,OAAOA,CAAM,EAAE,cAAc,CAAC,CAAC,EAM7C,2BAAwB,MACtBA,GAC+C,CAC/C,GAAI,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", "QueryStats", "CanisterStatusResultV2", "GetDerivedStateResponse", "GetInitResponse", "GetLifecycleResponse", "Icrc1Account", "Ticket", "Ok_2", "Err_1", "Result_1", "GetOpenTicketResponse", "Params", "GetSaleParametersResponse", "NeuronId", "NeuronAttributes", "Principals", "CfInvestment", "DirectInvestment", "Investor", "SnsNeuronRecipe", "Timers", "CfNeuron", "CfParticipant", "Swap", "DerivedState", "GetStateResponse", "GetTimersResponse", "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", "QueryStats", "CanisterStatusResultV2", "GetDerivedStateResponse", "GetInitResponse", "GetLifecycleResponse", "Icrc1Account", "Ticket", "Ok_2", "Err_1", "Result_1", "GetOpenTicketResponse", "Params", "GetSaleParametersResponse", "NeuronId", "NeuronAttributes", "Principals", "CfInvestment", "DirectInvestment", "Investor", "SnsNeuronRecipe", "Timers", "CfNeuron", "CfParticipant", "Swap", "DerivedState", "GetStateResponse", "GetTimersResponse", "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
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-4INNMFYU.js";import{assertPercentageNumber as es,Canister as ms,createServices as Ns,fromNullable as w,toNullable as H}from"@dfinity/utils";var Gt=({IDL:e})=>{let o=e.Record({last_spawned_timestamp_seconds:e.Opt(e.Nat64),last_reset_timestamp_seconds:e.Opt(e.Nat64),requires_periodic_tasks:e.Opt(e.Bool)}),t=e.Record({archive_wasm_hash:e.Vec(e.Nat8),root_wasm_hash:e.Vec(e.Nat8),swap_wasm_hash:e.Vec(e.Nat8),ledger_wasm_hash:e.Vec(e.Nat8),governance_wasm_hash:e.Vec(e.Nat8),index_wasm_hash:e.Vec(e.Nat8)}),s=e.Record({versions:e.Vec(t)}),i=e.Record({upgrade_steps:e.Opt(s),response_timestamp_seconds:e.Opt(e.Nat64),requested_timestamp_seconds:e.Opt(e.Nat64)}),a=e.Variant({DappCanisterManagement:e.Null,DaoCommunitySettings:e.Null,ApplicationBusinessLogic:e.Null,CriticalDappOperations:e.Null,TreasuryAssetManagement:e.Null,Governance:e.Null,SnsFrameworkManagement:e.Null}),_=e.Record({topic:e.Opt(a),validator_canister_id:e.Opt(e.Principal),target_canister_id:e.Opt(e.Principal),validator_method_name:e.Opt(e.Text),target_method_name:e.Opt(e.Text)}),d=e.Variant({NativeNervousSystemFunction:e.Record({}),GenericNervousSystemFunction:_}),c=e.Record({id:e.Nat64,name:e.Text,description:e.Opt(e.Text),function_type:e.Opt(d)}),K=e.Record({not_dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),garbage_collectable_neurons_count:e.Nat64,neurons_with_invalid_stake_count:e.Nat64,not_dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:e.Nat64,dissolved_neurons_count:e.Nat64,total_staked_e8s:e.Nat64,total_supply_governance_tokens:e.Nat64,not_dissolving_neurons_count:e.Nat64,dissolved_neurons_e8s:e.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:e.Nat64,dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),dissolving_neurons_count:e.Nat64,dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),timestamp_seconds:e.Nat64}),V=e.Record({current_basis_points:e.Opt(e.Int32),updated_at_timestamp_seconds:e.Opt(e.Nat64)}),Y=e.Record({old_target_version:e.Opt(t),new_target_version:e.Opt(t),is_advanced_automatically:e.Opt(e.Bool)}),Z=e.Record({human_readable:e.Opt(e.Text),upgrade_steps:e.Opt(s)}),D=e.Record({status:e.Opt(e.Variant({Success:e.Record({}),Timeout:e.Record({}),ExternalFailure:e.Record({}),InvalidState:e.Record({version:e.Opt(t)})})),human_readable:e.Opt(e.Text)}),p=e.Record({id:e.Nat64}),I=e.Record({current_version:e.Opt(t),expected_version:e.Opt(t),reason:e.Opt(e.Variant({UpgradeSnsToNextVersionProposal:p,BehindTargetVersion:e.Record({})}))}),L=e.Record({upgrade_steps:e.Opt(s)}),ee=e.Record({human_readable:e.Opt(e.Text),old_target_version:e.Opt(t),new_target_version:e.Opt(t)}),te=e.Record({event:e.Opt(e.Variant({TargetVersionSet:Y,UpgradeStepsReset:Z,UpgradeOutcome:D,UpgradeStarted:I,UpgradeStepsRefreshed:L,TargetVersionReset:ee})),timestamp_seconds:e.Opt(e.Nat64)}),T=e.Record({entries:e.Vec(te)}),r=e.Record({id:e.Vec(e.Nat8)}),h=e.Record({followees:e.Vec(r)}),se=e.Record({followees:e.Vec(e.Tuple(e.Nat64,h))}),N=e.Record({permissions:e.Vec(e.Int32)}),oe=e.Record({final_reward_rate_basis_points:e.Opt(e.Nat64),initial_reward_rate_basis_points:e.Opt(e.Nat64),reward_rate_transition_duration_seconds:e.Opt(e.Nat64),round_duration_seconds:e.Opt(e.Nat64)}),g=e.Record({default_followees:e.Opt(se),max_dissolve_delay_seconds:e.Opt(e.Nat64),max_dissolve_delay_bonus_percentage:e.Opt(e.Nat64),max_followees_per_function:e.Opt(e.Nat64),automatically_advance_target_version:e.Opt(e.Bool),neuron_claimer_permissions:e.Opt(N),neuron_minimum_stake_e8s:e.Opt(e.Nat64),max_neuron_age_for_age_bonus:e.Opt(e.Nat64),initial_voting_period_seconds:e.Opt(e.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),reject_cost_e8s:e.Opt(e.Nat64),max_proposals_to_keep_per_action:e.Opt(e.Nat32),wait_for_quiet_deadline_increase_seconds:e.Opt(e.Nat64),max_number_of_neurons:e.Opt(e.Nat64),transaction_fee_e8s:e.Opt(e.Nat64),max_number_of_proposals_with_ballots:e.Opt(e.Nat64),max_age_bonus_percentage:e.Opt(e.Nat64),neuron_grantable_permissions:e.Opt(N),voting_rewards_parameters:e.Opt(oe),maturity_modulation_disabled:e.Opt(e.Bool),max_number_of_principals_per_neuron:e.Opt(e.Nat64)}),P=e.Record({rounds_since_last_distribution:e.Opt(e.Nat64),actual_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Opt(e.Nat64),total_available_e8s_equivalent:e.Opt(e.Nat64),distributed_e8s_equivalent:e.Nat64,round:e.Nat64,settled_proposals:e.Vec(p)}),ne=e.Record({mark_failed_at_seconds:e.Nat64,checking_upgrade_lock:e.Nat64,proposal_id:e.Opt(e.Nat64),target_version:e.Opt(t)}),O=e.Record({error_message:e.Text,error_type:e.Int32}),R=e.Record({subaccount:e.Vec(e.Nat8)}),u=e.Record({owner:e.Opt(e.Principal),subaccount:e.Opt(R)}),b=e.Record({human_readable:e.Opt(e.Text)}),ae=e.Record({e8s:e.Opt(e.Nat64)}),re=e.Record({xdrs_per_icp:e.Opt(b),icps_per_token:e.Opt(b),tokens:e.Opt(ae)}),ie=e.Record({token:e.Opt(e.Int32),account:e.Opt(u),valuation_factors:e.Opt(re),timestamp_seconds:e.Opt(e.Nat64)}),M=e.Record({valuation:e.Opt(ie)}),x=e.Record({archive_wasm_hash:e.Opt(e.Vec(e.Nat8)),root_wasm_hash:e.Opt(e.Vec(e.Nat8)),swap_wasm_hash:e.Opt(e.Vec(e.Nat8)),ledger_wasm_hash:e.Opt(e.Vec(e.Nat8)),governance_wasm_hash:e.Opt(e.Vec(e.Nat8)),index_wasm_hash:e.Opt(e.Vec(e.Nat8))}),ce=e.Record({target_version:e.Opt(x)}),_e=e.Variant({TransferSnsTreasuryFunds:M,MintSnsTokens:M,AdvanceSnsTargetVersion:ce}),pe=e.Record({vote:e.Int32,cast_timestamp_seconds:e.Nat64,voting_power:e.Nat64}),F=e.Record({basis_points:e.Opt(e.Nat64)}),de=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),ue=e.Record({freezing_threshold:e.Opt(e.Nat64),wasm_memory_threshold:e.Opt(e.Nat64),canister_ids:e.Vec(e.Principal),reserved_cycles_limit:e.Opt(e.Nat64),log_visibility:e.Opt(e.Int32),wasm_memory_limit:e.Opt(e.Nat64),memory_allocation:e.Opt(e.Nat64),compute_allocation:e.Opt(e.Nat64)}),le=e.Record({custom_function_id_to_topic:e.Vec(e.Tuple(e.Nat64,a))}),me=e.Record({canister_ids:e.Vec(e.Principal)}),Ne=e.Record({from_treasury:e.Int32,to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(R),memo:e.Opt(e.Nat64),amount_e8s:e.Nat64}),Oe=e.Record({wasm_module_hash:e.Vec(e.Nat8),chunk_hashes_list:e.Vec(e.Vec(e.Nat8)),store_canister_id:e.Opt(e.Principal)}),ge=e.Record({new_canister_wasm:e.Vec(e.Nat8),mode:e.Opt(e.Int32),canister_id:e.Opt(e.Principal),chunked_canister_wasm:e.Opt(Oe),canister_upgrade_arg:e.Opt(e.Vec(e.Nat8))}),Re=e.Record({canister_ids:e.Vec(e.Principal),new_controllers:e.Vec(e.Principal)}),ve=e.Record({to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(R),memo:e.Opt(e.Nat64),amount_e8s:e.Opt(e.Nat64)}),ye=e.Record({new_target:e.Opt(x)}),C=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),Se=e.Record({function_id:e.Nat64,payload:e.Vec(e.Nat8)}),fe=e.Record({token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat64),token_logo:e.Opt(e.Text),token_name:e.Opt(e.Text)}),we=e.Record({motion_text:e.Text}),Ve=e.Variant({ManageNervousSystemParameters:g,AddGenericNervousSystemFunction:c,ManageDappCanisterSettings:ue,RemoveGenericNervousSystemFunction:e.Nat64,SetTopicsForCustomProposals:le,UpgradeSnsToNextVersion:e.Record({}),RegisterDappCanisters:me,TransferSnsTreasuryFunds:Ne,UpgradeSnsControlledCanister:ge,DeregisterDappCanisters:Re,MintSnsTokens:ve,AdvanceSnsTargetVersion:ye,Unspecified:e.Record({}),ManageSnsMetadata:C,ExecuteGenericNervousSystemFunction:Se,ManageLedgerParameters:fe,Motion:we}),v=e.Record({url:e.Text,title:e.Text,action:e.Opt(Ve),summary:e.Text}),Te=e.Record({current_deadline_timestamp_seconds:e.Nat64}),y=e.Record({id:e.Opt(p),payload_text_rendering:e.Opt(e.Text),topic:e.Opt(a),action:e.Nat64,failure_reason:e.Opt(O),action_auxiliary:e.Opt(_e),ballots:e.Vec(e.Tuple(e.Text,pe)),minimum_yes_proportion_of_total:e.Opt(F),reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,reward_event_end_timestamp_seconds:e.Opt(e.Nat64),proposal_creation_timestamp_seconds:e.Nat64,initial_voting_period_seconds:e.Nat64,reject_cost_e8s:e.Nat64,latest_tally:e.Opt(de),wait_for_quiet_deadline_increase_seconds:e.Nat64,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(v),proposer:e.Opt(r),wait_for_quiet_state:e.Opt(Te),minimum_yes_proportion_of_exercised:e.Opt(F),is_eligible_for_rewards:e.Bool,executed_timestamp_seconds:e.Nat64}),k=e.Record({memo:e.Nat64,amount_e8s:e.Nat64}),A=e.Record({function_id:e.Nat64,followees:e.Vec(r)}),q=e.Record({to_account:e.Opt(u),percentage_to_disburse:e.Nat32}),he=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),Pe=e.Record({additional_dissolve_delay_seconds:e.Nat32}),be=e.Record({dissolve_timestamp_seconds:e.Nat64}),Me=e.Variant({ChangeAutoStakeMaturity:he,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:Pe,SetDissolveTimestamp:be}),G=e.Record({operation:e.Opt(Me)}),U=e.Record({vote:e.Int32,proposal:e.Opt(p)}),xe=e.Record({alias:e.Opt(e.Text),neuron_id:e.Opt(r)}),B=e.Record({topic:e.Opt(a),followees:e.Vec(xe)}),E=e.Record({topic_following:e.Vec(B)}),Fe=e.Record({amount_to_be_disbursed_e8s:e.Nat64,to_account:e.Opt(u)}),Ce=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),ke=e.Variant({MemoAndController:Ce,NeuronId:e.Record({})}),z=e.Record({by:e.Opt(ke)}),j=e.Record({permissions_to_remove:e.Opt(N),principal_id:e.Opt(e.Principal)}),W=e.Record({permissions_to_add:e.Opt(N),principal_id:e.Opt(e.Principal)}),J=e.Record({percentage_to_merge:e.Nat32}),Ae=e.Record({e8s:e.Nat64}),Q=e.Record({to_account:e.Opt(u),amount:e.Opt(Ae)}),qe=e.Variant({Split:k,Follow:A,DisburseMaturity:q,Configure:G,RegisterVote:U,SetFollowing:E,SyncCommand:e.Record({}),MakeProposal:v,FinalizeDisburseMaturity:Fe,ClaimOrRefreshNeuron:z,RemoveNeuronPermissions:j,AddNeuronPermissions:W,MergeMaturity:J,Disburse:Q}),Ge=e.Record({command:e.Opt(qe),timestamp:e.Nat64}),Ue=e.Record({principal:e.Opt(e.Principal),permission_type:e.Vec(e.Int32)}),Be=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),Ee=e.Record({timestamp_of_disbursement_seconds:e.Nat64,amount_e8s:e.Nat64,account_to_disburse_to:e.Opt(u),finalize_disbursement_timestamp_seconds:e.Opt(e.Nat64)}),S=e.Record({id:e.Opt(r),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),permissions:e.Vec(Ue),maturity_e8s_equivalent:e.Nat64,cached_neuron_stake_e8s:e.Nat64,created_timestamp_seconds:e.Nat64,topic_followees:e.Opt(e.Record({topic_id_to_followees:e.Vec(e.Tuple(e.Int32,B))})),source_nns_neuron_id:e.Opt(e.Nat64),auto_stake_maturity:e.Opt(e.Bool),aging_since_timestamp_seconds:e.Nat64,dissolve_state:e.Opt(Be),voting_power_percentage_multiplier:e.Nat64,vesting_period_seconds:e.Opt(e.Nat64),disburse_maturity_in_progress:e.Vec(Ee),followees:e.Vec(e.Tuple(e.Nat64,h)),neuron_fees_e8s:e.Nat64}),ss=e.Record({root_canister_id:e.Opt(e.Principal),timers:e.Opt(o),cached_upgrade_steps:e.Opt(i),id_to_nervous_system_functions:e.Vec(e.Tuple(e.Nat64,c)),metrics:e.Opt(K),maturity_modulation:e.Opt(V),upgrade_journal:e.Opt(T),mode:e.Int32,parameters:e.Opt(g),is_finalizing_disburse_maturity:e.Opt(e.Bool),deployed_version:e.Opt(t),sns_initialization_parameters:e.Text,latest_reward_event:e.Opt(P),pending_version:e.Opt(ne),swap_canister_id:e.Opt(e.Principal),ledger_canister_id:e.Opt(e.Principal),proposals:e.Vec(e.Tuple(e.Nat64,y)),in_flight_commands:e.Vec(e.Tuple(e.Text,Ge)),sns_metadata:e.Opt(C),neurons:e.Vec(e.Tuple(e.Text,S)),target_version:e.Opt(t),genesis_timestamp_seconds:e.Nat64}),ze=e.Record({principals:e.Vec(e.Principal)}),je=e.Record({nns_neuron_hotkeys:e.Opt(ze),nns_neuron_controller:e.Opt(e.Principal),nns_neuron_id:e.Opt(e.Nat64)}),We=e.Variant({NeuronsFund:je,Direct:e.Record({})}),Je=e.Record({neuron_ids:e.Vec(r)}),Qe=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Opt(e.Nat64),participant:e.Opt(We),stake_e8s:e.Opt(e.Nat64),followees:e.Opt(Je),neuron_id:e.Opt(r)}),$e=e.Record({neuron_recipes:e.Vec(Qe)}),Xe=e.Record({neuron_recipes:e.Opt($e)}),He=e.Record({id:e.Opt(r),status:e.Int32}),Ke=e.Record({swap_neurons:e.Vec(He)}),Ye=e.Variant({Ok:Ke,Err:e.Int32}),Ze=e.Record({claim_swap_neurons_result:e.Opt(Ye)}),De=e.Record({maturity_modulation:e.Opt(V)}),Ie=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),Le=e.Record({mode:e.Opt(e.Int32)}),et=e.Record({neuron_id:e.Opt(r)}),tt=e.Variant({Error:O,Neuron:S}),st=e.Record({result:e.Opt(tt)}),$=e.Record({proposal_id:e.Opt(p)}),ot=e.Variant({Error:O,Proposal:y}),nt=e.Record({result:e.Opt(ot)}),at=e.Variant({stopped:e.Null,stopping:e.Null,running:e.Null}),rt=e.Record({freezing_threshold:e.Nat,wasm_memory_threshold:e.Opt(e.Nat),controllers:e.Vec(e.Principal),wasm_memory_limit:e.Opt(e.Nat),memory_allocation:e.Nat,compute_allocation:e.Nat}),it=e.Record({response_payload_bytes_total:e.Opt(e.Nat),num_instructions_total:e.Opt(e.Nat),num_calls_total:e.Opt(e.Nat),request_payload_bytes_total:e.Opt(e.Nat)}),ct=e.Record({status:at,memory_size:e.Nat,cycles:e.Nat,settings:rt,query_stats:e.Opt(it),idle_cycles_burned_per_day:e.Nat,module_hash:e.Opt(e.Vec(e.Nat8))}),_t=e.Record({deployed_version:e.Opt(t),pending_version:e.Opt(e.Record({mark_failed_at_seconds:e.Nat64,checking_upgrade_lock:e.Nat64,proposal_id:e.Nat64,target_version:e.Opt(t)}))}),pt=e.Record({sns_initialization_parameters:e.Text}),dt=e.Record({timers:e.Opt(o)}),ut=e.Record({offset:e.Opt(e.Nat64),limit:e.Opt(e.Nat64)}),lt=e.Record({upgrade_journal:e.Opt(T),upgrade_steps:e.Opt(s),response_timestamp_seconds:e.Opt(e.Nat64),deployed_version:e.Opt(t),target_version:e.Opt(t),upgrade_journal_entry_count:e.Opt(e.Nat64)}),mt=e.Record({reserved_ids:e.Vec(e.Nat64),functions:e.Vec(c)}),Nt=e.Record({of_principal:e.Opt(e.Principal),limit:e.Nat32,start_page_at:e.Opt(r)}),Ot=e.Record({neurons:e.Vec(S)}),gt=e.Record({topic:e.Opt(a)}),Rt=e.Record({include_reward_status:e.Vec(e.Int32),before_proposal:e.Opt(p),limit:e.Nat32,exclude_type:e.Vec(e.Nat64),include_topics:e.Opt(e.Vec(gt)),include_status:e.Vec(e.Int32)}),vt=e.Record({include_ballots_by_caller:e.Opt(e.Bool),proposals:e.Vec(y),include_topic_filtering:e.Opt(e.Bool)}),yt=e.Record({}),St=e.Record({native_functions:e.Opt(e.Vec(c)),topic:e.Opt(a),is_critical:e.Opt(e.Bool),name:e.Opt(e.Text),description:e.Opt(e.Text),custom_functions:e.Opt(e.Vec(c))}),ft=e.Record({uncategorized_functions:e.Opt(e.Vec(c)),topics:e.Opt(e.Vec(St))}),wt=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),Vt=e.Variant({Split:k,Follow:A,DisburseMaturity:q,ClaimOrRefresh:z,Configure:G,RegisterVote:U,SetFollowing:E,MakeProposal:v,StakeMaturity:wt,RemoveNeuronPermissions:j,AddNeuronPermissions:W,MergeMaturity:J,Disburse:Q}),Tt=e.Record({subaccount:e.Vec(e.Nat8),command:e.Opt(Vt)}),ht=e.Record({created_neuron_id:e.Opt(r)}),Pt=e.Record({amount_disbursed_e8s:e.Nat64,amount_deducted_e8s:e.Opt(e.Nat64)}),bt=e.Record({refreshed_neuron_id:e.Opt(r)}),Mt=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),xt=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),Ft=e.Record({transfer_block_height:e.Nat64}),Ct=e.Variant({Error:O,Split:ht,Follow:e.Record({}),DisburseMaturity:Pt,ClaimOrRefresh:bt,Configure:e.Record({}),RegisterVote:e.Record({}),SetFollowing:e.Record({}),MakeProposal:$,RemoveNeuronPermission:e.Record({}),StakeMaturity:Mt,MergeMaturity:xt,Disburse:Ft,AddNeuronPermission:e.Record({})}),kt=e.Record({command:e.Opt(Ct)}),At=e.Record({mode:e.Int32});return e.Service({claim_swap_neurons:e.Func([Xe],[Ze],[]),fail_stuck_upgrade_in_progress:e.Func([e.Record({})],[e.Record({})],[]),get_build_metadata:e.Func([],[e.Text],[]),get_latest_reward_event:e.Func([],[P],[]),get_maturity_modulation:e.Func([e.Record({})],[De],[]),get_metadata:e.Func([e.Record({})],[Ie],[]),get_mode:e.Func([e.Record({})],[Le],[]),get_nervous_system_parameters:e.Func([e.Null],[g],[]),get_neuron:e.Func([et],[st],[]),get_proposal:e.Func([$],[nt],[]),get_root_canister_status:e.Func([e.Null],[ct],[]),get_running_sns_version:e.Func([e.Record({})],[_t],[]),get_sns_initialization_parameters:e.Func([e.Record({})],[pt],[]),get_timers:e.Func([e.Record({})],[dt],[]),get_upgrade_journal:e.Func([ut],[lt],[]),list_nervous_system_functions:e.Func([],[mt],[]),list_neurons:e.Func([Nt],[Ot],[]),list_proposals:e.Func([Rt],[vt],[]),list_topics:e.Func([yt],[ft],[]),manage_neuron:e.Func([Tt],[kt],[]),reset_timers:e.Func([e.Record({})],[e.Record({})],[]),set_mode:e.Func([At],[e.Record({})],[])})};var Ut=({IDL:e})=>{let o=e.Record({last_spawned_timestamp_seconds:e.Opt(e.Nat64),last_reset_timestamp_seconds:e.Opt(e.Nat64),requires_periodic_tasks:e.Opt(e.Bool)}),t=e.Record({archive_wasm_hash:e.Vec(e.Nat8),root_wasm_hash:e.Vec(e.Nat8),swap_wasm_hash:e.Vec(e.Nat8),ledger_wasm_hash:e.Vec(e.Nat8),governance_wasm_hash:e.Vec(e.Nat8),index_wasm_hash:e.Vec(e.Nat8)}),s=e.Record({versions:e.Vec(t)}),i=e.Record({upgrade_steps:e.Opt(s),response_timestamp_seconds:e.Opt(e.Nat64),requested_timestamp_seconds:e.Opt(e.Nat64)}),a=e.Variant({DappCanisterManagement:e.Null,DaoCommunitySettings:e.Null,ApplicationBusinessLogic:e.Null,CriticalDappOperations:e.Null,TreasuryAssetManagement:e.Null,Governance:e.Null,SnsFrameworkManagement:e.Null}),_=e.Record({topic:e.Opt(a),validator_canister_id:e.Opt(e.Principal),target_canister_id:e.Opt(e.Principal),validator_method_name:e.Opt(e.Text),target_method_name:e.Opt(e.Text)}),d=e.Variant({NativeNervousSystemFunction:e.Record({}),GenericNervousSystemFunction:_}),c=e.Record({id:e.Nat64,name:e.Text,description:e.Opt(e.Text),function_type:e.Opt(d)}),K=e.Record({not_dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),garbage_collectable_neurons_count:e.Nat64,neurons_with_invalid_stake_count:e.Nat64,not_dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:e.Nat64,dissolved_neurons_count:e.Nat64,total_staked_e8s:e.Nat64,total_supply_governance_tokens:e.Nat64,not_dissolving_neurons_count:e.Nat64,dissolved_neurons_e8s:e.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:e.Nat64,dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),dissolving_neurons_count:e.Nat64,dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),timestamp_seconds:e.Nat64}),V=e.Record({current_basis_points:e.Opt(e.Int32),updated_at_timestamp_seconds:e.Opt(e.Nat64)}),Y=e.Record({old_target_version:e.Opt(t),new_target_version:e.Opt(t),is_advanced_automatically:e.Opt(e.Bool)}),Z=e.Record({human_readable:e.Opt(e.Text),upgrade_steps:e.Opt(s)}),D=e.Record({status:e.Opt(e.Variant({Success:e.Record({}),Timeout:e.Record({}),ExternalFailure:e.Record({}),InvalidState:e.Record({version:e.Opt(t)})})),human_readable:e.Opt(e.Text)}),p=e.Record({id:e.Nat64}),I=e.Record({current_version:e.Opt(t),expected_version:e.Opt(t),reason:e.Opt(e.Variant({UpgradeSnsToNextVersionProposal:p,BehindTargetVersion:e.Record({})}))}),L=e.Record({upgrade_steps:e.Opt(s)}),ee=e.Record({human_readable:e.Opt(e.Text),old_target_version:e.Opt(t),new_target_version:e.Opt(t)}),te=e.Record({event:e.Opt(e.Variant({TargetVersionSet:Y,UpgradeStepsReset:Z,UpgradeOutcome:D,UpgradeStarted:I,UpgradeStepsRefreshed:L,TargetVersionReset:ee})),timestamp_seconds:e.Opt(e.Nat64)}),T=e.Record({entries:e.Vec(te)}),r=e.Record({id:e.Vec(e.Nat8)}),h=e.Record({followees:e.Vec(r)}),se=e.Record({followees:e.Vec(e.Tuple(e.Nat64,h))}),N=e.Record({permissions:e.Vec(e.Int32)}),oe=e.Record({final_reward_rate_basis_points:e.Opt(e.Nat64),initial_reward_rate_basis_points:e.Opt(e.Nat64),reward_rate_transition_duration_seconds:e.Opt(e.Nat64),round_duration_seconds:e.Opt(e.Nat64)}),g=e.Record({default_followees:e.Opt(se),max_dissolve_delay_seconds:e.Opt(e.Nat64),max_dissolve_delay_bonus_percentage:e.Opt(e.Nat64),max_followees_per_function:e.Opt(e.Nat64),automatically_advance_target_version:e.Opt(e.Bool),neuron_claimer_permissions:e.Opt(N),neuron_minimum_stake_e8s:e.Opt(e.Nat64),max_neuron_age_for_age_bonus:e.Opt(e.Nat64),initial_voting_period_seconds:e.Opt(e.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),reject_cost_e8s:e.Opt(e.Nat64),max_proposals_to_keep_per_action:e.Opt(e.Nat32),wait_for_quiet_deadline_increase_seconds:e.Opt(e.Nat64),max_number_of_neurons:e.Opt(e.Nat64),transaction_fee_e8s:e.Opt(e.Nat64),max_number_of_proposals_with_ballots:e.Opt(e.Nat64),max_age_bonus_percentage:e.Opt(e.Nat64),neuron_grantable_permissions:e.Opt(N),voting_rewards_parameters:e.Opt(oe),maturity_modulation_disabled:e.Opt(e.Bool),max_number_of_principals_per_neuron:e.Opt(e.Nat64)}),P=e.Record({rounds_since_last_distribution:e.Opt(e.Nat64),actual_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Opt(e.Nat64),total_available_e8s_equivalent:e.Opt(e.Nat64),distributed_e8s_equivalent:e.Nat64,round:e.Nat64,settled_proposals:e.Vec(p)}),ne=e.Record({mark_failed_at_seconds:e.Nat64,checking_upgrade_lock:e.Nat64,proposal_id:e.Opt(e.Nat64),target_version:e.Opt(t)}),O=e.Record({error_message:e.Text,error_type:e.Int32}),R=e.Record({subaccount:e.Vec(e.Nat8)}),u=e.Record({owner:e.Opt(e.Principal),subaccount:e.Opt(R)}),b=e.Record({human_readable:e.Opt(e.Text)}),ae=e.Record({e8s:e.Opt(e.Nat64)}),re=e.Record({xdrs_per_icp:e.Opt(b),icps_per_token:e.Opt(b),tokens:e.Opt(ae)}),ie=e.Record({token:e.Opt(e.Int32),account:e.Opt(u),valuation_factors:e.Opt(re),timestamp_seconds:e.Opt(e.Nat64)}),M=e.Record({valuation:e.Opt(ie)}),x=e.Record({archive_wasm_hash:e.Opt(e.Vec(e.Nat8)),root_wasm_hash:e.Opt(e.Vec(e.Nat8)),swap_wasm_hash:e.Opt(e.Vec(e.Nat8)),ledger_wasm_hash:e.Opt(e.Vec(e.Nat8)),governance_wasm_hash:e.Opt(e.Vec(e.Nat8)),index_wasm_hash:e.Opt(e.Vec(e.Nat8))}),ce=e.Record({target_version:e.Opt(x)}),_e=e.Variant({TransferSnsTreasuryFunds:M,MintSnsTokens:M,AdvanceSnsTargetVersion:ce}),pe=e.Record({vote:e.Int32,cast_timestamp_seconds:e.Nat64,voting_power:e.Nat64}),F=e.Record({basis_points:e.Opt(e.Nat64)}),de=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),ue=e.Record({freezing_threshold:e.Opt(e.Nat64),wasm_memory_threshold:e.Opt(e.Nat64),canister_ids:e.Vec(e.Principal),reserved_cycles_limit:e.Opt(e.Nat64),log_visibility:e.Opt(e.Int32),wasm_memory_limit:e.Opt(e.Nat64),memory_allocation:e.Opt(e.Nat64),compute_allocation:e.Opt(e.Nat64)}),le=e.Record({custom_function_id_to_topic:e.Vec(e.Tuple(e.Nat64,a))}),me=e.Record({canister_ids:e.Vec(e.Principal)}),Ne=e.Record({from_treasury:e.Int32,to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(R),memo:e.Opt(e.Nat64),amount_e8s:e.Nat64}),Oe=e.Record({wasm_module_hash:e.Vec(e.Nat8),chunk_hashes_list:e.Vec(e.Vec(e.Nat8)),store_canister_id:e.Opt(e.Principal)}),ge=e.Record({new_canister_wasm:e.Vec(e.Nat8),mode:e.Opt(e.Int32),canister_id:e.Opt(e.Principal),chunked_canister_wasm:e.Opt(Oe),canister_upgrade_arg:e.Opt(e.Vec(e.Nat8))}),Re=e.Record({canister_ids:e.Vec(e.Principal),new_controllers:e.Vec(e.Principal)}),ve=e.Record({to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(R),memo:e.Opt(e.Nat64),amount_e8s:e.Opt(e.Nat64)}),ye=e.Record({new_target:e.Opt(x)}),C=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),Se=e.Record({function_id:e.Nat64,payload:e.Vec(e.Nat8)}),fe=e.Record({token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat64),token_logo:e.Opt(e.Text),token_name:e.Opt(e.Text)}),we=e.Record({motion_text:e.Text}),Ve=e.Variant({ManageNervousSystemParameters:g,AddGenericNervousSystemFunction:c,ManageDappCanisterSettings:ue,RemoveGenericNervousSystemFunction:e.Nat64,SetTopicsForCustomProposals:le,UpgradeSnsToNextVersion:e.Record({}),RegisterDappCanisters:me,TransferSnsTreasuryFunds:Ne,UpgradeSnsControlledCanister:ge,DeregisterDappCanisters:Re,MintSnsTokens:ve,AdvanceSnsTargetVersion:ye,Unspecified:e.Record({}),ManageSnsMetadata:C,ExecuteGenericNervousSystemFunction:Se,ManageLedgerParameters:fe,Motion:we}),v=e.Record({url:e.Text,title:e.Text,action:e.Opt(Ve),summary:e.Text}),Te=e.Record({current_deadline_timestamp_seconds:e.Nat64}),y=e.Record({id:e.Opt(p),payload_text_rendering:e.Opt(e.Text),topic:e.Opt(a),action:e.Nat64,failure_reason:e.Opt(O),action_auxiliary:e.Opt(_e),ballots:e.Vec(e.Tuple(e.Text,pe)),minimum_yes_proportion_of_total:e.Opt(F),reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,reward_event_end_timestamp_seconds:e.Opt(e.Nat64),proposal_creation_timestamp_seconds:e.Nat64,initial_voting_period_seconds:e.Nat64,reject_cost_e8s:e.Nat64,latest_tally:e.Opt(de),wait_for_quiet_deadline_increase_seconds:e.Nat64,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(v),proposer:e.Opt(r),wait_for_quiet_state:e.Opt(Te),minimum_yes_proportion_of_exercised:e.Opt(F),is_eligible_for_rewards:e.Bool,executed_timestamp_seconds:e.Nat64}),k=e.Record({memo:e.Nat64,amount_e8s:e.Nat64}),A=e.Record({function_id:e.Nat64,followees:e.Vec(r)}),q=e.Record({to_account:e.Opt(u),percentage_to_disburse:e.Nat32}),he=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),Pe=e.Record({additional_dissolve_delay_seconds:e.Nat32}),be=e.Record({dissolve_timestamp_seconds:e.Nat64}),Me=e.Variant({ChangeAutoStakeMaturity:he,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:Pe,SetDissolveTimestamp:be}),G=e.Record({operation:e.Opt(Me)}),U=e.Record({vote:e.Int32,proposal:e.Opt(p)}),xe=e.Record({alias:e.Opt(e.Text),neuron_id:e.Opt(r)}),B=e.Record({topic:e.Opt(a),followees:e.Vec(xe)}),E=e.Record({topic_following:e.Vec(B)}),Fe=e.Record({amount_to_be_disbursed_e8s:e.Nat64,to_account:e.Opt(u)}),Ce=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),ke=e.Variant({MemoAndController:Ce,NeuronId:e.Record({})}),z=e.Record({by:e.Opt(ke)}),j=e.Record({permissions_to_remove:e.Opt(N),principal_id:e.Opt(e.Principal)}),W=e.Record({permissions_to_add:e.Opt(N),principal_id:e.Opt(e.Principal)}),J=e.Record({percentage_to_merge:e.Nat32}),Ae=e.Record({e8s:e.Nat64}),Q=e.Record({to_account:e.Opt(u),amount:e.Opt(Ae)}),qe=e.Variant({Split:k,Follow:A,DisburseMaturity:q,Configure:G,RegisterVote:U,SetFollowing:E,SyncCommand:e.Record({}),MakeProposal:v,FinalizeDisburseMaturity:Fe,ClaimOrRefreshNeuron:z,RemoveNeuronPermissions:j,AddNeuronPermissions:W,MergeMaturity:J,Disburse:Q}),Ge=e.Record({command:e.Opt(qe),timestamp:e.Nat64}),Ue=e.Record({principal:e.Opt(e.Principal),permission_type:e.Vec(e.Int32)}),Be=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),Ee=e.Record({timestamp_of_disbursement_seconds:e.Nat64,amount_e8s:e.Nat64,account_to_disburse_to:e.Opt(u),finalize_disbursement_timestamp_seconds:e.Opt(e.Nat64)}),S=e.Record({id:e.Opt(r),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),permissions:e.Vec(Ue),maturity_e8s_equivalent:e.Nat64,cached_neuron_stake_e8s:e.Nat64,created_timestamp_seconds:e.Nat64,topic_followees:e.Opt(e.Record({topic_id_to_followees:e.Vec(e.Tuple(e.Int32,B))})),source_nns_neuron_id:e.Opt(e.Nat64),auto_stake_maturity:e.Opt(e.Bool),aging_since_timestamp_seconds:e.Nat64,dissolve_state:e.Opt(Be),voting_power_percentage_multiplier:e.Nat64,vesting_period_seconds:e.Opt(e.Nat64),disburse_maturity_in_progress:e.Vec(Ee),followees:e.Vec(e.Tuple(e.Nat64,h)),neuron_fees_e8s:e.Nat64}),ss=e.Record({root_canister_id:e.Opt(e.Principal),timers:e.Opt(o),cached_upgrade_steps:e.Opt(i),id_to_nervous_system_functions:e.Vec(e.Tuple(e.Nat64,c)),metrics:e.Opt(K),maturity_modulation:e.Opt(V),upgrade_journal:e.Opt(T),mode:e.Int32,parameters:e.Opt(g),is_finalizing_disburse_maturity:e.Opt(e.Bool),deployed_version:e.Opt(t),sns_initialization_parameters:e.Text,latest_reward_event:e.Opt(P),pending_version:e.Opt(ne),swap_canister_id:e.Opt(e.Principal),ledger_canister_id:e.Opt(e.Principal),proposals:e.Vec(e.Tuple(e.Nat64,y)),in_flight_commands:e.Vec(e.Tuple(e.Text,Ge)),sns_metadata:e.Opt(C),neurons:e.Vec(e.Tuple(e.Text,S)),target_version:e.Opt(t),genesis_timestamp_seconds:e.Nat64}),ze=e.Record({principals:e.Vec(e.Principal)}),je=e.Record({nns_neuron_hotkeys:e.Opt(ze),nns_neuron_controller:e.Opt(e.Principal),nns_neuron_id:e.Opt(e.Nat64)}),We=e.Variant({NeuronsFund:je,Direct:e.Record({})}),Je=e.Record({neuron_ids:e.Vec(r)}),Qe=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Opt(e.Nat64),participant:e.Opt(We),stake_e8s:e.Opt(e.Nat64),followees:e.Opt(Je),neuron_id:e.Opt(r)}),$e=e.Record({neuron_recipes:e.Vec(Qe)}),Xe=e.Record({neuron_recipes:e.Opt($e)}),He=e.Record({id:e.Opt(r),status:e.Int32}),Ke=e.Record({swap_neurons:e.Vec(He)}),Ye=e.Variant({Ok:Ke,Err:e.Int32}),Ze=e.Record({claim_swap_neurons_result:e.Opt(Ye)}),De=e.Record({maturity_modulation:e.Opt(V)}),Ie=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),Le=e.Record({mode:e.Opt(e.Int32)}),et=e.Record({neuron_id:e.Opt(r)}),tt=e.Variant({Error:O,Neuron:S}),st=e.Record({result:e.Opt(tt)}),$=e.Record({proposal_id:e.Opt(p)}),ot=e.Variant({Error:O,Proposal:y}),nt=e.Record({result:e.Opt(ot)}),at=e.Variant({stopped:e.Null,stopping:e.Null,running:e.Null}),rt=e.Record({freezing_threshold:e.Nat,wasm_memory_threshold:e.Opt(e.Nat),controllers:e.Vec(e.Principal),wasm_memory_limit:e.Opt(e.Nat),memory_allocation:e.Nat,compute_allocation:e.Nat}),it=e.Record({response_payload_bytes_total:e.Opt(e.Nat),num_instructions_total:e.Opt(e.Nat),num_calls_total:e.Opt(e.Nat),request_payload_bytes_total:e.Opt(e.Nat)}),ct=e.Record({status:at,memory_size:e.Nat,cycles:e.Nat,settings:rt,query_stats:e.Opt(it),idle_cycles_burned_per_day:e.Nat,module_hash:e.Opt(e.Vec(e.Nat8))}),_t=e.Record({deployed_version:e.Opt(t),pending_version:e.Opt(e.Record({mark_failed_at_seconds:e.Nat64,checking_upgrade_lock:e.Nat64,proposal_id:e.Nat64,target_version:e.Opt(t)}))}),pt=e.Record({sns_initialization_parameters:e.Text}),dt=e.Record({timers:e.Opt(o)}),ut=e.Record({offset:e.Opt(e.Nat64),limit:e.Opt(e.Nat64)}),lt=e.Record({upgrade_journal:e.Opt(T),upgrade_steps:e.Opt(s),response_timestamp_seconds:e.Opt(e.Nat64),deployed_version:e.Opt(t),target_version:e.Opt(t),upgrade_journal_entry_count:e.Opt(e.Nat64)}),mt=e.Record({reserved_ids:e.Vec(e.Nat64),functions:e.Vec(c)}),Nt=e.Record({of_principal:e.Opt(e.Principal),limit:e.Nat32,start_page_at:e.Opt(r)}),Ot=e.Record({neurons:e.Vec(S)}),gt=e.Record({topic:e.Opt(a)}),Rt=e.Record({include_reward_status:e.Vec(e.Int32),before_proposal:e.Opt(p),limit:e.Nat32,exclude_type:e.Vec(e.Nat64),include_topics:e.Opt(e.Vec(gt)),include_status:e.Vec(e.Int32)}),vt=e.Record({include_ballots_by_caller:e.Opt(e.Bool),proposals:e.Vec(y),include_topic_filtering:e.Opt(e.Bool)}),yt=e.Record({}),St=e.Record({native_functions:e.Opt(e.Vec(c)),topic:e.Opt(a),is_critical:e.Opt(e.Bool),name:e.Opt(e.Text),description:e.Opt(e.Text),custom_functions:e.Opt(e.Vec(c))}),ft=e.Record({uncategorized_functions:e.Opt(e.Vec(c)),topics:e.Opt(e.Vec(St))}),wt=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),Vt=e.Variant({Split:k,Follow:A,DisburseMaturity:q,ClaimOrRefresh:z,Configure:G,RegisterVote:U,SetFollowing:E,MakeProposal:v,StakeMaturity:wt,RemoveNeuronPermissions:j,AddNeuronPermissions:W,MergeMaturity:J,Disburse:Q}),Tt=e.Record({subaccount:e.Vec(e.Nat8),command:e.Opt(Vt)}),ht=e.Record({created_neuron_id:e.Opt(r)}),Pt=e.Record({amount_disbursed_e8s:e.Nat64,amount_deducted_e8s:e.Opt(e.Nat64)}),bt=e.Record({refreshed_neuron_id:e.Opt(r)}),Mt=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),xt=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),Ft=e.Record({transfer_block_height:e.Nat64}),Ct=e.Variant({Error:O,Split:ht,Follow:e.Record({}),DisburseMaturity:Pt,ClaimOrRefresh:bt,Configure:e.Record({}),RegisterVote:e.Record({}),SetFollowing:e.Record({}),MakeProposal:$,RemoveNeuronPermission:e.Record({}),StakeMaturity:Mt,MergeMaturity:xt,Disburse:Ft,AddNeuronPermission:e.Record({})}),kt=e.Record({command:e.Opt(Ct)}),At=e.Record({mode:e.Int32});return e.Service({claim_swap_neurons:e.Func([Xe],[Ze],[]),fail_stuck_upgrade_in_progress:e.Func([e.Record({})],[e.Record({})],[]),get_build_metadata:e.Func([],[e.Text],["query"]),get_latest_reward_event:e.Func([],[P],["query"]),get_maturity_modulation:e.Func([e.Record({})],[De],[]),get_metadata:e.Func([e.Record({})],[Ie],["query"]),get_mode:e.Func([e.Record({})],[Le],["query"]),get_nervous_system_parameters:e.Func([e.Null],[g],["query"]),get_neuron:e.Func([et],[st],["query"]),get_proposal:e.Func([$],[nt],["query"]),get_root_canister_status:e.Func([e.Null],[ct],[]),get_running_sns_version:e.Func([e.Record({})],[_t],["query"]),get_sns_initialization_parameters:e.Func([e.Record({})],[pt],["query"]),get_timers:e.Func([e.Record({})],[dt],["query"]),get_upgrade_journal:e.Func([ut],[lt],["query"]),list_nervous_system_functions:e.Func([],[mt],["query"]),list_neurons:e.Func([Nt],[Ot],["query"]),list_proposals:e.Func([Rt],[vt],["query"]),list_topics:e.Func([yt],[ft],["query"]),manage_neuron:e.Func([Tt],[kt],[]),reset_timers:e.Func([e.Record({})],[e.Record({})],[]),set_mode:e.Func([At],[e.Record({})],[])})};import{fromNullable as n,toNullable as l}from"@dfinity/utils";var f=({neuronId:{id:e},command:o})=>({subaccount:e,command:[o]}),X=({neuronId:e,operation:o})=>f({neuronId:e,command:{Configure:{operation:[o]}}}),Bt=({owner:e,subaccount:o})=>({owner:l(e),subaccount:o===void 0?[]:l({subaccount:o})}),Et=({neuronId:e,permissions:o,principal:t})=>f({neuronId:e,command:{AddNeuronPermissions:{permissions_to_add:[{permissions:Int32Array.from(o)}],principal_id:[t]}}}),zt=({neuronId:e,permissions:o,principal:t})=>f({neuronId:e,command:{RemoveNeuronPermissions:{permissions_to_remove:[{permissions:Int32Array.from(o)}],principal_id:[t]}}}),jt=({neuronId:e,memo:o,amount:t})=>f({neuronId:e,command:{Split:{memo:o,amount_e8s:t}}}),Wt=({neuronId:e,amount:o,toAccount:t})=>f({neuronId:e,command:{Disburse:{to_account:t===void 0?[]:l(Bt(t)),amount:o===void 0?[]:[{e8s:o}]}}}),Jt=e=>X({neuronId:e,operation:{StartDissolving:{}}}),Qt=e=>X({neuronId:e,operation:{StopDissolving:{}}}),$t=({neuronId:e,percentageToStake:o})=>f({neuronId:e,command:{StakeMaturity:{percentage_to_stake:l(o)}}}),Xt=({neuronId:e,percentageToDisburse:o,toAccount:t})=>f({neuronId:e,command:{DisburseMaturity:{to_account:t===void 0?[]:l(Bt(t)),percentage_to_disburse:o}}}),Ht=({neuronId:e,autoStake:o})=>X({neuronId:e,operation:{ChangeAutoStakeMaturity:{requested_setting_for_auto_stake_maturity:o}}}),Kt=({neuronId:e,dissolveTimestampSeconds:o})=>X({neuronId:e,operation:{SetDissolveTimestamp:{dissolve_timestamp_seconds:o}}}),Yt=({neuronId:e,additionalDissolveDelaySeconds:o})=>X({neuronId:e,operation:{IncreaseDissolveDelay:{additional_dissolve_delay_seconds:o}}}),Zt=({neuronId:e,functionId:o,followees:t})=>({subaccount:e.id,command:[{Follow:{function_id:o,followees:t}}]}),Dt=({neuronId:e,topicFollowing:o})=>({subaccount:e.id,command:[{SetFollowing:{topic_following:o.map(({topic:t,followees:s})=>({topic:[t],followees:s.map(({neuronId:i,alias:a})=>({neuron_id:l(i),alias:l(a)}))}))}}]}),It=({neuronId:e,proposalId:o,vote:t})=>({subaccount:e.id,command:[{RegisterVote:{vote:t,proposal:[o]}}]}),qt=({subaccount:e,memo:o,controller:t})=>({subaccount:e,command:[{ClaimOrRefresh:{by:[o===void 0?{NeuronId:{}}:{MemoAndController:{memo:o,controller:l(t)}}]}}]}),Lt=({excludeType:e,beforeProposal:o,includeRewardStatus:t,includeStatus:s,limit:i,includeTopics:a})=>({exclude_type:BigUint64Array.from(e??[]),before_proposal:l(o),include_reward_status:Int32Array.from(t??[]),include_status:Int32Array.from(s??[]),limit:i??10,include_topics:l(a?.map(_=>({topic:l(_)}))??[])}),ys=e=>{if("ManageNervousSystemParameters"in e)return{ManageNervousSystemParameters:us(e.ManageNervousSystemParameters)};if("AddGenericNervousSystemFunction"in e)return{AddGenericNervousSystemFunction:ps(e.AddGenericNervousSystemFunction)};if("SetTopicsForCustomProposals"in e)return{SetTopicsForCustomProposals:e.SetTopicsForCustomProposals};if("RemoveGenericNervousSystemFunction"in e)return{RemoveGenericNervousSystemFunction:e.RemoveGenericNervousSystemFunction};if("UpgradeSnsToNextVersion"in e)return{UpgradeSnsToNextVersion:e.UpgradeSnsToNextVersion};if("RegisterDappCanisters"in e)return{RegisterDappCanisters:e.RegisterDappCanisters};if("TransferSnsTreasuryFunds"in e)return{TransferSnsTreasuryFunds:is(e.TransferSnsTreasuryFunds)};if("UpgradeSnsControlledCanister"in e)return{UpgradeSnsControlledCanister:rs(e.UpgradeSnsControlledCanister)};if("DeregisterDappCanisters"in e)return{DeregisterDappCanisters:e.DeregisterDappCanisters};if("Unspecified"in e)return{Unspecified:e.Unspecified};if("ManageSnsMetadata"in e)return{ManageSnsMetadata:ns(e.ManageSnsMetadata)};if("ExecuteGenericNervousSystemFunction"in e)return{ExecuteGenericNervousSystemFunction:e.ExecuteGenericNervousSystemFunction};if("Motion"in e)return{Motion:e.Motion};throw new Error(`Unknown action type ${JSON.stringify(e)}`)},ns=e=>({url:n(e.url),logo:n(e.logo),name:n(e.name),description:n(e.description)}),as=e=>{if(e!==void 0)return{wasm_module_hash:e.wasm_module_hash,store_canister_id:n(e.store_canister_id),chunk_hashes_list:e.chunk_hashes_list}},rs=e=>({new_canister_wasm:e.new_canister_wasm,chunked_canister_wasm:as(n(e.chunked_canister_wasm)),canister_id:n(e.canister_id),canister_upgrade_arg:n(e.canister_upgrade_arg),mode:n(e.mode)}),is=e=>({from_treasury:e.from_treasury,to_principal:n(e.to_principal),to_subaccount:n(e.to_subaccount),memo:n(e.memo),amount_e8s:e.amount_e8s}),cs=e=>({validator_canister_id:n(e.validator_canister_id),target_canister_id:n(e.target_canister_id),validator_method_name:n(e.validator_method_name),target_method_name:n(e.target_method_name),topic:n(e.topic)}),_s=e=>{if(e!==void 0){if("NativeNervousSystemFunction"in e)return{NativeNervousSystemFunction:e.NativeNervousSystemFunction};if("GenericNervousSystemFunction"in e)return{GenericNervousSystemFunction:cs(e.GenericNervousSystemFunction)};throw new Error(`Unknown FunctionType ${JSON.stringify(e)}`)}},ps=e=>({id:e.id,name:e.name,description:n(e.description),function_type:_s(n(e.function_type))}),ds=e=>e&&{final_reward_rate_basis_points:n(e.final_reward_rate_basis_points),initial_reward_rate_basis_points:n(e.initial_reward_rate_basis_points),reward_rate_transition_duration_seconds:n(e.reward_rate_transition_duration_seconds),round_duration_seconds:n(e.round_duration_seconds)},us=e=>({default_followees:n(e.default_followees),max_dissolve_delay_seconds:n(e.max_dissolve_delay_seconds),max_dissolve_delay_bonus_percentage:n(e.max_dissolve_delay_bonus_percentage),max_followees_per_function:n(e.max_followees_per_function),neuron_claimer_permissions:n(e.neuron_claimer_permissions),neuron_minimum_stake_e8s:n(e.neuron_minimum_stake_e8s),max_neuron_age_for_age_bonus:n(e.max_neuron_age_for_age_bonus),initial_voting_period_seconds:n(e.initial_voting_period_seconds),neuron_minimum_dissolve_delay_to_vote_seconds:n(e.neuron_minimum_dissolve_delay_to_vote_seconds),reject_cost_e8s:n(e.reject_cost_e8s),max_proposals_to_keep_per_action:n(e.max_proposals_to_keep_per_action),wait_for_quiet_deadline_increase_seconds:n(e.wait_for_quiet_deadline_increase_seconds),max_number_of_neurons:n(e.max_number_of_neurons),transaction_fee_e8s:n(e.transaction_fee_e8s),max_number_of_proposals_with_ballots:n(e.max_number_of_proposals_with_ballots),max_age_bonus_percentage:n(e.max_age_bonus_percentage),neuron_grantable_permissions:n(e.neuron_grantable_permissions),voting_rewards_parameters:ds(n(e.voting_rewards_parameters)),max_number_of_principals_per_neuron:n(e.max_number_of_principals_per_neuron),automatically_advance_target_version:n(e.automatically_advance_target_version)});var ts=class e extends ms{constructor(){super(...arguments);this.listNeurons=async t=>{let{principal:s,limit:i,beforeNeuronId:a}=t,{neurons:_}=await this.caller(t).list_neurons({of_principal:H(s),limit:i??100,start_page_at:H(a)});return _};this.listProposals=async t=>{let{certified:s}=t;return await this.caller({certified:s}).list_proposals(Lt(t))};this.listTopics=async t=>{let{certified:s}=t;return await this.caller({certified:s}).list_topics({})};this.getProposal=async t=>{let{proposalId:s}=t,{result:i}=await this.caller(t).get_proposal({proposal_id:H(s)}),a=w(i);if(a===void 0||"Error"in a)throw new m(a?.Error.error_message??"Response type not supported");return a.Proposal};this.listNervousSystemFunctions=async t=>this.caller(t).list_nervous_system_functions();this.metadata=t=>this.caller(t).get_metadata({});this.nervousSystemParameters=t=>this.caller(t).get_nervous_system_parameters(null);this.getNeuron=async t=>{let{neuronId:s}=t,{result:i}=await this.caller(t).get_neuron({neuron_id:H(s)}),a=w(i);if(a===void 0||"Error"in a)throw new m(a?.Error.error_message??"Response type not supported");return a.Neuron};this.queryNeuron=async t=>{try{return await this.getNeuron(t)}catch(s){if(s instanceof Error&&s.message.includes("No neuron for given NeuronId"))return;throw s}};this.manageNeuron=async t=>{let s=await this.caller({certified:!0}).manage_neuron(t);return this.assertManageNeuronError(s),s};this.addNeuronPermissions=async t=>{let s=Et(t);await this.manageNeuron(s)};this.removeNeuronPermissions=async t=>{let s=zt(t);await this.manageNeuron(s)};this.splitNeuron=async t=>{let s=jt(t),{command:i}=await this.manageNeuron(s),a=w(i),_=d=>`Split neuron failed (${d})`;if(a===void 0)throw new m(_("no response"));if("Split"in a){let d=a.Split,c=w(d.created_neuron_id);if(c!==void 0)return c;throw new m(_("no id"))}throw new m(_("unknown"))};this.disburse=async t=>{let s=Wt(t);await this.manageNeuron(s)};this.startDissolving=async t=>{let s=Jt(t);await this.manageNeuron(s)};this.stopDissolving=async t=>{let s=Qt(t);await this.manageNeuron(s)};this.stakeMaturity=async({neuronId:t,percentageToStake:s})=>{es(s??100);let i=$t({neuronId:t,percentageToStake:s});await this.manageNeuron(i)};this.disburseMaturity=async t=>{es(t.percentageToDisburse);let s=Xt(t);await this.manageNeuron(s)};this.autoStakeMaturity=async t=>{let s=Ht(t);await this.manageNeuron(s)};this.setDissolveTimestamp=async t=>{let s=Kt(t);await this.manageNeuron(s)};this.increaseDissolveDelay=async t=>{let s=Yt(t);await this.manageNeuron(s)};this.setTopicFollowees=async t=>{let s=Zt(t);await this.manageNeuron(s)};this.setFollowing=async t=>{let s=Dt(t);await this.manageNeuron(s)};this.registerVote=async t=>{let s=It(t);await this.manageNeuron(s)};this.refreshNeuron=async t=>{let s=qt({subaccount:t.id});await this.manageNeuron(s)};this.claimNeuron=async({memo:t,controller:s,subaccount:i})=>{let a=qt({subaccount:i,memo:t,controller:s}),{command:_}=await this.manageNeuron(a),d=w(_);if(d===void 0)throw new m("Claim neuron failed");if("ClaimOrRefresh"in d){let c=w(d.ClaimOrRefresh.refreshed_neuron_id);if(c===void 0)throw new m("Claim neuron failed");return c}throw new m("Claim neuron failed")};this.assertManageNeuronError=({command:t})=>{let s=t[0];if(s!==void 0&&"Error"in s)throw new m(s.Error.error_message)}}static create(t){let{service:s,certifiedService:i,canisterId:a}=Ns({options:t,idlFactory:Ut,certifiedIdlFactory:Gt});return new e(a,s,i)}};export{ys as a,ts as b};
|
|
2
|
-
//# sourceMappingURL=chunk-HIRPCVPC.js.map
|