@dfinity/sns 3.2.10 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -100,13 +100,14 @@ Lookup for the canister ids of a Sns and initialize the wrapper to access its fe
100
100
 
101
101
  ### :factory: SnsGovernanceCanister
102
102
 
103
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L63)
103
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L65)
104
104
 
105
105
  #### Methods
106
106
 
107
107
  - [create](#gear-create)
108
108
  - [listNeurons](#gear-listneurons)
109
109
  - [listProposals](#gear-listproposals)
110
+ - [listTopics](#gear-listtopics)
110
111
  - [getProposal](#gear-getproposal)
111
112
  - [listNervousSystemFunctions](#gear-listnervoussystemfunctions)
112
113
  - [metadata](#gear-metadata)
@@ -142,7 +143,7 @@ Parameters:
142
143
 
143
144
  - `options`: Miscellaneous options to initialize the canister. Its ID being the only mandatory parammeter.
144
145
 
145
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L69)
146
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L71)
146
147
 
147
148
  ##### :gear: listNeurons
148
149
 
@@ -152,7 +153,7 @@ List the neurons of the Sns
152
153
  | ------------- | ----------------------------------------------------- |
153
154
  | `listNeurons` | `(params: SnsListNeuronsParams) => Promise<Neuron[]>` |
154
155
 
155
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L83)
156
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L85)
156
157
 
157
158
  ##### :gear: listProposals
158
159
 
@@ -162,7 +163,17 @@ List the proposals of the Sns
162
163
  | --------------- | -------------------------------------------------------------------- |
163
164
  | `listProposals` | `(params: SnsListProposalsParams) => Promise<ListProposalsResponse>` |
164
165
 
165
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L97)
166
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L99)
167
+
168
+ ##### :gear: listTopics
169
+
170
+ List the topics of the Sns
171
+
172
+ | Method | Type |
173
+ | ------------ | -------------------------------------------------------------- |
174
+ | `listTopics` | `(params: SnsListTopicsParams) => Promise<ListTopicsResponse>` |
175
+
176
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L114)
166
177
 
167
178
  ##### :gear: getProposal
168
179
 
@@ -172,7 +183,7 @@ Get the proposal of the Sns
172
183
  | ------------- | --------------------------------------------------------- |
173
184
  | `getProposal` | `(params: SnsGetProposalParams) => Promise<ProposalData>` |
174
185
 
175
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L111)
186
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L125)
176
187
 
177
188
  ##### :gear: listNervousSystemFunctions
178
189
 
@@ -183,7 +194,7 @@ Neurons can follow other neurons in specific Nervous System Functions.
183
194
  | ---------------------------- | ---------------------------------------------------------------------- |
184
195
  | `listNervousSystemFunctions` | `(params: QueryParams) => Promise<ListNervousSystemFunctionsResponse>` |
185
196
 
186
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L130)
197
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L144)
187
198
 
188
199
  ##### :gear: metadata
189
200
 
@@ -193,7 +204,7 @@ Get the Sns metadata (title, description, etc.)
193
204
  | ---------- | ------------------------------------------------------- |
194
205
  | `metadata` | `(params: QueryParams) => Promise<GetMetadataResponse>` |
195
206
 
196
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L138)
207
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L152)
197
208
 
198
209
  ##### :gear: nervousSystemParameters
199
210
 
@@ -203,7 +214,7 @@ Get the Sns nervous system parameters (default followees, max dissolve delay, ma
203
214
  | ------------------------- | ----------------------------------------------------------- |
204
215
  | `nervousSystemParameters` | `(params: QueryParams) => Promise<NervousSystemParameters>` |
205
216
 
206
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L144)
217
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L158)
207
218
 
208
219
  ##### :gear: getNeuron
209
220
 
@@ -213,7 +224,7 @@ Get the neuron of the Sns
213
224
  | ----------- | ------------------------------------------------- |
214
225
  | `getNeuron` | `(params: SnsGetNeuronParams) => Promise<Neuron>` |
215
226
 
216
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L152)
227
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L166)
217
228
 
218
229
  ##### :gear: queryNeuron
219
230
 
