@dfinity/nns 5.2.0-next-2024-08-13 → 5.2.0-next-2024-08-19

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.
@@ -1,5 +1,6 @@
1
1
  /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/governance.did */
2
2
  export const idlFactory = ({ IDL }) => {
3
+ const ManageNeuronRequest = IDL.Rec();
3
4
  const Proposal = IDL.Rec();
4
5
  const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
5
6
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
@@ -117,10 +118,10 @@ export const idlFactory = ({ IDL }) => {
117
118
  'settings' : IDL.Opt(CanisterSettings),
118
119
  });
119
120
  const InstallCode = IDL.Record({
120
- 'arg' : IDL.Opt(IDL.Vec(IDL.Nat8)),
121
- 'wasm_module' : IDL.Opt(IDL.Vec(IDL.Nat8)),
122
121
  'skip_stopping_before_installing' : IDL.Opt(IDL.Bool),
122
+ 'wasm_module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
123
123
  'canister_id' : IDL.Opt(IDL.Principal),
124
+ 'arg_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
124
125
  'install_mode' : IDL.Opt(IDL.Int32),
125
126
  });
126
127
  const StopOrStartCanister = IDL.Record({
@@ -755,6 +756,58 @@ export const idlFactory = ({ IDL }) => {
755
756
  const ListProposalInfoResponse = IDL.Record({
756
757
  'proposal_info' : IDL.Vec(ProposalInfo),
757
758
  });
759
+ const InstallCodeRequest = IDL.Record({
760
+ 'arg' : IDL.Opt(IDL.Vec(IDL.Nat8)),
761
+ 'wasm_module' : IDL.Opt(IDL.Vec(IDL.Nat8)),
762
+ 'skip_stopping_before_installing' : IDL.Opt(IDL.Bool),
763
+ 'canister_id' : IDL.Opt(IDL.Principal),
764
+ 'install_mode' : IDL.Opt(IDL.Int32),
765
+ });
766
+ const ProposalActionRequest = IDL.Variant({
767
+ 'RegisterKnownNeuron' : KnownNeuron,
768
+ 'ManageNeuron' : ManageNeuronRequest,
769
+ 'UpdateCanisterSettings' : UpdateCanisterSettings,
770
+ 'InstallCode' : InstallCodeRequest,
771
+ 'StopOrStartCanister' : StopOrStartCanister,
772
+ 'CreateServiceNervousSystem' : CreateServiceNervousSystem,
773
+ 'ExecuteNnsFunction' : ExecuteNnsFunction,
774
+ 'RewardNodeProvider' : RewardNodeProvider,
775
+ 'OpenSnsTokenSwap' : OpenSnsTokenSwap,
776
+ 'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
777
+ 'SetDefaultFollowees' : SetDefaultFollowees,
778
+ 'RewardNodeProviders' : RewardNodeProviders,
779
+ 'ManageNetworkEconomics' : NetworkEconomics,
780
+ 'ApproveGenesisKyc' : Principals,
781
+ 'AddOrRemoveNodeProvider' : AddOrRemoveNodeProvider,
782
+ 'Motion' : Motion,
783
+ });
784
+ const MakeProposalRequest = IDL.Record({
785
+ 'url' : IDL.Text,
786
+ 'title' : IDL.Opt(IDL.Text),
787
+ 'action' : IDL.Opt(ProposalActionRequest),
788
+ 'summary' : IDL.Text,
789
+ });
790
+ const ManageNeuronCommandRequest = IDL.Variant({
791
+ 'Spawn' : Spawn,
792
+ 'Split' : Split,
793
+ 'Follow' : Follow,
794
+ 'ClaimOrRefresh' : ClaimOrRefresh,
795
+ 'Configure' : Configure,
796
+ 'RegisterVote' : RegisterVote,
797
+ 'Merge' : Merge,
798
+ 'DisburseToNeuron' : DisburseToNeuron,
799
+ 'MakeProposal' : MakeProposalRequest,
800
+ 'StakeMaturity' : StakeMaturity,
801
+ 'MergeMaturity' : MergeMaturity,
802
+ 'Disburse' : Disburse,
803
+ });
804
+ ManageNeuronRequest.fill(
805
+ IDL.Record({
806
+ 'id' : IDL.Opt(NeuronId),
807
+ 'command' : IDL.Opt(ManageNeuronCommandRequest),
808
+ 'neuron_id_or_subaccount' : IDL.Opt(NeuronIdOrSubaccount),
809
+ })
810
+ );
758
811
  const SpawnResponse = IDL.Record({ 'created_neuron_id' : IDL.Opt(NeuronId) });
759
812
  const ClaimOrRefreshResponse = IDL.Record({
760
813
  'refreshed_neuron_id' : IDL.Opt(NeuronId),
@@ -889,7 +942,11 @@ export const idlFactory = ({ IDL }) => {
889
942
  [ListProposalInfoResponse],
890
943
  [],
891
944
  ),
892
- 'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
945
+ 'manage_neuron' : IDL.Func(
946
+ [ManageNeuronRequest],
947
+ [ManageNeuronResponse],
948
+ [],
949
+ ),
893
950
  'settle_community_fund_participation' : IDL.Func(
894
951
  [SettleCommunityFundParticipation],
895
952
  [Result],
@@ -901,7 +958,7 @@ export const idlFactory = ({ IDL }) => {
901
958
  [],
902
959
  ),
903
960
  'simulate_manage_neuron' : IDL.Func(
904
- [ManageNeuron],
961
+ [ManageNeuronRequest],
905
962
  [ManageNeuronResponse],
906
963
  [],
907
964
  ),
@@ -1027,10 +1084,10 @@ export const init = ({ IDL }) => {
1027
1084
  'settings' : IDL.Opt(CanisterSettings),
1028
1085
  });
1029
1086
  const InstallCode = IDL.Record({
1030
- 'arg' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1031
- 'wasm_module' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1032
1087
  'skip_stopping_before_installing' : IDL.Opt(IDL.Bool),
1088
+ 'wasm_module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1033
1089
  'canister_id' : IDL.Opt(IDL.Principal),
1090
+ 'arg_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1034
1091
  'install_mode' : IDL.Opt(IDL.Int32),
1035
1092
  });
1036
1093
  const StopOrStartCanister = IDL.Record({
@@ -323,6 +323,13 @@ export interface InitialTokenDistribution {
323
323
  swap_distribution: [] | [SwapDistribution];
324
324
  }
325
325
  export interface InstallCode {
326
+ skip_stopping_before_installing: [] | [boolean];
327
+ wasm_module_hash: [] | [Uint8Array | number[]];
328
+ canister_id: [] | [Principal];
329
+ arg_hash: [] | [Uint8Array | number[]];
330
+ install_mode: [] | [number];
331
+ }
332
+ export interface InstallCodeRequest {
326
333
  arg: [] | [Uint8Array | number[]];
327
334
  wasm_module: [] | [Uint8Array | number[]];
328
335
  skip_stopping_before_installing: [] | [boolean];
@@ -371,6 +378,12 @@ export interface ListProposalInfo {
371
378
  export interface ListProposalInfoResponse {
372
379
  proposal_info: Array<ProposalInfo>;
373
380
  }
381
+ export interface MakeProposalRequest {
382
+ url: string;
383
+ title: [] | [string];
384
+ action: [] | [ProposalActionRequest];
385
+ summary: string;
386
+ }
374
387
  export interface MakeProposalResponse {
375
388
  message: [] | [string];
376
389
  proposal_id: [] | [NeuronId];
@@ -385,6 +398,24 @@ export interface ManageNeuron {
385
398
  command: [] | [Command];
386
399
  neuron_id_or_subaccount: [] | [NeuronIdOrSubaccount];
387
400
  }
401
+ export type ManageNeuronCommandRequest =
402
+ | { Spawn: Spawn }
403
+ | { Split: Split }
404
+ | { Follow: Follow }
405
+ | { ClaimOrRefresh: ClaimOrRefresh }
406
+ | { Configure: Configure }
407
+ | { RegisterVote: RegisterVote }
408
+ | { Merge: Merge }
409
+ | { DisburseToNeuron: DisburseToNeuron }
410
+ | { MakeProposal: MakeProposalRequest }
411
+ | { StakeMaturity: StakeMaturity }
412
+ | { MergeMaturity: MergeMaturity }
413
+ | { Disburse: Disburse };
414
+ export interface ManageNeuronRequest {
415
+ id: [] | [NeuronId];
416
+ command: [] | [ManageNeuronCommandRequest];
417
+ neuron_id_or_subaccount: [] | [NeuronIdOrSubaccount];
418
+ }
388
419
  export interface ManageNeuronResponse {
389
420
  command: [] | [Command_1];
390
421
  }
@@ -629,6 +660,23 @@ export interface Proposal {
629
660
  action: [] | [Action];
630
661
  summary: string;
631
662
  }
663
+ export type ProposalActionRequest =
664
+ | { RegisterKnownNeuron: KnownNeuron }
665
+ | { ManageNeuron: ManageNeuronRequest }
666
+ | { UpdateCanisterSettings: UpdateCanisterSettings }
667
+ | { InstallCode: InstallCodeRequest }
668
+ | { StopOrStartCanister: StopOrStartCanister }
669
+ | { CreateServiceNervousSystem: CreateServiceNervousSystem }
670
+ | { ExecuteNnsFunction: ExecuteNnsFunction }
671
+ | { RewardNodeProvider: RewardNodeProvider }
672
+ | { OpenSnsTokenSwap: OpenSnsTokenSwap }
673
+ | { SetSnsTokenSwapOpenTimeWindow: SetSnsTokenSwapOpenTimeWindow }
674
+ | { SetDefaultFollowees: SetDefaultFollowees }
675
+ | { RewardNodeProviders: RewardNodeProviders }
676
+ | { ManageNetworkEconomics: NetworkEconomics }
677
+ | { ApproveGenesisKyc: Principals }
678
+ | { AddOrRemoveNodeProvider: AddOrRemoveNodeProvider }
679
+ | { Motion: Motion };
632
680
  export interface ProposalData {
633
681
  id: [] | [NeuronId];
634
682
  failure_reason: [] | [GovernanceError];
@@ -881,7 +929,7 @@ export interface _SERVICE {
881
929
  list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
882
930
  list_node_providers: ActorMethod<[], ListNodeProvidersResponse>;
883
931
  list_proposals: ActorMethod<[ListProposalInfo], ListProposalInfoResponse>;
884
- manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
932
+ manage_neuron: ActorMethod<[ManageNeuronRequest], ManageNeuronResponse>;
885
933
  settle_community_fund_participation: ActorMethod<
886
934
  [SettleCommunityFundParticipation],
887
935
  Result
@@ -890,7 +938,10 @@ export interface _SERVICE {
890
938
  [SettleNeuronsFundParticipationRequest],
891
939
  SettleNeuronsFundParticipationResponse
892
940
  >;
893
- simulate_manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
941
+ simulate_manage_neuron: ActorMethod<
942
+ [ManageNeuronRequest],
943
+ ManageNeuronResponse
944
+ >;
894
945
  transfer_gtc_neuron: ActorMethod<[NeuronId, NeuronId], Result>;
895
946
  update_node_provider: ActorMethod<[UpdateNodeProvider], Result>;
896
947
  }
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 3d0b3f1 (2024-08-02 tags: release-2024-08-02_01-30-base) 'rs/nns/governance/canister/governance.did' by import-candid
1
+ // Generated from IC repo commit 8e149ef621 (2024-08-16) 'rs/nns/governance/canister/governance.did' by import-candid
2
2
  type AccountIdentifier = record { hash : blob };
3
3
  type Action = variant {
4
4
  RegisterKnownNeuron : KnownNeuron;
@@ -267,6 +267,13 @@ type InitialTokenDistribution = record {
267
267
  swap_distribution : opt SwapDistribution;
268
268
  };
269
269
  type InstallCode = record {
270
+ skip_stopping_before_installing : opt bool;
271
+ wasm_module_hash : opt blob;
272
+ canister_id : opt principal;
273
+ arg_hash : opt blob;
274
+ install_mode : opt int32;
275
+ };
276
+ type InstallCodeRequest = record {
270
277
  arg : opt blob;
271
278
  wasm_module : opt blob;
272
279
  skip_stopping_before_installing : opt bool;
@@ -306,6 +313,12 @@ type ListProposalInfo = record {
306
313
  include_status : vec int32;
307
314
  };
308
315
  type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo };
316
+ type MakeProposalRequest = record {
317
+ url : text;
318
+ title : opt text;
319
+ action : opt ProposalActionRequest;
320
+ summary : text;
321
+ };
309
322
  type MakeProposalResponse = record {
310
323
  message : opt text;
311
324
  proposal_id : opt NeuronId;
@@ -320,6 +333,25 @@ type ManageNeuron = record {
320
333
  command : opt Command;
321
334
  neuron_id_or_subaccount : opt NeuronIdOrSubaccount;
322
335
  };
336
+ type ManageNeuronCommandRequest = variant {
337
+ Spawn : Spawn;
338
+ Split : Split;
339
+ Follow : Follow;
340
+ ClaimOrRefresh : ClaimOrRefresh;
341
+ Configure : Configure;
342
+ RegisterVote : RegisterVote;
343
+ Merge : Merge;
344
+ DisburseToNeuron : DisburseToNeuron;
345
+ MakeProposal : MakeProposalRequest;
346
+ StakeMaturity : StakeMaturity;
347
+ MergeMaturity : MergeMaturity;
348
+ Disburse : Disburse;
349
+ };
350
+ type ManageNeuronRequest = record {
351
+ id : opt NeuronId;
352
+ command : opt ManageNeuronCommandRequest;
353
+ neuron_id_or_subaccount : opt NeuronIdOrSubaccount;
354
+ };
323
355
  type ManageNeuronResponse = record { command : opt Command_1 };
324
356
  type Merge = record { source_neuron_id : opt NeuronId };
325
357
  type MergeMaturity = record { percentage_to_merge : nat32 };
@@ -539,6 +571,24 @@ type Proposal = record {
539
571
  action : opt Action;
540
572
  summary : text;
541
573
  };
574
+ type ProposalActionRequest = variant {
575
+ RegisterKnownNeuron : KnownNeuron;
576
+ ManageNeuron : ManageNeuronRequest;
577
+ UpdateCanisterSettings : UpdateCanisterSettings;
578
+ InstallCode : InstallCodeRequest;
579
+ StopOrStartCanister : StopOrStartCanister;
580
+ CreateServiceNervousSystem : CreateServiceNervousSystem;
581
+ ExecuteNnsFunction : ExecuteNnsFunction;
582
+ RewardNodeProvider : RewardNodeProvider;
583
+ OpenSnsTokenSwap : OpenSnsTokenSwap;
584
+ SetSnsTokenSwapOpenTimeWindow : SetSnsTokenSwapOpenTimeWindow;
585
+ SetDefaultFollowees : SetDefaultFollowees;
586
+ RewardNodeProviders : RewardNodeProviders;
587
+ ManageNetworkEconomics : NetworkEconomics;
588
+ ApproveGenesisKyc : Principals;
589
+ AddOrRemoveNodeProvider : AddOrRemoveNodeProvider;
590
+ Motion : Motion;
591
+ };
542
592
  type ProposalData = record {
543
593
  id : opt NeuronId;
544
594
  failure_reason : opt GovernanceError;
@@ -752,14 +802,14 @@ service : (Governance) -> {
752
802
  list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
753
803
  list_node_providers : () -> (ListNodeProvidersResponse) query;
754
804
  list_proposals : (ListProposalInfo) -> (ListProposalInfoResponse) query;
755
- manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
805
+ manage_neuron : (ManageNeuronRequest) -> (ManageNeuronResponse);
756
806
  settle_community_fund_participation : (SettleCommunityFundParticipation) -> (
757
807
  Result,
758
808
  );
759
809
  settle_neurons_fund_participation : (
760
810
  SettleNeuronsFundParticipationRequest,
761
811
  ) -> (SettleNeuronsFundParticipationResponse);
762
- simulate_manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
812
+ simulate_manage_neuron : (ManageNeuronRequest) -> (ManageNeuronResponse);
763
813
  transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result);
764
814
  update_node_provider : (UpdateNodeProvider) -> (Result);
765
815
  }
@@ -1,5 +1,6 @@
1
1
  /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/governance.did */
2
2
  export const idlFactory = ({ IDL }) => {
3
+ const ManageNeuronRequest = IDL.Rec();
3
4
  const Proposal = IDL.Rec();
4
5
  const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
5
6
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
@@ -117,10 +118,10 @@ export const idlFactory = ({ IDL }) => {
117
118
  'settings' : IDL.Opt(CanisterSettings),
118
119
  });
119
120
  const InstallCode = IDL.Record({
120
- 'arg' : IDL.Opt(IDL.Vec(IDL.Nat8)),
121
- 'wasm_module' : IDL.Opt(IDL.Vec(IDL.Nat8)),
122
121
  'skip_stopping_before_installing' : IDL.Opt(IDL.Bool),
122
+ 'wasm_module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
123
123
  'canister_id' : IDL.Opt(IDL.Principal),
124
+ 'arg_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
124
125
  'install_mode' : IDL.Opt(IDL.Int32),
125
126
  });
126
127
  const StopOrStartCanister = IDL.Record({
@@ -755,6 +756,58 @@ export const idlFactory = ({ IDL }) => {
755
756
  const ListProposalInfoResponse = IDL.Record({
756
757
  'proposal_info' : IDL.Vec(ProposalInfo),
757
758
  });
759
+ const InstallCodeRequest = IDL.Record({
760
+ 'arg' : IDL.Opt(IDL.Vec(IDL.Nat8)),
761
+ 'wasm_module' : IDL.Opt(IDL.Vec(IDL.Nat8)),
762
+ 'skip_stopping_before_installing' : IDL.Opt(IDL.Bool),
763
+ 'canister_id' : IDL.Opt(IDL.Principal),
764
+ 'install_mode' : IDL.Opt(IDL.Int32),
765
+ });
766
+ const ProposalActionRequest = IDL.Variant({
767
+ 'RegisterKnownNeuron' : KnownNeuron,
768
+ 'ManageNeuron' : ManageNeuronRequest,
769
+ 'UpdateCanisterSettings' : UpdateCanisterSettings,
770
+ 'InstallCode' : InstallCodeRequest,
771
+ 'StopOrStartCanister' : StopOrStartCanister,
772
+ 'CreateServiceNervousSystem' : CreateServiceNervousSystem,
773
+ 'ExecuteNnsFunction' : ExecuteNnsFunction,
774
+ 'RewardNodeProvider' : RewardNodeProvider,
775
+ 'OpenSnsTokenSwap' : OpenSnsTokenSwap,
776
+ 'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
777
+ 'SetDefaultFollowees' : SetDefaultFollowees,
778
+ 'RewardNodeProviders' : RewardNodeProviders,
779
+ 'ManageNetworkEconomics' : NetworkEconomics,
780
+ 'ApproveGenesisKyc' : Principals,
781
+ 'AddOrRemoveNodeProvider' : AddOrRemoveNodeProvider,
782
+ 'Motion' : Motion,
783
+ });
784
+ const MakeProposalRequest = IDL.Record({
785
+ 'url' : IDL.Text,
786
+ 'title' : IDL.Opt(IDL.Text),
787
+ 'action' : IDL.Opt(ProposalActionRequest),
788
+ 'summary' : IDL.Text,
789
+ });
790
+ const ManageNeuronCommandRequest = IDL.Variant({
791
+ 'Spawn' : Spawn,
792
+ 'Split' : Split,
793
+ 'Follow' : Follow,
794
+ 'ClaimOrRefresh' : ClaimOrRefresh,
795
+ 'Configure' : Configure,
796
+ 'RegisterVote' : RegisterVote,
797
+ 'Merge' : Merge,
798
+ 'DisburseToNeuron' : DisburseToNeuron,
799
+ 'MakeProposal' : MakeProposalRequest,
800
+ 'StakeMaturity' : StakeMaturity,
801
+ 'MergeMaturity' : MergeMaturity,
802
+ 'Disburse' : Disburse,
803
+ });
804
+ ManageNeuronRequest.fill(
805
+ IDL.Record({
806
+ 'id' : IDL.Opt(NeuronId),
807
+ 'command' : IDL.Opt(ManageNeuronCommandRequest),
808
+ 'neuron_id_or_subaccount' : IDL.Opt(NeuronIdOrSubaccount),
809
+ })
810
+ );
758
811
  const SpawnResponse = IDL.Record({ 'created_neuron_id' : IDL.Opt(NeuronId) });
759
812
  const ClaimOrRefreshResponse = IDL.Record({
760
813
  'refreshed_neuron_id' : IDL.Opt(NeuronId),
@@ -905,7 +958,11 @@ export const idlFactory = ({ IDL }) => {
905
958
  [ListProposalInfoResponse],
906
959
  ['query'],
907
960
  ),
908
- 'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
961
+ 'manage_neuron' : IDL.Func(
962
+ [ManageNeuronRequest],
963
+ [ManageNeuronResponse],
964
+ [],
965
+ ),
909
966
  'settle_community_fund_participation' : IDL.Func(
910
967
  [SettleCommunityFundParticipation],
911
968
  [Result],
@@ -917,7 +974,7 @@ export const idlFactory = ({ IDL }) => {
917
974
  [],
918
975
  ),
919
976
  'simulate_manage_neuron' : IDL.Func(
920
- [ManageNeuron],
977
+ [ManageNeuronRequest],
921
978
  [ManageNeuronResponse],
922
979
  [],
923
980
  ),
@@ -1043,10 +1100,10 @@ export const init = ({ IDL }) => {
1043
1100
  'settings' : IDL.Opt(CanisterSettings),
1044
1101
  });
1045
1102
  const InstallCode = IDL.Record({
1046
- 'arg' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1047
- 'wasm_module' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1048
1103
  'skip_stopping_before_installing' : IDL.Opt(IDL.Bool),
1104
+ 'wasm_module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1049
1105
  'canister_id' : IDL.Opt(IDL.Principal),
1106
+ 'arg_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1050
1107
  'install_mode' : IDL.Opt(IDL.Int32),
1051
1108
  });
1052
1109
  const StopOrStartCanister = IDL.Record({
@@ -1,5 +1,6 @@
1
1
  /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/governance_test.did */
2
2
  export const idlFactory = ({ IDL }) => {
3
+ const ManageNeuronRequest = IDL.Rec();
3
4
  const Proposal = IDL.Rec();
4
5
  const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
5
6
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
@@ -117,10 +118,10 @@ export const idlFactory = ({ IDL }) => {
117
118
  'settings' : IDL.Opt(CanisterSettings),
118
119
  });
119
120
  const InstallCode = IDL.Record({
120
- 'arg' : IDL.Opt(IDL.Vec(IDL.Nat8)),
121
- 'wasm_module' : IDL.Opt(IDL.Vec(IDL.Nat8)),
122
121
  'skip_stopping_before_installing' : IDL.Opt(IDL.Bool),
122
+ 'wasm_module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
123
123
  'canister_id' : IDL.Opt(IDL.Principal),
124
+ 'arg_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
124
125
  'install_mode' : IDL.Opt(IDL.Int32),
125
126
  });
126
127
  const StopOrStartCanister = IDL.Record({
@@ -755,6 +756,58 @@ export const idlFactory = ({ IDL }) => {
755
756
  const ListProposalInfoResponse = IDL.Record({
756
757
  'proposal_info' : IDL.Vec(ProposalInfo),
757
758
  });
759
+ const InstallCodeRequest = IDL.Record({
760
+ 'arg' : IDL.Opt(IDL.Vec(IDL.Nat8)),
761
+ 'wasm_module' : IDL.Opt(IDL.Vec(IDL.Nat8)),
762
+ 'skip_stopping_before_installing' : IDL.Opt(IDL.Bool),
763
+ 'canister_id' : IDL.Opt(IDL.Principal),
764
+ 'install_mode' : IDL.Opt(IDL.Int32),
765
+ });
766
+ const ProposalActionRequest = IDL.Variant({
767
+ 'RegisterKnownNeuron' : KnownNeuron,
768
+ 'ManageNeuron' : ManageNeuronRequest,
769
+ 'UpdateCanisterSettings' : UpdateCanisterSettings,
770
+ 'InstallCode' : InstallCodeRequest,
771
+ 'StopOrStartCanister' : StopOrStartCanister,
772
+ 'CreateServiceNervousSystem' : CreateServiceNervousSystem,
773
+ 'ExecuteNnsFunction' : ExecuteNnsFunction,
774
+ 'RewardNodeProvider' : RewardNodeProvider,
775
+ 'OpenSnsTokenSwap' : OpenSnsTokenSwap,
776
+ 'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
777
+ 'SetDefaultFollowees' : SetDefaultFollowees,
778
+ 'RewardNodeProviders' : RewardNodeProviders,
779
+ 'ManageNetworkEconomics' : NetworkEconomics,
780
+ 'ApproveGenesisKyc' : Principals,
781
+ 'AddOrRemoveNodeProvider' : AddOrRemoveNodeProvider,
782
+ 'Motion' : Motion,
783
+ });
784
+ const MakeProposalRequest = IDL.Record({
785
+ 'url' : IDL.Text,
786
+ 'title' : IDL.Opt(IDL.Text),
787
+ 'action' : IDL.Opt(ProposalActionRequest),
788
+ 'summary' : IDL.Text,
789
+ });
790
+ const ManageNeuronCommandRequest = IDL.Variant({
791
+ 'Spawn' : Spawn,
792
+ 'Split' : Split,
793
+ 'Follow' : Follow,
794
+ 'ClaimOrRefresh' : ClaimOrRefresh,
795
+ 'Configure' : Configure,
796
+ 'RegisterVote' : RegisterVote,
797
+ 'Merge' : Merge,
798
+ 'DisburseToNeuron' : DisburseToNeuron,
799
+ 'MakeProposal' : MakeProposalRequest,
800
+ 'StakeMaturity' : StakeMaturity,
801
+ 'MergeMaturity' : MergeMaturity,
802
+ 'Disburse' : Disburse,
803
+ });
804
+ ManageNeuronRequest.fill(
805
+ IDL.Record({
806
+ 'id' : IDL.Opt(NeuronId),
807
+ 'command' : IDL.Opt(ManageNeuronCommandRequest),
808
+ 'neuron_id_or_subaccount' : IDL.Opt(NeuronIdOrSubaccount),
809
+ })
810
+ );
758
811
  const SpawnResponse = IDL.Record({ 'created_neuron_id' : IDL.Opt(NeuronId) });
759
812
  const ClaimOrRefreshResponse = IDL.Record({
760
813
  'refreshed_neuron_id' : IDL.Opt(NeuronId),
@@ -889,7 +942,11 @@ export const idlFactory = ({ IDL }) => {
889
942
  [ListProposalInfoResponse],
890
943
  [],
891
944
  ),
892
- 'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
945
+ 'manage_neuron' : IDL.Func(
946
+ [ManageNeuronRequest],
947
+ [ManageNeuronResponse],
948
+ [],
949
+ ),
893
950
  'settle_community_fund_participation' : IDL.Func(
894
951
  [SettleCommunityFundParticipation],
895
952
  [Result],
@@ -901,7 +958,7 @@ export const idlFactory = ({ IDL }) => {
901
958
  [],
902
959
  ),
903
960
  'simulate_manage_neuron' : IDL.Func(
904
- [ManageNeuron],
961
+ [ManageNeuronRequest],
905
962
  [ManageNeuronResponse],
906
963
  [],
907
964
  ),
@@ -1028,10 +1085,10 @@ export const init = ({ IDL }) => {
1028
1085
  'settings' : IDL.Opt(CanisterSettings),
1029
1086
  });
1030
1087
  const InstallCode = IDL.Record({
1031
- 'arg' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1032
- 'wasm_module' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1033
1088
  'skip_stopping_before_installing' : IDL.Opt(IDL.Bool),
1089
+ 'wasm_module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1034
1090
  'canister_id' : IDL.Opt(IDL.Principal),
1091
+ 'arg_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
1035
1092
  'install_mode' : IDL.Opt(IDL.Int32),
1036
1093
  });
1037
1094
  const StopOrStartCanister = IDL.Record({
@@ -323,6 +323,13 @@ export interface InitialTokenDistribution {
323
323
  swap_distribution: [] | [SwapDistribution];
324
324
  }
325
325
  export interface InstallCode {
326
+ skip_stopping_before_installing: [] | [boolean];
327
+ wasm_module_hash: [] | [Uint8Array | number[]];
328
+ canister_id: [] | [Principal];
329
+ arg_hash: [] | [Uint8Array | number[]];
330
+ install_mode: [] | [number];
331
+ }
332
+ export interface InstallCodeRequest {
326
333
  arg: [] | [Uint8Array | number[]];
327
334
  wasm_module: [] | [Uint8Array | number[]];
328
335
  skip_stopping_before_installing: [] | [boolean];
@@ -371,6 +378,12 @@ export interface ListProposalInfo {
371
378
  export interface ListProposalInfoResponse {
372
379
  proposal_info: Array<ProposalInfo>;
373
380
  }
381
+ export interface MakeProposalRequest {
382
+ url: string;
383
+ title: [] | [string];
384
+ action: [] | [ProposalActionRequest];
385
+ summary: string;
386
+ }
374
387
  export interface MakeProposalResponse {
375
388
  message: [] | [string];
376
389
  proposal_id: [] | [NeuronId];
@@ -385,6 +398,24 @@ export interface ManageNeuron {
385
398
  command: [] | [Command];
386
399
  neuron_id_or_subaccount: [] | [NeuronIdOrSubaccount];
387
400
  }
401
+ export type ManageNeuronCommandRequest =
402
+ | { Spawn: Spawn }
403
+ | { Split: Split }
404
+ | { Follow: Follow }
405
+ | { ClaimOrRefresh: ClaimOrRefresh }
406
+ | { Configure: Configure }
407
+ | { RegisterVote: RegisterVote }
408
+ | { Merge: Merge }
409
+ | { DisburseToNeuron: DisburseToNeuron }
410
+ | { MakeProposal: MakeProposalRequest }
411
+ | { StakeMaturity: StakeMaturity }
412
+ | { MergeMaturity: MergeMaturity }
413
+ | { Disburse: Disburse };
414
+ export interface ManageNeuronRequest {
415
+ id: [] | [NeuronId];
416
+ command: [] | [ManageNeuronCommandRequest];
417
+ neuron_id_or_subaccount: [] | [NeuronIdOrSubaccount];
418
+ }
388
419
  export interface ManageNeuronResponse {
389
420
  command: [] | [Command_1];
390
421
  }
@@ -629,6 +660,23 @@ export interface Proposal {
629
660
  action: [] | [Action];
630
661
  summary: string;
631
662
  }
663
+ export type ProposalActionRequest =
664
+ | { RegisterKnownNeuron: KnownNeuron }
665
+ | { ManageNeuron: ManageNeuronRequest }
666
+ | { UpdateCanisterSettings: UpdateCanisterSettings }
667
+ | { InstallCode: InstallCodeRequest }
668
+ | { StopOrStartCanister: StopOrStartCanister }
669
+ | { CreateServiceNervousSystem: CreateServiceNervousSystem }
670
+ | { ExecuteNnsFunction: ExecuteNnsFunction }
671
+ | { RewardNodeProvider: RewardNodeProvider }
672
+ | { OpenSnsTokenSwap: OpenSnsTokenSwap }
673
+ | { SetSnsTokenSwapOpenTimeWindow: SetSnsTokenSwapOpenTimeWindow }
674
+ | { SetDefaultFollowees: SetDefaultFollowees }
675
+ | { RewardNodeProviders: RewardNodeProviders }
676
+ | { ManageNetworkEconomics: NetworkEconomics }
677
+ | { ApproveGenesisKyc: Principals }
678
+ | { AddOrRemoveNodeProvider: AddOrRemoveNodeProvider }
679
+ | { Motion: Motion };
632
680
  export interface ProposalData {
633
681
  id: [] | [NeuronId];
634
682
  failure_reason: [] | [GovernanceError];
@@ -881,7 +929,7 @@ export interface _SERVICE {
881
929
  list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
882
930
  list_node_providers: ActorMethod<[], ListNodeProvidersResponse>;
883
931
  list_proposals: ActorMethod<[ListProposalInfo], ListProposalInfoResponse>;
884
- manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
932
+ manage_neuron: ActorMethod<[ManageNeuronRequest], ManageNeuronResponse>;
885
933
  settle_community_fund_participation: ActorMethod<
886
934
  [SettleCommunityFundParticipation],
887
935
  Result
@@ -890,7 +938,10 @@ export interface _SERVICE {
890
938
  [SettleNeuronsFundParticipationRequest],
891
939
  SettleNeuronsFundParticipationResponse
892
940
  >;
893
- simulate_manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
941
+ simulate_manage_neuron: ActorMethod<
942
+ [ManageNeuronRequest],
943
+ ManageNeuronResponse
944
+ >;
894
945
  transfer_gtc_neuron: ActorMethod<[NeuronId, NeuronId], Result>;
895
946
  update_neuron: ActorMethod<[Neuron], [] | [GovernanceError]>;
896
947
  update_node_provider: ActorMethod<[UpdateNodeProvider], Result>;