Skip to content

GovernanceCanister

Defined in: packages/nns/src/governance.canister.ts:100

addHotkey(__namedParameters): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:913

Add hotkey to neuron

bigint

Principal

Promise<void>

GovernanceError


autoStakeMaturity(params): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:506

Changes auto-stake maturity for this Neuron. While on, auto-stake maturity will cause all the maturity generated by voting rewards to this neuron to be automatically staked and contribute to the voting power of the neuron.

boolean

bigint

Promise<void>

GovernanceError


claimOrRefreshNeuron(request): Promise<bigint | undefined>

Defined in: packages/nns/src/governance.canister.ts:982

Refreshes neuron and returns neuronId when successful Uses query call only.

ClaimOrRefreshNeuronRequest

Promise<bigint | undefined>

UnrecognizedTypeError


claimOrRefreshNeuronFromAccount(__namedParameters): Promise<bigint | undefined>

Defined in: packages/nns/src/governance.canister.ts:951

Gets the NeuronID of a newly created neuron.

Principal

bigint

Promise<bigint | undefined>


disburse(__namedParameters): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:757

Disburse neuron on Account

bigint

bigint

string

Promise<void>

GovernanceError

InvalidAccountIDError


disburseMaturity(params): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:1057

Disburses a neuron’s maturity (always certified). Reference: https://github.com/dfinity/ic/blob/ca2be53acf413bb92478ee7694ac0fb92af07030/rs/sns/governance/src/governance.rs#L1614

bigint

The id of the neuron for which to disburse maturity

number

The percentage of the neuron’s maturity to disburse, between 1 and 100 (inclusive).

Account

Optional. The ICRC account to which the maturity will be disbursed. If not provided, the maturity will be disbursed to the caller’s Main account.

string

Optional. The account identifier to which the maturity will be disbursed. If not provided, the maturity will be disbursed to the caller’s Main account.

Promise<void>

  • The neuron exists
  • The caller is authorized to perform this neuron operation (NeuronPermissionType::DisburseMaturity)
  • The given percentage_to_merge is between 1 and 100 (inclusive)
  • The neuron’s id is not yet in the list of neurons with ongoing operations
  • The e8s equivalent of the amount of maturity to disburse is more than the transaction fee.

getLatestRewardEvent(certified): Promise<RewardEvent>

Defined in: packages/nns/src/governance.canister.ts:318

Returns the latest reward event.

If certified is true, the request is fetched as an update call, otherwise it’s fetched using a query call.

boolean = true

Promise<RewardEvent>


getMetrics(__namedParameters): Promise<GovernanceCachedMetrics>

Defined in: packages/nns/src/governance.canister.ts:1103

boolean = true

Promise<GovernanceCachedMetrics>


getNetworkEconomicsParameters(__namedParameters): Promise<NetworkEconomics>

Defined in: packages/nns/src/governance.canister.ts:1028

Return the Network Economics.

boolean = true

Promise<NetworkEconomics>


getNeuron(__namedParameters): Promise<NeuronInfo | undefined>

Defined in: packages/nns/src/governance.canister.ts:1007

Return the data of the neuron provided as id.

boolean = true

bigint

Promise<NeuronInfo | undefined>


getProposal(__namedParameters): Promise<ProposalInfo | undefined>

Defined in: packages/nns/src/governance.canister.ts:681

Returns single proposal info

If certified is true (default), the request is fetched as an update call, otherwise it is fetched using a query call.

boolean = true

bigint

Promise<ProposalInfo | undefined>


increaseDissolveDelay(__namedParameters): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:411

Increases dissolve delay of a neuron

number

bigint

Promise<void>

GovernanceError


joinCommunityFund(neuronId): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:488

Neuron joins the community fund

bigint

Promise<void>

GovernanceError


leaveCommunityFund(neuronId): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:521

Neuron leaves the community fund

bigint

Promise<void>

GovernanceError


listKnownNeurons(certified): Promise<KnownNeuron[]>

Defined in: packages/nns/src/governance.canister.ts:291

Returns the list of neurons who have been approved by the community to appear as the default followee options.

If certified is true, the request is fetched as an update call, otherwise it is fetched using a query call.

boolean = true

Promise<KnownNeuron[]>


listNeurons(__namedParameters): Promise<NeuronInfo[]>

Defined in: packages/nns/src/governance.canister.ts:158

Returns the list of neurons controlled by the caller.