@@ -223,7 +234,7 @@ Same as `getNeuron` but returns undefined instead of raising error when not foun
223
234
  | ------------- | -------------------------------------------------------------- |
224
235
  | `queryNeuron` | `(params: SnsGetNeuronParams) => Promise<Neuron or undefined>` |
225
236
 
226
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L170)
237
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L184)
227
238
 
228
239
  ##### :gear: manageNeuron
229
240
 
@@ -233,7 +244,7 @@ Manage neuron. For advanced users.
233
244
  | -------------- | ---------------------------------------------------------- |
234
245
  | `manageNeuron` | `(request: ManageNeuron) => Promise<ManageNeuronResponse>` |
235
246
 
236
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L190)
247
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L204)
237
248
 
238
249
  ##### :gear: addNeuronPermissions
239
250
 
@@ -243,7 +254,7 @@ Add permissions to a neuron for a specific principal
243
254
  | ---------------------- | ------------------------------------------------------- |
244
255
  | `addNeuronPermissions` | `(params: SnsNeuronPermissionsParams) => Promise<void>` |
245
256
 
246
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L203)
257
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L217)
247
258
 
248
259
  ##### :gear: removeNeuronPermissions
249
260
 
@@ -253,7 +264,7 @@ Remove permissions to a neuron for a specific principal
253
264
  | ------------------------- | ------------------------------------------------------- |
254
265
  | `removeNeuronPermissions` | `(params: SnsNeuronPermissionsParams) => Promise<void>` |
255
266
 
256
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L213)
267
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L227)
257
268
 
258
269
  ##### :gear: splitNeuron
259
270
 
@@ -263,7 +274,7 @@ Split neuron
263
274
  | ------------- | ------------------------------------------------------------------ |
264
275
  | `splitNeuron` | `(params: SnsSplitNeuronParams) => Promise<NeuronId or undefined>` |
265
276
 
266
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L223)
277
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L237)
267
278
 
268
279
  ##### :gear: disburse
269
280
 
@@ -273,7 +284,7 @@ Disburse neuron on Account
273
284
  | ---------- | ---------------------------------------------------- |
274
285
  | `disburse` | `(params: SnsDisburseNeuronParams) => Promise<void>` |
275
286
 
276
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L254)
287
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L268)
277
288
 
278
289
  ##### :gear: startDissolving
279
290
 
@@ -283,7 +294,7 @@ Start dissolving process of a neuron
283
294
  | ----------------- | --------------------------------------- |
284
295
  | `startDissolving` | `(neuronId: NeuronId) => Promise<void>` |
285
296
 
286
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L262)
297
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L276)
287
298
 
288
299
  ##### :gear: stopDissolving
289
300
 
@@ -293,7 +304,7 @@ Stop dissolving process of a neuron
293
304
  | ---------------- | --------------------------------------- |
294
305
  | `stopDissolving` | `(neuronId: NeuronId) => Promise<void>` |
295
306
 
296
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L270)
307
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L284)
297
308
 
298
309
  ##### :gear: stakeMaturity
299
310
 
@@ -308,7 +319,7 @@ Parameters:
308
319
  - `neuronId`: The id of the neuron for which to stake the maturity
309
320
  - `percentageToStake`: Optional. Percentage of the current maturity to stake. If not provided, all of the neuron's current maturity will be staked.
310
321
 
311
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L282)
322
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L296)
312
323
 
313
324
  ##### :gear: disburseMaturity
314
325
 
@@ -324,7 +335,7 @@ Parameters:
324
335
  - `neuronId`: The id of the neuron for which to disburse the maturity
325
336
  - `percentageToDisburse`: What percentage of the available maturity to disburse.
326
337
 
327
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L303)
338
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L317)
328
339
 
329
340
  ##### :gear: autoStakeMaturity
330
341
 
@@ -339,7 +350,7 @@ Parameters:
339
350
  - `neuronId`: The id of the neuron for which to request a change of the auto stake feature
340
351
  - `autoStake`: `true` to enable the auto-stake maturity for this neuron, `false` to turn it off
341
352
 
342
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L319)
353
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L333)
343
354
 
