Unable to query individual neurons to get neuron details

I am trying to run the following:

NEURON_ID=...
CANISTER=rrkah-fqaaa-aaaaa-aaaaq-cai
RESULT="$(dfx canister --network=https://ic0.app --no-wallet call $CANISTER get_neuron_info "($NEURON_ID:nat64)" --output=raw)"
didc decode -t "(Result_2)" -d governance.did $RESULT

The governance.did is what I downloaded from Internet Computer Content Validation Bootstrap

The neuron IDs are all from the seed funding. I am unable to find this information via the above, per instructions in Neuron/ICP Instructions for Seed Participants :: Internet Computer.

Is there another way I can check the status of all my seed neurons, given their neuron ID?

This is the error that I get:

       wire_type: table0, expect_type: variant { Ok : Neuron; Err : GovernanceError }
    1: table0 is not a subtype of variant { Ok : Neuron; Err : GovernanceError }
    2: Variant field 17_724: table1 is not a subtype of Neuron
    3: Record field kyc_verified: bool is only in the expected type and is not of opt, reserved or null type

1 Like

You’ll need to use Result_3 in the last command:

didc decode -t "(Result_3)" -d governance.did $RESULT

(The instructions were written for an earlier version of the canister which used Result_2 here).

Alternatively you could also call that method via the candid interface for the canister here, just look for get_neuron_info and enter your neuron id: DFINITY Canister Candid UI
This interface won’t be useable for all the methods on the canister you may want to call, but for get_neuron_info it’ll work fine.

1 Like

Thanks @Ori I was able to resolve the error. Can you help me read the output though? Example, I have

dissolve_delay_seconds = 125_975_855 : nat64

how do I convert this into an integer seconds? Is it just 125,975,855 seconds or around 4 years?

Also, I tried to look at the function get_neuron_info at DFINITY Canister Candid UI but when I enter the neuron ID, I get InputError: Cannot convert 111_111_111_111_111_111 to a BigInt . (I am converting all numbers in this to 1s to preserve the format of my neuron ID but hide the actual ID). Is it expecting a different format?

I ask because the same NEURON_ID I am using above via didc decode is what I am trying to enter above. The first one, via my command line succeeds.

Yes that value’s in seconds, so just a bit of math to get to days:
125975855 / 3600 / 24 = 1,458 days
Or years:
125975855 / 3600 / 24 / 364 = 4 years

For the candid interface try removing the underscores so only digits are used (eg 111111111111111111).

2 Likes

Thanks! Removing the underscores did the trick.

Is there an app or UI I can import the neurons into and interact with them easier?

@Ori do you know which field gives the amount of ICP in the neuron?

The stake_e8s field is the staked amount, divide by 100000000 to get the value in whole ICP.

I believe the stoic wallet has a GUI for seed neuron management, but it’s not airgapped at the moment, it involves you moving your private keys to a networked machine.

You may want to wait for public release of the Ledger hardware wallet support, this would allow safer control on networked machines.

2 Likes