If an array of neuron IDs is provided, precisely those neurons will be fetched.

If certified is true, the request is fetched as an update call, otherwise it is fetched using a query call.

The backend treats includeEmptyNeurons as false if absent.

The response from the canister might be paginated. In this case, all pages will be fetched in parallel and combined into a single return value.

boolean = true

boolean

boolean

bigint[]

NeuronSubaccount[]

Promise<NeuronInfo[]>


listProposals(request): Promise<ListProposalsResponse>

Defined in: packages/nns/src/governance.canister.ts:331

Returns the list of proposals made for the community to vote on, paginated and filtered by the request.

If certified is true (default), the request is fetched as an update call, otherwise it is fetched using a query call.

the options to list the proposals (limit number of results, topics to search for, etc.)

boolean = true

ListProposalsRequest

Promise<ListProposalsResponse>


makeProposal(request): Promise<bigint | undefined>

Defined in: packages/nns/src/governance.canister.ts:699

Create new proposal

MakeProposalRequest

Promise<bigint | undefined>

The newly created proposal ID or undefined if the success response returned by the Governance canister does not provide such information.

GovernanceError


mergeMaturity(__namedParameters): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:815

Merge Maturity of a neuron

bigint

number

Promise<void>

GovernanceError

InvalidPercentageError


mergeNeurons(request): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:576

Merge two neurons

bigint

bigint

Promise<void>

GovernanceError


refreshVotingPower(__namedParameters): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:793

Refreshes voting power of a neuron (Resets the votingPowerRefreshedTimestampSeconds parameter of the neuron to the current time).

bigint

Promise<void>

GovernanceError


registerVote(__namedParameters): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:720

Registers vote for a proposal from the neuron passed.

bigint

bigint

Vote

Promise<void>

GovernanceError


removeHotkey(__namedParameters): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:933

Remove hotkey to neuron

bigint

Principal

Promise<void>

GovernanceError


setDissolveDelay(neuronId): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:437

Sets dissolve delay of a neuron. The new date is now + dissolveDelaySeconds.

number

bigint

Promise<void>

GovernanceError


setFollowees(followRequest): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:742

Edit neuron followees per topic

FollowRequest

Promise<void>

GovernanceError


setFollowing(params): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:1088

Set the following topics for a neuron.

bigint

The id of the neuron for which to set the following topics

FolloweesForTopic[]

The topics and the followees for each topic that the neuron should follow.

Promise<void>


setNodeProviderAccount(accountIdentifier): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:556

Sets node provider reward account. Where the reward is paid to.

string

Promise<void>

GovernanceError

InvalidAccountIDError


setVisibility(neuronId, visibility): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:536

Set visibility of a neuron

bigint

NeuronVisibility

Promise<void>

GovernanceError


simulateMergeNeurons(request): Promise<NeuronInfo>

Defined in: packages/nns/src/governance.canister.ts:593

Simulate merging two neurons

bigint

bigint

Promise<NeuronInfo>

GovernanceError


spawnNeuron(__namedParameters): Promise<bigint>

Defined in: packages/nns/src/governance.canister.ts:866

Merge Maturity of a neuron

bigint

Principal

bigint

number

Promise<bigint>

GovernanceError

InvalidPercentageError


splitNeuron(__namedParameters): Promise<bigint>

Defined in: packages/nns/src/governance.canister.ts:638

Splits a neuron creating a new one

bigint

bigint

bigint

Promise<bigint>

newNeuronId

GovernanceError


stakeMaturity(params): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:844

Stake the maturity of a neuron.

bigint

number

Promise<void>

GovernanceError

InvalidPercentageError


stakeNeuron(__namedParameters): Promise<bigint>

Defined in: packages/nns/src/governance.canister.ts:350

bigint

bigint

number[]

LedgerCanister

Principal

bigint

Promise<bigint>

InsufficientAmountError

StakeNeuronTransferError

CouldNotClaimNeuronError

TransferError


startDissolving(neuronId): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:460

Start dissolving process of a neuron

bigint

Promise<void>

GovernanceError


stopDissolving(neuronId): Promise<void>

Defined in: packages/nns/src/governance.canister.ts:474

Stop dissolving process of a neuron

bigint

Promise<void>

GovernanceError


static create(options): GovernanceCanister

Defined in: packages/nns/src/governance.canister.ts:115

GovernanceCanisterOptions = {}

GovernanceCanister