@dfinity/nns 10.4.0 → 11.0.0-next-2025-10-20
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 +8 -8
- package/dist/candid/genesis_token.certified.idl.d.ts +1 -1
- package/dist/candid/genesis_token.certified.idl.js +41 -30
- package/dist/candid/genesis_token.d.ts +11 -3
- package/dist/candid/genesis_token.idl.d.ts +1 -1
- package/dist/candid/genesis_token.idl.js +41 -30
- package/dist/candid/governance.certified.idl.d.ts +1 -1
- package/dist/candid/governance.certified.idl.js +1272 -1304
- package/dist/candid/governance.d.ts +11 -3
- package/dist/candid/governance.idl.d.ts +1 -1
- package/dist/candid/governance.idl.js +1280 -1320
- package/dist/candid/governance_test.certified.idl.d.ts +1 -1
- package/dist/candid/governance_test.certified.idl.js +1273 -1305
- package/dist/candid/governance_test.d.ts +11 -3
- package/dist/candid/governance_test.idl.d.ts +1 -1
- package/dist/candid/governance_test.idl.js +1281 -1321
- package/dist/candid/old_list_neurons_service.certified.idl.js +60 -60
- package/dist/candid/sns_wasm.certified.idl.d.ts +1 -1
- package/dist/candid/sns_wasm.certified.idl.js +230 -224
- package/dist/candid/sns_wasm.d.ts +11 -3
- package/dist/candid/sns_wasm.idl.d.ts +1 -1
- package/dist/candid/sns_wasm.idl.js +230 -224
- package/dist/{types/canisters → canisters}/governance/request.converters.d.ts +2 -2
- package/dist/{types/canisters → canisters}/governance/response.converters.d.ts +2 -2
- package/dist/{types/canisters → canisters}/governance/services.d.ts +1 -1
- package/dist/{types/constants → constants}/canister_ids.d.ts +1 -1
- package/dist/{types/errors → errors}/governance.errors.d.ts +1 -1
- package/dist/{types/genesis_token.canister.d.ts → genesis_token.canister.d.ts} +1 -1
- package/dist/{types/governance.canister.d.ts → governance.canister.d.ts} +2 -2
- package/dist/{types/governance_test.canister.d.ts → governance_test.canister.d.ts} +2 -2
- package/dist/{types/index.d.ts → index.d.ts} +2 -2
- package/dist/index.js +8 -1
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +7 -0
- package/dist/{types/sns_wasm.canister.d.ts → sns_wasm.canister.d.ts} +1 -1
- package/dist/types/{types/governance.options.d.ts → governance.options.d.ts} +2 -2
- package/dist/types/{types/governance_converters.d.ts → governance_converters.d.ts} +2 -2
- package/dist/types/{types/sns_wasm.options.d.ts → sns_wasm.options.d.ts} +1 -1
- package/dist/{types/utils → utils}/account_identifier.utils.d.ts +1 -1
- package/dist/{types/utils → utils}/neurons.utils.d.ts +1 -1
- package/package.json +23 -12
- package/dist/cjs/index.cjs.js +0 -8
- package/dist/cjs/index.cjs.js.map +0 -7
- package/dist/esm/chunk-6RTK3IEW.js +0 -2
- package/dist/esm/chunk-6RTK3IEW.js.map +0 -7
- package/dist/esm/chunk-GJ7FSPCW.js +0 -2
- package/dist/esm/chunk-GJ7FSPCW.js.map +0 -7
- package/dist/esm/chunk-HK4WSMGK.js +0 -8
- package/dist/esm/chunk-HK4WSMGK.js.map +0 -7
- package/dist/esm/chunk-W6BBRGPQ.js +0 -2
- package/dist/esm/chunk-W6BBRGPQ.js.map +0 -7
- package/dist/esm/genesis_token.canister.js +0 -2
- package/dist/esm/genesis_token.canister.js.map +0 -7
- package/dist/esm/governance.canister.js +0 -2
- package/dist/esm/governance.canister.js.map +0 -7
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/sns_wasm.canister.js +0 -2
- package/dist/esm/sns_wasm.canister.js.map +0 -7
- package/dist/index.cjs.js +0 -1
- /package/dist/{types/constants → constants}/constants.d.ts +0 -0
- /package/dist/{types/enums → enums}/governance.enums.d.ts +0 -0
- /package/dist/types/{types/common.d.ts → common.d.ts} +0 -0
|
@@ -1,325 +1,331 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
|
|
5
|
+
// This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
|
|
6
|
+
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
+
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
+
|
|
2
9
|
export const idlFactory = ({ IDL }) => {
|
|
3
10
|
const SnsWasmCanisterInitPayload = IDL.Record({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
allowed_principals: IDL.Vec(IDL.Principal),
|
|
12
|
+
access_controls_enabled: IDL.Bool,
|
|
13
|
+
sns_subnet_ids: IDL.Vec(IDL.Principal),
|
|
7
14
|
});
|
|
8
15
|
const SnsWasm = IDL.Record({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
wasm: IDL.Vec(IDL.Nat8),
|
|
17
|
+
proposal_id: IDL.Opt(IDL.Nat64),
|
|
18
|
+
canister_type: IDL.Int32,
|
|
12
19
|
});
|
|
13
20
|
const AddWasmRequest = IDL.Record({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
hash: IDL.Vec(IDL.Nat8),
|
|
22
|
+
wasm: IDL.Opt(SnsWasm),
|
|
23
|
+
skip_update_latest_version: IDL.Opt(IDL.Bool),
|
|
17
24
|
});
|
|
18
|
-
const SnsWasmError = IDL.Record({
|
|
25
|
+
const SnsWasmError = IDL.Record({ message: IDL.Text });
|
|
19
26
|
const Result = IDL.Variant({
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
Error: SnsWasmError,
|
|
28
|
+
Hash: IDL.Vec(IDL.Nat8),
|
|
22
29
|
});
|
|
23
|
-
const AddWasmResponse = IDL.Record({
|
|
30
|
+
const AddWasmResponse = IDL.Record({ result: IDL.Opt(Result) });
|
|
24
31
|
const NeuronBasketConstructionParameters = IDL.Record({
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
dissolve_delay_interval_seconds: IDL.Nat64,
|
|
33
|
+
count: IDL.Nat64,
|
|
27
34
|
});
|
|
28
|
-
const Canister = IDL.Record({
|
|
29
|
-
const DappCanisters = IDL.Record({
|
|
35
|
+
const Canister = IDL.Record({ id: IDL.Opt(IDL.Principal) });
|
|
36
|
+
const DappCanisters = IDL.Record({ canisters: IDL.Vec(Canister) });
|
|
30
37
|
const LinearScalingCoefficient = IDL.Record({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
slope_numerator: IDL.Opt(IDL.Nat64),
|
|
39
|
+
intercept_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
40
|
+
from_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
41
|
+
slope_denominator: IDL.Opt(IDL.Nat64),
|
|
42
|
+
to_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
36
43
|
});
|
|
37
44
|
const IdealMatchedParticipationFunction = IDL.Record({
|
|
38
|
-
|
|
45
|
+
serialized_representation: IDL.Opt(IDL.Text),
|
|
39
46
|
});
|
|
40
47
|
const NeuronsFundParticipationConstraints = IDL.Record({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
IdealMatchedParticipationFunction
|
|
48
|
+
coefficient_intervals: IDL.Vec(LinearScalingCoefficient),
|
|
49
|
+
max_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
50
|
+
min_direct_participation_threshold_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
51
|
+
ideal_matched_participation_function: IDL.Opt(
|
|
52
|
+
IdealMatchedParticipationFunction,
|
|
46
53
|
),
|
|
47
54
|
});
|
|
48
|
-
const TreasuryDistribution = IDL.Record({
|
|
55
|
+
const TreasuryDistribution = IDL.Record({ total_e8s: IDL.Nat64 });
|
|
49
56
|
const NeuronDistribution = IDL.Record({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
controller: IDL.Opt(IDL.Principal),
|
|
58
|
+
dissolve_delay_seconds: IDL.Nat64,
|
|
59
|
+
memo: IDL.Nat64,
|
|
60
|
+
stake_e8s: IDL.Nat64,
|
|
61
|
+
vesting_period_seconds: IDL.Opt(IDL.Nat64),
|
|
55
62
|
});
|
|
56
63
|
const DeveloperDistribution = IDL.Record({
|
|
57
|
-
|
|
64
|
+
developer_neurons: IDL.Vec(NeuronDistribution),
|
|
58
65
|
});
|
|
59
66
|
const SwapDistribution = IDL.Record({
|
|
60
|
-
|
|
61
|
-
|
|
67
|
+
total_e8s: IDL.Nat64,
|
|
68
|
+
initial_swap_amount_e8s: IDL.Nat64,
|
|
62
69
|
});
|
|
63
70
|
const FractionalDeveloperVotingPower = IDL.Record({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
treasury_distribution: IDL.Opt(TreasuryDistribution),
|
|
72
|
+
developer_distribution: IDL.Opt(DeveloperDistribution),
|
|
73
|
+
swap_distribution: IDL.Opt(SwapDistribution),
|
|
67
74
|
});
|
|
68
75
|
const InitialTokenDistribution = IDL.Variant({
|
|
69
|
-
|
|
76
|
+
FractionalDeveloperVotingPower: FractionalDeveloperVotingPower,
|
|
70
77
|
});
|
|
71
|
-
const Countries = IDL.Record({
|
|
78
|
+
const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
|
|
72
79
|
const SnsInitPayload = IDL.Record({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
NeuronBasketConstructionParameters
|
|
80
|
+
url: IDL.Opt(IDL.Text),
|
|
81
|
+
max_dissolve_delay_seconds: IDL.Opt(IDL.Nat64),
|
|
82
|
+
max_dissolve_delay_bonus_percentage: IDL.Opt(IDL.Nat64),
|
|
83
|
+
nns_proposal_id: IDL.Opt(IDL.Nat64),
|
|
84
|
+
neurons_fund_participation: IDL.Opt(IDL.Bool),
|
|
85
|
+
min_participant_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
86
|
+
neuron_basket_construction_parameters: IDL.Opt(
|
|
87
|
+
NeuronBasketConstructionParameters,
|
|
81
88
|
),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
NeuronsFundParticipationConstraints
|
|
89
|
+
fallback_controller_principal_ids: IDL.Vec(IDL.Text),
|
|
90
|
+
token_symbol: IDL.Opt(IDL.Text),
|
|
91
|
+
final_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
|
|
92
|
+
max_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
93
|
+
neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
|
|
94
|
+
confirmation_text: IDL.Opt(IDL.Text),
|
|
95
|
+
logo: IDL.Opt(IDL.Text),
|
|
96
|
+
name: IDL.Opt(IDL.Text),
|
|
97
|
+
swap_start_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
98
|
+
swap_due_timestamp_seconds: IDL.Opt(IDL.Nat64),
|
|
99
|
+
initial_voting_period_seconds: IDL.Opt(IDL.Nat64),
|
|
100
|
+
neuron_minimum_dissolve_delay_to_vote_seconds: IDL.Opt(IDL.Nat64),
|
|
101
|
+
description: IDL.Opt(IDL.Text),
|
|
102
|
+
max_neuron_age_seconds_for_age_bonus: IDL.Opt(IDL.Nat64),
|
|
103
|
+
min_participants: IDL.Opt(IDL.Nat64),
|
|
104
|
+
initial_reward_rate_basis_points: IDL.Opt(IDL.Nat64),
|
|
105
|
+
wait_for_quiet_deadline_increase_seconds: IDL.Opt(IDL.Nat64),
|
|
106
|
+
transaction_fee_e8s: IDL.Opt(IDL.Nat64),
|
|
107
|
+
dapp_canisters: IDL.Opt(DappCanisters),
|
|
108
|
+
neurons_fund_participation_constraints: IDL.Opt(
|
|
109
|
+
NeuronsFundParticipationConstraints,
|
|
103
110
|
),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
max_age_bonus_percentage: IDL.Opt(IDL.Nat64),
|
|
112
|
+
initial_token_distribution: IDL.Opt(InitialTokenDistribution),
|
|
113
|
+
reward_rate_transition_duration_seconds: IDL.Opt(IDL.Nat64),
|
|
114
|
+
token_logo: IDL.Opt(IDL.Text),
|
|
115
|
+
token_name: IDL.Opt(IDL.Text),
|
|
116
|
+
max_participant_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
117
|
+
min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
118
|
+
proposal_reject_cost_e8s: IDL.Opt(IDL.Nat64),
|
|
119
|
+
restricted_countries: IDL.Opt(Countries),
|
|
120
|
+
min_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
121
|
+
max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
|
|
115
122
|
});
|
|
116
123
|
const DeployNewSnsRequest = IDL.Record({
|
|
117
|
-
|
|
124
|
+
sns_init_payload: IDL.Opt(SnsInitPayload),
|
|
118
125
|
});
|
|
119
126
|
const DappCanistersTransferResult = IDL.Record({
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
restored_dapp_canisters: IDL.Vec(Canister),
|
|
128
|
+
nns_controlled_dapp_canisters: IDL.Vec(Canister),
|
|
129
|
+
sns_controlled_dapp_canisters: IDL.Vec(Canister),
|
|
123
130
|
});
|
|
124
131
|
const SnsCanisterIds = IDL.Record({
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
root: IDL.Opt(IDL.Principal),
|
|
133
|
+
swap: IDL.Opt(IDL.Principal),
|
|
134
|
+
ledger: IDL.Opt(IDL.Principal),
|
|
135
|
+
index: IDL.Opt(IDL.Principal),
|
|
136
|
+
governance: IDL.Opt(IDL.Principal),
|
|
130
137
|
});
|
|
131
138
|
const DeployNewSnsResponse = IDL.Record({
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
dapp_canisters_transfer_result: IDL.Opt(DappCanistersTransferResult),
|
|
140
|
+
subnet_id: IDL.Opt(IDL.Principal),
|
|
141
|
+
error: IDL.Opt(SnsWasmError),
|
|
142
|
+
canisters: IDL.Opt(SnsCanisterIds),
|
|
136
143
|
});
|
|
137
144
|
const GetAllowedPrincipalsResponse = IDL.Record({
|
|
138
|
-
|
|
145
|
+
allowed_principals: IDL.Vec(IDL.Principal),
|
|
139
146
|
});
|
|
140
147
|
const GetDeployedSnsByProposalIdRequest = IDL.Record({
|
|
141
|
-
|
|
148
|
+
proposal_id: IDL.Nat64,
|
|
142
149
|
});
|
|
143
150
|
const DeployedSns = IDL.Record({
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
root_canister_id: IDL.Opt(IDL.Principal),
|
|
152
|
+
governance_canister_id: IDL.Opt(IDL.Principal),
|
|
153
|
+
index_canister_id: IDL.Opt(IDL.Principal),
|
|
154
|
+
swap_canister_id: IDL.Opt(IDL.Principal),
|
|
155
|
+
ledger_canister_id: IDL.Opt(IDL.Principal),
|
|
149
156
|
});
|
|
150
157
|
const GetDeployedSnsByProposalIdResult = IDL.Variant({
|
|
151
|
-
|
|
152
|
-
|
|
158
|
+
Error: SnsWasmError,
|
|
159
|
+
DeployedSns: DeployedSns,
|
|
153
160
|
});
|
|
154
161
|
const GetDeployedSnsByProposalIdResponse = IDL.Record({
|
|
155
|
-
|
|
156
|
-
GetDeployedSnsByProposalIdResult
|
|
162
|
+
get_deployed_sns_by_proposal_id_result: IDL.Opt(
|
|
163
|
+
GetDeployedSnsByProposalIdResult,
|
|
157
164
|
),
|
|
158
165
|
});
|
|
159
166
|
const SnsVersion = IDL.Record({
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
167
|
+
archive_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
168
|
+
root_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
169
|
+
swap_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
170
|
+
ledger_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
171
|
+
governance_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
172
|
+
index_wasm_hash: IDL.Vec(IDL.Nat8),
|
|
166
173
|
});
|
|
167
174
|
const GetNextSnsVersionRequest = IDL.Record({
|
|
168
|
-
|
|
169
|
-
|
|
175
|
+
governance_canister_id: IDL.Opt(IDL.Principal),
|
|
176
|
+
current_version: IDL.Opt(SnsVersion),
|
|
170
177
|
});
|
|
171
178
|
const GetNextSnsVersionResponse = IDL.Record({
|
|
172
|
-
|
|
179
|
+
next_version: IDL.Opt(SnsVersion),
|
|
173
180
|
});
|
|
174
181
|
const GetProposalIdThatAddedWasmRequest = IDL.Record({
|
|
175
|
-
|
|
182
|
+
hash: IDL.Vec(IDL.Nat8),
|
|
176
183
|
});
|
|
177
184
|
const GetProposalIdThatAddedWasmResponse = IDL.Record({
|
|
178
|
-
|
|
185
|
+
proposal_id: IDL.Opt(IDL.Nat64),
|
|
179
186
|
});
|
|
180
187
|
const GetSnsSubnetIdsResponse = IDL.Record({
|
|
181
|
-
|
|
188
|
+
sns_subnet_ids: IDL.Vec(IDL.Principal),
|
|
182
189
|
});
|
|
183
|
-
const GetWasmRequest = IDL.Record({
|
|
184
|
-
const GetWasmResponse = IDL.Record({
|
|
190
|
+
const GetWasmRequest = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
|
|
191
|
+
const GetWasmResponse = IDL.Record({ wasm: IDL.Opt(SnsWasm) });
|
|
185
192
|
const GetWasmMetadataRequest = IDL.Record({
|
|
186
|
-
|
|
193
|
+
hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
187
194
|
});
|
|
188
195
|
const MetadataSection = IDL.Record({
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
196
|
+
contents: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
197
|
+
name: IDL.Opt(IDL.Text),
|
|
198
|
+
visibility: IDL.Opt(IDL.Text),
|
|
192
199
|
});
|
|
193
|
-
const Ok = IDL.Record({
|
|
194
|
-
const Result_1 = IDL.Variant({
|
|
195
|
-
const GetWasmMetadataResponse = IDL.Record({
|
|
200
|
+
const Ok = IDL.Record({ sections: IDL.Vec(MetadataSection) });
|
|
201
|
+
const Result_1 = IDL.Variant({ Ok: Ok, Error: SnsWasmError });
|
|
202
|
+
const GetWasmMetadataResponse = IDL.Record({ result: IDL.Opt(Result_1) });
|
|
196
203
|
const SnsUpgrade = IDL.Record({
|
|
197
|
-
|
|
198
|
-
|
|
204
|
+
next_version: IDL.Opt(SnsVersion),
|
|
205
|
+
current_version: IDL.Opt(SnsVersion),
|
|
199
206
|
});
|
|
200
207
|
const InsertUpgradePathEntriesRequest = IDL.Record({
|
|
201
|
-
|
|
202
|
-
|
|
208
|
+
upgrade_path: IDL.Vec(SnsUpgrade),
|
|
209
|
+
sns_governance_canister_id: IDL.Opt(IDL.Principal),
|
|
203
210
|
});
|
|
204
211
|
const InsertUpgradePathEntriesResponse = IDL.Record({
|
|
205
|
-
|
|
212
|
+
error: IDL.Opt(SnsWasmError),
|
|
206
213
|
});
|
|
207
214
|
const ListDeployedSnsesResponse = IDL.Record({
|
|
208
|
-
|
|
215
|
+
instances: IDL.Vec(DeployedSns),
|
|
209
216
|
});
|
|
210
217
|
const ListUpgradeStepsRequest = IDL.Record({
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
218
|
+
limit: IDL.Nat32,
|
|
219
|
+
starting_at: IDL.Opt(SnsVersion),
|
|
220
|
+
sns_governance_canister_id: IDL.Opt(IDL.Principal),
|
|
214
221
|
});
|
|
215
222
|
const PrettySnsVersion = IDL.Record({
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
223
|
+
archive_wasm_hash: IDL.Text,
|
|
224
|
+
root_wasm_hash: IDL.Text,
|
|
225
|
+
swap_wasm_hash: IDL.Text,
|
|
226
|
+
ledger_wasm_hash: IDL.Text,
|
|
227
|
+
governance_wasm_hash: IDL.Text,
|
|
228
|
+
index_wasm_hash: IDL.Text,
|
|
222
229
|
});
|
|
223
230
|
const ListUpgradeStep = IDL.Record({
|
|
224
|
-
|
|
225
|
-
|
|
231
|
+
pretty_version: IDL.Opt(PrettySnsVersion),
|
|
232
|
+
version: IDL.Opt(SnsVersion),
|
|
226
233
|
});
|
|
227
234
|
const ListUpgradeStepsResponse = IDL.Record({
|
|
228
|
-
|
|
235
|
+
steps: IDL.Vec(ListUpgradeStep),
|
|
229
236
|
});
|
|
230
237
|
const UpdateAllowedPrincipalsRequest = IDL.Record({
|
|
231
|
-
|
|
232
|
-
|
|
238
|
+
added_principals: IDL.Vec(IDL.Principal),
|
|
239
|
+
removed_principals: IDL.Vec(IDL.Principal),
|
|
233
240
|
});
|
|
234
241
|
const UpdateAllowedPrincipalsResult = IDL.Variant({
|
|
235
|
-
|
|
236
|
-
|
|
242
|
+
Error: SnsWasmError,
|
|
243
|
+
AllowedPrincipals: GetAllowedPrincipalsResponse,
|
|
237
244
|
});
|
|
238
245
|
const UpdateAllowedPrincipalsResponse = IDL.Record({
|
|
239
|
-
|
|
246
|
+
update_allowed_principals_result: IDL.Opt(UpdateAllowedPrincipalsResult),
|
|
240
247
|
});
|
|
241
248
|
const UpdateSnsSubnetListRequest = IDL.Record({
|
|
242
|
-
|
|
243
|
-
|
|
249
|
+
sns_subnet_ids_to_add: IDL.Vec(IDL.Principal),
|
|
250
|
+
sns_subnet_ids_to_remove: IDL.Vec(IDL.Principal),
|
|
244
251
|
});
|
|
245
252
|
const UpdateSnsSubnetListResponse = IDL.Record({
|
|
246
|
-
|
|
253
|
+
error: IDL.Opt(SnsWasmError),
|
|
247
254
|
});
|
|
255
|
+
|
|
248
256
|
return IDL.Service({
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
[UpdateSnsSubnetListRequest],
|
|
313
|
-
[UpdateSnsSubnetListResponse],
|
|
314
|
-
[],
|
|
315
|
-
),
|
|
257
|
+
add_wasm: IDL.Func([AddWasmRequest], [AddWasmResponse], []),
|
|
258
|
+
deploy_new_sns: IDL.Func([DeployNewSnsRequest], [DeployNewSnsResponse], []),
|
|
259
|
+
get_allowed_principals: IDL.Func(
|
|
260
|
+
[IDL.Record({})],
|
|
261
|
+
[GetAllowedPrincipalsResponse],
|
|
262
|
+
["query"],
|
|
263
|
+
),
|
|
264
|
+
get_deployed_sns_by_proposal_id: IDL.Func(
|
|
265
|
+
[GetDeployedSnsByProposalIdRequest],
|
|
266
|
+
[GetDeployedSnsByProposalIdResponse],
|
|
267
|
+
["query"],
|
|
268
|
+
),
|
|
269
|
+
get_latest_sns_version_pretty: IDL.Func(
|
|
270
|
+
[IDL.Null],
|
|
271
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
272
|
+
["query"],
|
|
273
|
+
),
|
|
274
|
+
get_next_sns_version: IDL.Func(
|
|
275
|
+
[GetNextSnsVersionRequest],
|
|
276
|
+
[GetNextSnsVersionResponse],
|
|
277
|
+
["query"],
|
|
278
|
+
),
|
|
279
|
+
get_proposal_id_that_added_wasm: IDL.Func(
|
|
280
|
+
[GetProposalIdThatAddedWasmRequest],
|
|
281
|
+
[GetProposalIdThatAddedWasmResponse],
|
|
282
|
+
["query"],
|
|
283
|
+
),
|
|
284
|
+
get_sns_subnet_ids: IDL.Func(
|
|
285
|
+
[IDL.Record({})],
|
|
286
|
+
[GetSnsSubnetIdsResponse],
|
|
287
|
+
["query"],
|
|
288
|
+
),
|
|
289
|
+
get_wasm: IDL.Func([GetWasmRequest], [GetWasmResponse], ["query"]),
|
|
290
|
+
get_wasm_metadata: IDL.Func(
|
|
291
|
+
[GetWasmMetadataRequest],
|
|
292
|
+
[GetWasmMetadataResponse],
|
|
293
|
+
["query"],
|
|
294
|
+
),
|
|
295
|
+
insert_upgrade_path_entries: IDL.Func(
|
|
296
|
+
[InsertUpgradePathEntriesRequest],
|
|
297
|
+
[InsertUpgradePathEntriesResponse],
|
|
298
|
+
[],
|
|
299
|
+
),
|
|
300
|
+
list_deployed_snses: IDL.Func(
|
|
301
|
+
[IDL.Record({})],
|
|
302
|
+
[ListDeployedSnsesResponse],
|
|
303
|
+
["query"],
|
|
304
|
+
),
|
|
305
|
+
list_upgrade_steps: IDL.Func(
|
|
306
|
+
[ListUpgradeStepsRequest],
|
|
307
|
+
[ListUpgradeStepsResponse],
|
|
308
|
+
["query"],
|
|
309
|
+
),
|
|
310
|
+
update_allowed_principals: IDL.Func(
|
|
311
|
+
[UpdateAllowedPrincipalsRequest],
|
|
312
|
+
[UpdateAllowedPrincipalsResponse],
|
|
313
|
+
[],
|
|
314
|
+
),
|
|
315
|
+
update_sns_subnet_list: IDL.Func(
|
|
316
|
+
[UpdateSnsSubnetListRequest],
|
|
317
|
+
[UpdateSnsSubnetListResponse],
|
|
318
|
+
[],
|
|
319
|
+
),
|
|
316
320
|
});
|
|
317
321
|
};
|
|
322
|
+
|
|
318
323
|
export const init = ({ IDL }) => {
|
|
319
324
|
const SnsWasmCanisterInitPayload = IDL.Record({
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
325
|
+
allowed_principals: IDL.Vec(IDL.Principal),
|
|
326
|
+
access_controls_enabled: IDL.Bool,
|
|
327
|
+
sns_subnet_ids: IDL.Vec(IDL.Principal),
|
|
323
328
|
});
|
|
329
|
+
|
|
324
330
|
return [SnsWasmCanisterInitPayload];
|
|
325
331
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AccountIdentifier as AccountIdentifierClass, AccountIdentifierHex } from "@dfinity/ledger-icp";
|
|
2
|
-
import { Principal } from "@
|
|
3
|
-
import type { ListProposalInfo, NeuronSubaccount, AccountIdentifier as RawAccountIdentifier, ManageNeuronCommandRequest as RawCommand, ListNeurons as RawListNeurons, ManageNeuronRequest as RawManageNeuron, Operation as RawOperation } from "
|
|
2
|
+
import { Principal } from "@icp-sdk/core/principal";
|
|
3
|
+
import type { ListProposalInfo, NeuronSubaccount, AccountIdentifier as RawAccountIdentifier, ManageNeuronCommandRequest as RawCommand, ListNeurons as RawListNeurons, ManageNeuronRequest as RawManageNeuron, Operation as RawOperation } from "../../candid/governance";
|
|
4
4
|
import type { NeuronVisibility, Vote } from "../../enums/governance.enums";
|
|
5
5
|
import type { E8s, NeuronId } from "../../types/common";
|
|
6
6
|
import type { Account, ClaimOrRefreshNeuronRequest, DisburseToNeuronRequest, FollowRequest, FolloweesForTopic, ListProposalsRequest, MakeProposalRequest, ManageNeuronRequest, ProposalId } from "../../types/governance_converters";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Principal } from "@
|
|
2
|
-
import type { GovernanceCachedMetrics as RawGovernanceCachedMetrics, KnownNeuron as RawKnownNeuron, ListNeuronsResponse as RawListNeuronsResponse, ListProposalInfoResponse as RawListProposalInfoResponse, NetworkEconomics as RawNetworkEconomics, Neuron as RawNeuron, NeuronInfo as RawNeuronInfo, ProposalInfo as RawProposalInfo } from "
|
|
1
|
+
import { Principal } from "@icp-sdk/core/principal";
|
|
2
|
+
import type { GovernanceCachedMetrics as RawGovernanceCachedMetrics, KnownNeuron as RawKnownNeuron, ListNeuronsResponse as RawListNeuronsResponse, ListProposalInfoResponse as RawListProposalInfoResponse, NetworkEconomics as RawNetworkEconomics, Neuron as RawNeuron, NeuronInfo as RawNeuronInfo, ProposalInfo as RawProposalInfo } from "../../candid/governance";
|
|
3
3
|
import type { GovernanceCachedMetrics, KnownNeuron, ListProposalsResponse, NetworkEconomics, Neuron, NeuronInfo, ProposalInfo } from "../../types/governance_converters";
|
|
4
4
|
export declare const toNeuronInfo: ({ neuronId, neuronInfo, rawNeuron, canisterId, }: {
|
|
5
5
|
neuronId: bigint;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Command_1, _SERVICE as GovernanceService, ManageNeuronRequest, ManageNeuronResponse } from "
|
|
1
|
+
import type { Command_1, _SERVICE as GovernanceService, ManageNeuronRequest, ManageNeuronResponse } from "../../candid/governance";
|
|
2
2
|
/**
|
|
3
3
|
* Checks a Manage Neuron Response for error and returns successful response data.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Principal } from "@
|
|
1
|
+
import { Principal } from "@icp-sdk/core/principal";
|
|
2
2
|
export declare const GOVERNANCE_CANISTER_ID: Principal;
|
|
3
3
|
export declare const MAINNET_GOVERNANCE_CANISTER_ID: Principal;
|
|
4
4
|
export declare const MAINNET_GENESIS_TOKEN_CANISTER_ID: Principal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GovernanceError as GovernanceErrorDetail } from "
|
|
1
|
+
import type { GovernanceError as GovernanceErrorDetail } from "../candid/governance";
|
|
2
2
|
export declare abstract class StakeNeuronError extends Error {
|
|
3
3
|
}
|
|
4
4
|
export declare class CouldNotClaimNeuronError extends StakeNeuronError {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CanisterOptions } from "@dfinity/utils";
|
|
2
|
-
import type { _SERVICE as GenesisTokenService } from "
|
|
2
|
+
import type { _SERVICE as GenesisTokenService } from "./candid/genesis_token";
|
|
3
3
|
import type { NeuronId } from "./types/common";
|
|
4
4
|
export declare class GenesisTokenCanister {
|
|
5
5
|
private readonly service;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AccountIdentifierHex, type LedgerCanister } from "@dfinity/ledger-icp";
|
|
2
|
-
import type { Principal } from "@
|
|
3
|
-
import type { NeuronSubaccount, RewardEvent } from "
|
|
2
|
+
import type { Principal } from "@icp-sdk/core/principal";
|
|
3
|
+
import type { NeuronSubaccount, RewardEvent } from "./candid/governance";
|
|
4
4
|
import type { NeuronVisibility, Vote } from "./enums/governance.enums";
|
|
5
5
|
import type { E8s, NeuronId } from "./types/common";
|
|
6
6
|
import type { GovernanceCanisterOptions } from "./types/governance.options";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CanisterOptions } from "@dfinity/utils";
|
|
2
|
-
import type { _SERVICE as GovernanceService } from "
|
|
2
|
+
import type { _SERVICE as GovernanceService } from "./candid/governance_test";
|
|
3
3
|
import type { Neuron } from "./types/governance_converters";
|
|
4
4
|
export declare class GovernanceTestCanister {
|
|
5
5
|
private readonly canisterId;
|
|
@@ -11,5 +11,5 @@ export declare class GovernanceTestCanister {
|
|
|
11
11
|
*
|
|
12
12
|
* Only available in the governance test canister.
|
|
13
13
|
*/
|
|
14
|
-
updateNeuron(neuron: Neuron): Promise<[] | [import("
|
|
14
|
+
updateNeuron(neuron: Neuron): Promise<[] | [import("./candid/governance_test").GovernanceError]>;
|
|
15
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { RewardEvent } from "
|
|
2
|
-
export type { DeployedSns } from "
|
|
1
|
+
export type { RewardEvent } from "./candid/governance";
|
|
2
|
+
export type { DeployedSns } from "./candid/sns_wasm";
|
|
3
3
|
export * from "./enums/governance.enums";
|
|
4
4
|
export * from "./errors/governance.errors";
|
|
5
5
|
export { GenesisTokenCanister } from "./genesis_token.canister";
|