344
355
  ##### :gear: setDissolveTimestamp
345
356
 
@@ -349,7 +360,7 @@ Increase dissolve delay of a neuron
349
360
  | ---------------------- | ---------------------------------------------------------- |
350
361
  | `setDissolveTimestamp` | `(params: SnsSetDissolveTimestampParams) => Promise<void>` |
351
362
 
352
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L329)
363
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L343)
353
364
 
354
365
  ##### :gear: increaseDissolveDelay
355
366
 
@@ -359,7 +370,7 @@ Increase dissolve delay of a neuron
359
370
  | ----------------------- | ----------------------------------------------------------- |
360
371
  | `increaseDissolveDelay` | `(params: SnsIncreaseDissolveDelayParams) => Promise<void>` |
361
372
 
362
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L339)
373
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L353)
363
374
 
364
375
  ##### :gear: setTopicFollowees
365
376
 
@@ -369,7 +380,7 @@ Sets followees of a neuron for a specific Nervous System Function (topic)
369
380
  | ------------------- | ------------------------------------------------- |
370
381
  | `setTopicFollowees` | `(params: SnsSetTopicFollowees) => Promise<void>` |
371
382
 
372
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L349)
383
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L363)
373
384
 
374
385
  ##### :gear: registerVote
375
386
 
@@ -379,7 +390,7 @@ Registers vote for a proposal from the neuron passed.
379
390
  | -------------- | -------------------------------------------------- |
380
391
  | `registerVote` | `(params: SnsRegisterVoteParams) => Promise<void>` |
381
392
 
382
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L357)
393
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L371)
383
394
 
384
395
  ##### :gear: refreshNeuron
385
396
 
@@ -389,7 +400,7 @@ Refresh neuron
389
400
  | --------------- | --------------------------------------- |
390
401
  | `refreshNeuron` | `(neuronId: NeuronId) => Promise<void>` |
391
402
 
392
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L365)
403
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L379)
393
404
 
394
405
  ##### :gear: claimNeuron
395
406
 
@@ -399,7 +410,7 @@ Claim neuron
399
410
  | ------------- | -------------------------------------------------------------------------------- |
400
411
  | `claimNeuron` | `({ memo, controller, subaccount, }: SnsClaimNeuronParams) => Promise<NeuronId>` |
401
412
 
402
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L375)
413
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/sns/src/governance.canister.ts#L389)
403
414
 
404
415
  ### :factory: SnsRootCanister
405
416
 
@@ -19,7 +19,17 @@ export const idlFactory = ({ IDL }) => {
19
19
  'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
20
20
  'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
21
21
  });
22
+ const Topic = IDL.Variant({
23
+ 'DappCanisterManagement' : IDL.Null,
24
+ 'DaoCommunitySettings' : IDL.Null,
25
+ 'ApplicationBusinessLogic' : IDL.Null,
26
+ 'CriticalDappOperations' : IDL.Null,
27
+ 'TreasuryAssetManagement' : IDL.Null,
28
+ 'Governance' : IDL.Null,
29
+ 'SnsFrameworkManagement' : IDL.Null,
30
+ });
22
31
  const GenericNervousSystemFunction = IDL.Record({
32
+ 'topic' : IDL.Opt(Topic),
23
33
  'validator_canister_id' : IDL.Opt(IDL.Principal),
24
34
  'target_canister_id' : IDL.Opt(IDL.Principal),
25
35
  'validator_method_name' : IDL.Opt(IDL.Text),
@@ -604,6 +614,19 @@ export const idlFactory = ({ IDL }) => {
604
614
  'include_ballots_by_caller' : IDL.Opt(IDL.Bool),
605
615
  'proposals' : IDL.Vec(ProposalData),
606
616
  });
617
+ const ListTopicsRequest = IDL.Record({});
618
+ const TopicInfo = IDL.Record({
619
+ 'native_functions' : IDL.Opt(IDL.Vec(NervousSystemFunction)),
620
+ 'topic' : IDL.Opt(Topic),
621
+ 'is_critical' : IDL.Opt(IDL.Bool),
622
+ 'name' : IDL.Opt(IDL.Text),
623
+ 'description' : IDL.Opt(IDL.Text),
624
+ 'custom_functions' : IDL.Opt(IDL.Vec(NervousSystemFunction)),
625
+ });
626
+ const ListTopicsResponse = IDL.Record({
627
+ 'uncategorized_functions' : IDL.Opt(IDL.Vec(NervousSystemFunction)),
628
+ 'topics' : IDL.Opt(IDL.Vec(TopicInfo)),
629
+ });
607
630
  const StakeMaturity = IDL.Record({
608
631
  'percentage_to_stake' : IDL.Opt(IDL.Nat32),
609
632
  });
@@ -714,6 +737,7 @@ export const idlFactory = ({ IDL }) => {
714
737
  ),
715
738
  'list_neurons' : IDL.Func([ListNeurons], [ListNeuronsResponse], []),
716
739
  'list_proposals' : IDL.Func([ListProposals], [ListProposalsResponse], []),
740
+ 'list_topics' : IDL.Func([ListTopicsRequest], [ListTopicsResponse], []),
717
741
  'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
718
742
  'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []),
719
743
  'set_mode' : IDL.Func([SetMode], [IDL.Record({})], []),
@@ -739,7 +763,17 @@ export const init = ({ IDL }) => {
739
763
  'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
740
764
  'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
741
765
  });
