@@ -434,18 +434,37 @@ type ListKnownNeuronsResponse = record {
434
434
known_neurons : vec KnownNeuron;
435
435
};
436
436
437
+ // Parameters of the list_neurons method.
437
438
type ListNeurons = record {
438
- include_public_neurons_in_full_neurons : opt bool;
439
+ // These fields select neurons to be in the result set.
439
440
neuron_ids : vec nat64;
440
- include_empty_neurons_readable_by_caller : opt bool;
441
441
include_neurons_readable_by_caller : bool;
442
+
443
+ // Only has an effect when include_neurons_readable_by_caller.
444
+ include_empty_neurons_readable_by_caller : opt bool;
445
+
446
+ // When a public neuron is a member of the result set, include it in the
447
+ // full_neurons field (of ListNeuronsResponse). This does not affect which
448
+ // neurons are part of the result set.
449
+ include_public_neurons_in_full_neurons : opt bool;
450
+
442
451
page_number: opt nat64;
443
452
page_size: opt nat64;
444
453
};
445
454
455
+ // Output of the list_neurons method.
446
456
type ListNeuronsResponse = record {
457
+ // Per the NeuronInfo type, this is a redacted view of the neurons in the
458
+ // result set consisting of information that require no special privileges to
459
+ // view.
447
460
neuron_infos : vec record { nat64; NeuronInfo };
461
+
462
+ // If the caller has the necessary special privileges (or the neuron is
463
+ // public, and the request sets include_public_neurons_in_full_neurons to
464
+ // true), then all the information about the neurons in the result set is made
465
+ // available here.
448
466
full_neurons : vec Neuron;
467
+
449
468
total_pages_available: opt nat64;
450
469
};
451
470
@@ -493,6 +512,8 @@ type MakingSnsProposal = record {
493
512
proposer_id : opt NeuronId;
494
513
};
495
514
515
+ // Not to be confused with ManageNeuronRequest. (Yes, this is very structurally
516
+ // similar to that, but not actually exactly equivalent.)
496
517
type ManageNeuron = record {
497
518
id : opt NeuronId;
498
519
command : opt Command;
@@ -518,13 +539,22 @@ type ManageNeuronCommandRequest = variant {
518
539
// KEEP THIS IN SYNC WITH COMMAND!
519
540
};
520
541
542
+ // Parameters of the manage_neuron method.
521
543
type ManageNeuronRequest = record {
522
- id : opt NeuronId;
523
- command : opt ManageNeuronCommandRequest;
544
+ // Which neuron to operate on.
524
545
neuron_id_or_subaccount : opt NeuronIdOrSubaccount;
546
+
547
+ // What operation to perform on the neuron.
548
+ command : opt ManageNeuronCommandRequest;
549
+
550
+ // Deprecated. Use neuron_id_or_subaccount instead.
551
+ id : opt NeuronId;
525
552
};
526
553
554
+ // Output of the manage_neuron method.
527
555
type ManageNeuronResponse = record {
556
+ // Corresponds to the command field in ManageNeuronRequest, which determines
557
+ // what operation was performed.
528
558
command : opt Command_1;
529
559
};
530
560
@@ -730,14 +760,26 @@ type NeuronInFlightCommand = record {
730
760
timestamp : nat64;
731
761
};
732
762
733
- // In general, this is a subset of Neuron.
763
+ // A limit view of Neuron that allows some aspects of all neurons to be read by
764
+ // anyone (i.e. without having to be the neuron's controller nor one of its
765
+ // hotkeys).
766
+ //
767
+ // As such, the meaning of each field in this type is generally the same as the
768
+ // one of the same (or at least similar) name in Neuron.
734
769
type NeuronInfo = record {
735
770
dissolve_delay_seconds : nat64;
736
771
recent_ballots : vec BallotInfo;
737
772
neuron_type : opt int32;
738
773
created_timestamp_seconds : nat64;
739
774
state : int32;
775
+
776
+ // The amount of ICP (and staked maturity) locked in this neuron.
777
+ //
778
+ // This is the foundation of the neuron's voting power.
779
+ //
780
+ // cached_neuron_stake_e8s - neuron_fees_e8s + staked_maturity_e8s_equivalent
740
781
stake_e8s : nat64;
782
+
741
783
joined_community_fund_timestamp_seconds : opt nat64;
742
784
retrieved_at_timestamp_seconds : nat64;
743
785
visibility : opt int32;
@@ -752,6 +794,7 @@ type NeuronInfo = record {
752
794
// Now that this is set to deciding_voting_power, this actually does get
753
795
// zeroed out.
754
796
voting_power : nat64;
797
+
755
798
voting_power_refreshed_timestamp_seconds : opt nat64;
756
799
deciding_voting_power : opt nat64;
757
800
potential_voting_power : opt nat64;
0 commit comments