@dfinity/nns 5.1.2 → 5.2.0-next-2024-07-30
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 +48 -35
- package/dist/candid/genesis_token.did +1 -1
- package/dist/candid/governance.certified.idl.js +145 -21
- package/dist/candid/governance.d.ts +71 -6
- package/dist/candid/governance.did +64 -5
- package/dist/candid/governance.idl.js +145 -21
- package/dist/candid/governance_test.certified.idl.js +145 -21
- package/dist/candid/governance_test.d.ts +71 -6
- package/dist/candid/governance_test.did +64 -5
- package/dist/candid/governance_test.idl.js +145 -21
- package/dist/candid/old_list_neurons_service.certified.idl.d.ts +2 -0
- package/dist/candid/old_list_neurons_service.certified.idl.js +78 -0
- package/dist/candid/sns_wasm.certified.idl.js +3 -0
- package/dist/candid/sns_wasm.d.ts +5 -0
- package/dist/candid/sns_wasm.did +4 -1
- package/dist/candid/sns_wasm.idl.js +3 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +4 -4
- package/dist/esm/chunk-R4CH4PKK.js +2 -0
- package/dist/esm/chunk-R4CH4PKK.js.map +7 -0
- package/dist/esm/chunk-REL225EW.js +19 -0
- package/dist/esm/chunk-REL225EW.js.map +7 -0
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/sns_wasm.canister.js +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +9 -2
- package/dist/types/canisters/governance/response.converters.d.ts +8 -1
- package/dist/types/enums/governance.enums.d.ts +18 -1
- package/dist/types/governance.canister.d.ts +11 -2
- package/dist/types/governance_test.canister.d.ts +2 -1
- package/dist/types/types/governance.options.d.ts +2 -0
- package/dist/types/types/governance_converters.d.ts +43 -1
- package/package.json +7 -7
- package/dist/esm/chunk-AN6DZS5M.js +0 -19
- package/dist/esm/chunk-AN6DZS5M.js.map +0 -7
- package/dist/esm/chunk-RRSEQTKA.js +0 -2
- package/dist/esm/chunk-RRSEQTKA.js.map +0 -7
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// This file was created manually by taking governance.certified.idl.js and
|
|
2
|
+
// removing everything that isn't needed for `list_neurons` and then removing
|
|
3
|
+
// `include_empty_neurons_readable_by_caller` from `ListNeurons`.
|
|
4
|
+
// The Ledger hardware wallet doesn't support the
|
|
5
|
+
// `include_empty_neurons_readable_by_caller` field, even when it's not set, so
|
|
6
|
+
// we use this service for compatibility with the hardware wallet.
|
|
7
|
+
export const idlFactory = ({ IDL }) => {
|
|
8
|
+
const NeuronId = IDL.Record({ id: IDL.Nat64 });
|
|
9
|
+
const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
|
|
10
|
+
const KnownNeuronData = IDL.Record({
|
|
11
|
+
name: IDL.Text,
|
|
12
|
+
description: IDL.Opt(IDL.Text),
|
|
13
|
+
});
|
|
14
|
+
const NeuronStakeTransfer = IDL.Record({
|
|
15
|
+
to_subaccount: IDL.Vec(IDL.Nat8),
|
|
16
|
+
neuron_stake_e8s: IDL.Nat64,
|
|
17
|
+
from: IDL.Opt(IDL.Principal),
|
|
18
|
+
memo: IDL.Nat64,
|
|
19
|
+
from_subaccount: IDL.Vec(IDL.Nat8),
|
|
20
|
+
transfer_timestamp: IDL.Nat64,
|
|
21
|
+
block_height: IDL.Nat64,
|
|
22
|
+
});
|
|
23
|
+
const BallotInfo = IDL.Record({
|
|
24
|
+
vote: IDL.Int32,
|
|
25
|
+
proposal_id: IDL.Opt(NeuronId),
|
|
26
|
+
});
|
|
27
|
+
const DissolveState = IDL.Variant({
|
|
28
|
+
DissolveDelaySeconds: IDL.Nat64,
|
|
29
|
+
WhenDissolvedTimestampSeconds: IDL.Nat64,
|
|
30
|
+
});
|
|
31
|
+
const Neuron = IDL.Record({
|
|
32
|
+
id: IDL.Opt(NeuronId),
|
|
33
|
+
staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
|
|
34
|
+
controller: IDL.Opt(IDL.Principal),
|
|
35
|
+
recent_ballots: IDL.Vec(BallotInfo),
|
|
36
|
+
kyc_verified: IDL.Bool,
|
|
37
|
+
neuron_type: IDL.Opt(IDL.Int32),
|
|
38
|
+
not_for_profit: IDL.Bool,
|
|
39
|
+
maturity_e8s_equivalent: IDL.Nat64,
|
|
40
|
+
cached_neuron_stake_e8s: IDL.Nat64,
|
|
41
|
+
created_timestamp_seconds: IDL.Nat64,
|
|
42
|
+
auto_stake_maturity: IDL.Opt(IDL.Bool),
|
|
43
|
+
aging_since_timestamp_seconds: IDL.Nat64,
|
|
44
|
+
hot_keys: IDL.Vec(IDL.Principal),
|
|
45
|
+
account: IDL.Vec(IDL.Nat8),
|
|
46
|
+
joined_community_fund_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
47
|
+
dissolve_state: IDL.Opt(DissolveState),
|
|
48
|
+
followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
|
|
49
|
+
neuron_fees_e8s: IDL.Nat64,
|
|
50
|
+
transfer: IDL.Opt(NeuronStakeTransfer),
|
|
51
|
+
known_neuron_data: IDL.Opt(KnownNeuronData),
|
|
52
|
+
spawn_at_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
53
|
+
});
|
|
54
|
+
const NeuronInfo = IDL.Record({
|
|
55
|
+
dissolve_delay_seconds: IDL.Nat64,
|
|
56
|
+
recent_ballots: IDL.Vec(BallotInfo),
|
|
57
|
+
neuron_type: IDL.Opt(IDL.Int32),
|
|
58
|
+
created_timestamp_seconds: IDL.Nat64,
|
|
59
|
+
state: IDL.Int32,
|
|
60
|
+
stake_e8s: IDL.Nat64,
|
|
61
|
+
joined_community_fund_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
62
|
+
retrieved_at_timestamp_seconds: IDL.Nat64,
|
|
63
|
+
known_neuron_data: IDL.Opt(KnownNeuronData),
|
|
64
|
+
voting_power: IDL.Nat64,
|
|
65
|
+
age_seconds: IDL.Nat64,
|
|
66
|
+
});
|
|
67
|
+
const ListNeurons = IDL.Record({
|
|
68
|
+
neuron_ids: IDL.Vec(IDL.Nat64),
|
|
69
|
+
include_neurons_readable_by_caller: IDL.Bool,
|
|
70
|
+
});
|
|
71
|
+
const ListNeuronsResponse = IDL.Record({
|
|
72
|
+
neuron_infos: IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInfo)),
|
|
73
|
+
full_neurons: IDL.Vec(Neuron),
|
|
74
|
+
});
|
|
75
|
+
return IDL.Service({
|
|
76
|
+
list_neurons: IDL.Func([ListNeurons], [ListNeuronsResponse], []),
|
|
77
|
+
});
|
|
78
|
+
};
|
|
@@ -44,12 +44,15 @@ export const idlFactory = ({ IDL }) => {
|
|
|
44
44
|
IdealMatchedParticipationFunction
|
|
45
45
|
),
|
|
46
46
|
});
|
|
47
|
+
const Principals = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });
|
|
47
48
|
const CfNeuron = IDL.Record({
|
|
48
49
|
'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
|
|
50
|
+
'hotkeys' : IDL.Opt(Principals),
|
|
49
51
|
'nns_neuron_id' : IDL.Nat64,
|
|
50
52
|
'amount_icp_e8s' : IDL.Nat64,
|
|
51
53
|
});
|
|
52
54
|
const CfParticipant = IDL.Record({
|
|
55
|
+
'controller' : IDL.Opt(IDL.Principal),
|
|
53
56
|
'hotkey_principal' : IDL.Text,
|
|
54
57
|
'cf_neurons' : IDL.Vec(CfNeuron),
|
|
55
58
|
});
|
|
@@ -17,10 +17,12 @@ export interface Canister {
|
|
|
17
17
|
}
|
|
18
18
|
export interface CfNeuron {
|
|
19
19
|
has_created_neuron_recipes: [] | [boolean];
|
|
20
|
+
hotkeys: [] | [Principals];
|
|
20
21
|
nns_neuron_id: bigint;
|
|
21
22
|
amount_icp_e8s: bigint;
|
|
22
23
|
}
|
|
23
24
|
export interface CfParticipant {
|
|
25
|
+
controller: [] | [Principal];
|
|
24
26
|
hotkey_principal: string;
|
|
25
27
|
cf_neurons: Array<CfNeuron>;
|
|
26
28
|
}
|
|
@@ -175,6 +177,9 @@ export interface PrettySnsVersion {
|
|
|
175
177
|
governance_wasm_hash: string;
|
|
176
178
|
index_wasm_hash: string;
|
|
177
179
|
}
|
|
180
|
+
export interface Principals {
|
|
181
|
+
principals: Array<Principal>;
|
|
182
|
+
}
|
|
178
183
|
export type Result = { Error: SnsWasmError } | { Hash: Uint8Array | number[] };
|
|
179
184
|
export type Result_1 = { Ok: Ok } | { Error: SnsWasmError };
|
|
180
185
|
export interface SnsCanisterIds {
|
package/dist/candid/sns_wasm.did
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit 2b109fb9ba (2024-07-25) 'rs/nns/sns-wasm/canister/sns-wasm.did' by import-candid
|
|
2
2
|
type AddWasmRequest = record { hash : blob; wasm : opt SnsWasm };
|
|
3
3
|
type AddWasmResponse = record { result : opt Result };
|
|
4
4
|
type AirdropDistribution = record { airdrop_neurons : vec NeuronDistribution };
|
|
5
5
|
type Canister = record { id : opt principal };
|
|
6
6
|
type CfNeuron = record {
|
|
7
7
|
has_created_neuron_recipes : opt bool;
|
|
8
|
+
hotkeys : opt Principals;
|
|
8
9
|
nns_neuron_id : nat64;
|
|
9
10
|
amount_icp_e8s : nat64;
|
|
10
11
|
};
|
|
11
12
|
type CfParticipant = record {
|
|
13
|
+
controller : opt principal;
|
|
12
14
|
hotkey_principal : text;
|
|
13
15
|
cf_neurons : vec CfNeuron;
|
|
14
16
|
};
|
|
@@ -126,6 +128,7 @@ type PrettySnsVersion = record {
|
|
|
126
128
|
governance_wasm_hash : text;
|
|
127
129
|
index_wasm_hash : text;
|
|
128
130
|
};
|
|
131
|
+
type Principals = record { principals : vec principal };
|
|
129
132
|
type Result = variant { Error : SnsWasmError; Hash : blob };
|
|
130
133
|
type Result_1 = variant { Ok : Ok; Error : SnsWasmError };
|
|
131
134
|
type SnsCanisterIds = record {
|
|
@@ -44,12 +44,15 @@ export const idlFactory = ({ IDL }) => {
|
|
|
44
44
|
IdealMatchedParticipationFunction
|
|
45
45
|
),
|
|
46
46
|
});
|
|
47
|
+
const Principals = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });
|
|
47
48
|
const CfNeuron = IDL.Record({
|
|
48
49
|
'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
|
|
50
|
+
'hotkeys' : IDL.Opt(Principals),
|
|
49
51
|
'nns_neuron_id' : IDL.Nat64,
|
|
50
52
|
'amount_icp_e8s' : IDL.Nat64,
|
|
51
53
|
});
|
|
52
54
|
const CfParticipant = IDL.Record({
|
|
55
|
+
'controller' : IDL.Opt(IDL.Principal),
|
|
53
56
|
'hotkey_principal' : IDL.Text,
|
|
54
57
|
'cf_neurons' : IDL.Vec(CfNeuron),
|
|
55
58
|
});
|