766
+ const Topic = IDL.Variant({
767
+ 'DappCanisterManagement' : IDL.Null,
768
+ 'DaoCommunitySettings' : IDL.Null,
769
+ 'ApplicationBusinessLogic' : IDL.Null,
770
+ 'CriticalDappOperations' : IDL.Null,
771
+ 'TreasuryAssetManagement' : IDL.Null,
772
+ 'Governance' : IDL.Null,
773
+ 'SnsFrameworkManagement' : IDL.Null,
774
+ });
742
775
  const GenericNervousSystemFunction = IDL.Record({
776
+ 'topic' : IDL.Opt(Topic),
743
777
  'validator_canister_id' : IDL.Opt(IDL.Principal),
744
778
  'target_canister_id' : IDL.Opt(IDL.Principal),
745
779
  'validator_method_name' : IDL.Opt(IDL.Text),
@@ -201,6 +201,7 @@ export type FunctionType =
201
201
  | { NativeNervousSystemFunction: {} }
202
202
  | { GenericNervousSystemFunction: GenericNervousSystemFunction };
203
203
  export interface GenericNervousSystemFunction {
204
+ topic: [] | [Topic];
204
205
  validator_canister_id: [] | [Principal];
205
206
  target_canister_id: [] | [Principal];
206
207
  validator_method_name: [] | [string];
@@ -332,6 +333,11 @@ export interface ListProposalsResponse {
332
333
  include_ballots_by_caller: [] | [boolean];
333
334
  proposals: Array<ProposalData>;
334
335
  }
336
+ export type ListTopicsRequest = {};
337
+ export interface ListTopicsResponse {
338
+ uncategorized_functions: [] | [Array<NervousSystemFunction>];
339
+ topics: [] | [Array<TopicInfo>];
340
+ }
335
341
  export interface ManageDappCanisterSettings {
336
342
  freezing_threshold: [] | [bigint];
337
343
  wasm_memory_threshold: [] | [bigint];
@@ -617,6 +623,22 @@ export interface Timers {
617
623
  export interface Tokens {
618
624
  e8s: [] | [bigint];
619
625
  }
626
+ export type Topic =
627
+ | { DappCanisterManagement: null }
628
+ | { DaoCommunitySettings: null }
629
+ | { ApplicationBusinessLogic: null }
630
+ | { CriticalDappOperations: null }
631
+ | { TreasuryAssetManagement: null }
632
+ | { Governance: null }
633
+ | { SnsFrameworkManagement: null };
634
+ export interface TopicInfo {
635
+ native_functions: [] | [Array<NervousSystemFunction>];
636
+ topic: [] | [Topic];
637
+ is_critical: [] | [boolean];
638
+ name: [] | [string];
639
+ description: [] | [string];
640
+ custom_functions: [] | [Array<NervousSystemFunction>];
641
+ }
620
642
  export interface TransferSnsTreasuryFunds {
621
643
  from_treasury: number;
622
644
  to_principal: [] | [Principal];
@@ -743,6 +765,7 @@ export interface _SERVICE {
743
765
  >;
744
766
  list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
745
767
  list_proposals: ActorMethod<[ListProposals], ListProposalsResponse>;
768
+ list_topics: ActorMethod<[ListTopicsRequest], ListTopicsResponse>;
746
769
  manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
747
770
  reset_timers: ActorMethod<[{}], {}>;
748
771
  set_mode: ActorMethod<[SetMode], {}>;
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 14c8f44 (2025-02-07 tags: release-2025-02-06_12-26-revert-hashes-in-blocks) 'rs/sns/governance/canister/governance.did' by import-candid
1
+ // Generated from IC repo commit 2f02a66 (2025-02-13 tags: release-2025-02-20_10-16-disable-best-effort-messaging) 'rs/sns/governance/canister/governance.did' by import-candid
2
2
  type Account = record {
3
3
  owner : opt principal;
4
4
  subaccount : opt Subaccount;
@@ -227,6 +227,7 @@ type GenericNervousSystemFunction = record {
227
227
  target_canister_id : opt principal;
228
228
  validator_method_name : opt text;
229
229
  target_method_name : opt text;
230
+ topic: opt Topic;
230
231
  };
231
232
 
232
233
  type GetMaturityModulationResponse = record {
@@ -840,6 +841,31 @@ type GetUpgradeJournalResponse = record {
840
841
  upgrade_journal_entry_count: opt nat64;
841
842
  };
842
843
 
844
+ type Topic = variant {
845
+ DaoCommunitySettings;
846
+ SnsFrameworkManagement;
847
+ DappCanisterManagement;
848
+ ApplicationBusinessLogic;
849
+ Governance;
850
+ TreasuryAssetManagement;
851
+ CriticalDappOperations;
852
+ };
853
+
854
+ type TopicInfo = record {
855
+ topic : opt Topic;
856
+ name : opt text;
857
+ description : opt text;
858
+ native_functions : opt vec NervousSystemFunction;
859
+ custom_functions : opt vec NervousSystemFunction;
860
+ is_critical : opt bool;
861
+ };
862
+
863
+ type ListTopicsRequest = record {};
864
+ type ListTopicsResponse = record {
865
+ topics: opt vec TopicInfo;
866
+ uncategorized_functions: opt vec NervousSystemFunction
867
+ };
868
+
843
869
  service : (Governance) -> {
844
870
  claim_swap_neurons : (ClaimSwapNeuronsRequest) -> (ClaimSwapNeuronsResponse);
845
871
  fail_stuck_upgrade_in_progress : (record {}) -> (record {});
@@ -858,6 +884,7 @@ service : (Governance) -> {
858
884
  list_nervous_system_functions : () -> (ListNervousSystemFunctionsResponse) query;
859
885
  list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
860
886
  list_proposals : (ListProposals) -> (ListProposalsResponse) query;
887
+ list_topics : (ListTopicsRequest) -> (ListTopicsResponse) query;
861
888
  manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
862
889
  set_mode : (SetMode) -> (record {});
863
890
  reset_timers : (record {}) -> (record {});
@@ -19,7 +19,17 @@ export const idlFactory = ({ IDL }) => {
19
19
  'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
20
20
  'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
21
21
  });
22
+ const Topic = IDL.Variant({
23
+ 'DappCanisterManagement' : IDL.Null,
24
+ 'DaoCommunitySettings' : IDL.Null,
25
+ 'ApplicationBusinessLogic' : IDL.Null,
26
+ 'CriticalDappOperations' : IDL.Null,
27
+ 'TreasuryAssetManagement' : IDL.Null,
28
+ 'Governance' : IDL.Null,
29
+ 'SnsFrameworkManagement' : IDL.Null,
30
+ });
22
31
  const GenericNervousSystemFunction = IDL.Record({
32
+ 'topic' : IDL.Opt(Topic),
23
33
  'validator_canister_id' : IDL.Opt(IDL.Principal),
24
34
  'target_canister_id' : IDL.Opt(IDL.Principal),
25
35
  'validator_method_name' : IDL.Opt(IDL.Text),
@@ -604,6 +614,19 @@ export const idlFactory = ({ IDL }) => {
604
614
  'include_ballots_by_caller' : IDL.Opt(IDL.Bool),
605
615
  'proposals' : IDL.Vec(ProposalData),
606
616
  });
617
+ const ListTopicsRequest = IDL.Record({});
618
+ const TopicInfo = IDL.Record({
619
+ 'native_functions' : IDL.Opt(IDL.Vec(NervousSystemFunction)),
620
+ 'topic' : IDL.Opt(Topic),
621
+ 'is_critical' : IDL.Opt(IDL.Bool),
622
+ 'name' : IDL.Opt(IDL.Text),
623
+ 'description' : IDL.Opt(IDL.Text),
624
+ 'custom_functions' : IDL.Opt(IDL.Vec(NervousSystemFunction)),
625
+ });
626
+ const ListTopicsResponse = IDL.Record({
627
+ 'uncategorized_functions' : IDL.Opt(IDL.Vec(NervousSystemFunction)),
628
+ 'topics' : IDL.Opt(IDL.Vec(TopicInfo)),
629
+ });
607
630
  const StakeMaturity = IDL.Record({
608
631
  'percentage_to_stake' : IDL.Opt(IDL.Nat32),
609
632
  });
@@ -722,6 +745,11 @@ export const idlFactory = ({ IDL }) => {
722
745
  [ListProposalsResponse],
723
746
  ['query'],
724
747
  ),
748
+ 'list_topics' : IDL.Func(
749
+ [ListTopicsRequest],
750
+ [ListTopicsResponse],
751
+ ['query'],
752
+ ),
725
753
  'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
726
754
  'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []),
727
755
  'set_mode' : IDL.Func([SetMode], [IDL.Record({})], []),
@@ -747,7 +775,17 @@ export const init = ({ IDL }) => {
747
775
  'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
748
776
  'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
749
777
  });
778
+ const Topic = IDL.Variant({
779
+ 'DappCanisterManagement' : IDL.Null,
780
+ 'DaoCommunitySettings' : IDL.Null,
781
+ 'ApplicationBusinessLogic' : IDL.Null,
782
+ 'CriticalDappOperations' : IDL.Null,
783
+ 'TreasuryAssetManagement' : IDL.Null,
784
+ 'Governance' : IDL.Null,
785
+ 'SnsFrameworkManagement' : IDL.Null,
786
+ });
750
787
  const GenericNervousSystemFunction = IDL.Record({
788
+ 'topic' : IDL.Opt(Topic),
751
789
  'validator_canister_id' : IDL.Opt(IDL.Principal),
752
790
  'target_canister_id' : IDL.Opt(IDL.Principal),
753
791
  'validator_method_name' : IDL.Opt(IDL.Text),
@@ -19,7 +19,17 @@ export const idlFactory = ({ IDL }) => {
19
19
  'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
20
20
  'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
21
21
  });
22
+ const Topic = IDL.Variant({
23
+ 'DappCanisterManagement' : IDL.Null,
24
+ 'DaoCommunitySettings' : IDL.Null,
25
+ 'ApplicationBusinessLogic' : IDL.Null,
26
+ 'CriticalDappOperations' : IDL.Null,
27
+ 'TreasuryAssetManagement' : IDL.Null,
28
+ 'Governance' : IDL.Null,
29
+ 'SnsFrameworkManagement' : IDL.Null,
30
+ });
22
31
  const GenericNervousSystemFunction = IDL.Record({
32
+ 'topic' : IDL.Opt(Topic),
23
33
  'validator_canister_id' : IDL.Opt(IDL.Principal),
24
34
  'target_canister_id' : IDL.Opt(IDL.Principal),
25
35
  'validator_method_name' : IDL.Opt(IDL.Text),
@@ -615,6 +625,19 @@ export const idlFactory = ({ IDL }) => {
615
625
  'include_ballots_by_caller' : IDL.Opt(IDL.Bool),
616
626
  'proposals' : IDL.Vec(ProposalData),
617
627
  });
628
+ const ListTopicsRequest = IDL.Record({});
629
+ const TopicInfo = IDL.Record({
630
+ 'native_functions' : IDL.Opt(IDL.Vec(NervousSystemFunction)),
631
+ 'topic' : IDL.Opt(Topic),
632
+ 'is_critical' : IDL.Opt(IDL.Bool),
633
+ 'name' : IDL.Opt(IDL.Text),
634
+ 'description' : IDL.Opt(IDL.Text),
635
+ 'custom_functions' : IDL.Opt(IDL.Vec(NervousSystemFunction)),
636
+ });
637
+ const ListTopicsResponse = IDL.Record({
638
+ 'uncategorized_functions' : IDL.Opt(IDL.Vec(NervousSystemFunction)),
639
+ 'topics' : IDL.Opt(IDL.Vec(TopicInfo)),
640
+ });
618
641
  const StakeMaturity = IDL.Record({
619
642
  'percentage_to_stake' : IDL.Opt(IDL.Nat32),
620
643
  });
@@ -735,6 +758,7 @@ export const idlFactory = ({ IDL }) => {
735
758
  ),
736
759
  'list_neurons' : IDL.Func([ListNeurons], [ListNeuronsResponse], []),
737
760
  'list_proposals' : IDL.Func([ListProposals], [ListProposalsResponse], []),
761
+ 'list_topics' : IDL.Func([ListTopicsRequest], [ListTopicsResponse], []),
738
762
  'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
739
763
  'mint_tokens' : IDL.Func([MintTokensRequest], [IDL.Record({})], []),
740
764
  'refresh_cached_upgrade_steps' : IDL.Func(
@@ -767,7 +791,17 @@ export const init = ({ IDL }) => {
767
791
  'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
768
792
  'requested_timestamp_seconds' : IDL.Opt(IDL.Nat64),
769
793
  });
794
+ const Topic = IDL.Variant({
795
+ 'DappCanisterManagement' : IDL.Null,
796
+ 'DaoCommunitySettings' : IDL.Null,
797
+ 'ApplicationBusinessLogic' : IDL.Null,
798
+ 'CriticalDappOperations' : IDL.Null,
799
+ 'TreasuryAssetManagement' : IDL.Null,
800
+ 'Governance' : IDL.Null,
801
+ 'SnsFrameworkManagement' : IDL.Null,
802
+ });
770
803
  const GenericNervousSystemFunction = IDL.Record({
804
+ 'topic' : IDL.Opt(Topic),
771
805
  'validator_canister_id' : IDL.Opt(IDL.Principal),
772
806
  'target_canister_id' : IDL.Opt(IDL.Principal),
773
807
  'validator_method_name' : IDL.Opt(IDL.Text),
@@ -212,6 +212,7 @@ export type FunctionType =
212
212
  | { NativeNervousSystemFunction: {} }
213
213
  | { GenericNervousSystemFunction: GenericNervousSystemFunction };
214
214
  export interface GenericNervousSystemFunction {
215
+ topic: [] | [Topic];
215
216
  validator_canister_id: [] | [Principal];
216
217
  target_canister_id: [] | [Principal];
217
218
  validator_method_name: [] | [string];
@@ -343,6 +344,11 @@ export interface ListProposalsResponse {
343
344
  include_ballots_by_caller: [] | [boolean];
344
345
  proposals: Array<ProposalData>;
345
346
  }
347
+ export type ListTopicsRequest = {};
348
+ export interface ListTopicsResponse {
349
+ uncategorized_functions: [] | [Array<NervousSystemFunction>];
350
+ topics: [] | [Array<TopicInfo>];
351
+ }
346
352
  export interface ManageDappCanisterSettings {
347
353
  freezing_threshold: [] | [bigint];
348
354
  wasm_memory_threshold: [] | [bigint];
@@ -632,6 +638,22 @@ export interface Timers {
632
638
  export interface Tokens {
633
639
  e8s: [] | [bigint];
634
640
  }
641
+ export type Topic =
642
+ | { DappCanisterManagement: null }
643
+ | { DaoCommunitySettings: null }
644
+ | { ApplicationBusinessLogic: null }
645
+ | { CriticalDappOperations: null }
646
+ | { TreasuryAssetManagement: null }
647
+ | { Governance: null }
648
+ | { SnsFrameworkManagement: null };
649
+ export interface TopicInfo {
650
+ native_functions: [] | [Array<NervousSystemFunction>];
651
+ topic: [] | [Topic];
652
+ is_critical: [] | [boolean];
653
+ name: [] | [string];
654
+ description: [] | [string];
655
+ custom_functions: [] | [Array<NervousSystemFunction>];
656
+ }
635
657
  export interface TransferSnsTreasuryFunds {
636
658
  from_treasury: number;
637
659
  to_principal: [] | [Principal];
@@ -763,6 +785,7 @@ export interface _SERVICE {
763
785
  >;
764
786
  list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
765
787
  list_proposals: ActorMethod<[ListProposals], ListProposalsResponse>;
788
+ list_topics: ActorMethod<[ListTopicsRequest], ListTopicsResponse>;
766
789
  manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
767
790
  mint_tokens: ActorMethod<[MintTokensRequest], {}>;
768
791
  refresh_cached_upgrade_steps: ActorMethod<[{}], {}>;
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 14c8f44 (2025-02-07 tags: release-2025-02-06_12-26-revert-hashes-in-blocks) 'rs/sns/governance/canister/governance_test.did' by import-candid
1
+ // Generated from IC repo commit 2f02a66 (2025-02-13 tags: release-2025-02-20_10-16-disable-best-effort-messaging) 'rs/sns/governance/canister/governance_test.did' by import-candid
2
2
  type Account = record {
3
3
  owner : opt principal;
4
4
  subaccount : opt Subaccount;
@@ -236,6 +236,7 @@ type GenericNervousSystemFunction = record {
236
236
  target_canister_id : opt principal;
237
237
  validator_method_name : opt text;
238
238
  target_method_name : opt text;
239
+ topic: opt Topic;
239
240
  };
240
241
 
241
242
  type GetMaturityModulationResponse = record {
@@ -857,6 +858,32 @@ type GetUpgradeJournalResponse = record {
857
858
  type AdvanceTargetVersionRequest = record { target_version : opt Version; };
858
859
  type AdvanceTargetVersionResponse = record {};
859
860
 
861
+
862
+ type Topic = variant {
863
+ DaoCommunitySettings;
864
+ SnsFrameworkManagement;
865
+ DappCanisterManagement;
866
+ ApplicationBusinessLogic;
867
+ Governance;
868
+ TreasuryAssetManagement;
869
+ CriticalDappOperations;
870
+ };
871
+
872
+ type TopicInfo = record {
873
+ topic : opt Topic;
874
+ name : opt text;
875
+ description : opt text;
876
+ native_functions : opt vec NervousSystemFunction;
877
+ custom_functions : opt vec NervousSystemFunction;
878
+ is_critical : opt bool;
879
+ };
880
+
881
+ type ListTopicsRequest = record {};
882
+ type ListTopicsResponse = record {
883
+ topics: opt vec TopicInfo;
884
+ uncategorized_functions: opt vec NervousSystemFunction
885
+ };
886
+
860
887
  service : (Governance) -> {
861
888
  add_maturity : (AddMaturityRequest) -> (AddMaturityResponse);
862
889
  claim_swap_neurons : (ClaimSwapNeuronsRequest) -> (ClaimSwapNeuronsResponse);
@@ -876,6 +903,7 @@ service : (Governance) -> {
876
903
  list_nervous_system_functions : () -> (ListNervousSystemFunctionsResponse) query;
877
904
  list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
878
905
  list_proposals : (ListProposals) -> (ListProposalsResponse) query;
906
+ list_topics : (ListTopicsRequest) -> (ListTopicsResponse) query;
879
907
  manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
880
908
  mint_tokens : (MintTokensRequest) -> (record {});
881
909
  set_mode : (SetMode) -> (record {});