@dfinity/sns 0.0.1
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/LICENSE +201 -0
- package/README.md +5 -0
- package/dist/candid/ledger.certified.idl.d.ts +2 -0
- package/dist/candid/ledger.certified.idl.js +97 -0
- package/dist/candid/ledger.d.ts +106 -0
- package/dist/candid/ledger.did +250 -0
- package/dist/candid/ledger.idl.d.ts +2 -0
- package/dist/candid/ledger.idl.js +109 -0
- package/dist/candid/sns_governance.certified.idl.d.ts +2 -0
- package/dist/candid/sns_governance.certified.idl.js +596 -0
- package/dist/candid/sns_governance.d.ts +366 -0
- package/dist/candid/sns_governance.did +303 -0
- package/dist/candid/sns_governance.idl.d.ts +2 -0
- package/dist/candid/sns_governance.idl.js +600 -0
- package/dist/candid/sns_root.certified.idl.d.ts +2 -0
- package/dist/candid/sns_root.certified.idl.js +34 -0
- package/dist/candid/sns_root.d.ts +28 -0
- package/dist/candid/sns_root.did +26 -0
- package/dist/candid/sns_root.idl.d.ts +2 -0
- package/dist/candid/sns_root.idl.js +34 -0
- package/dist/candid/sns_swap.certified.idl.d.ts +2 -0
- package/dist/candid/sns_swap.certified.idl.js +110 -0
- package/dist/candid/sns_swap.d.ts +81 -0
- package/dist/candid/sns_swap.did +61 -0
- package/dist/candid/sns_swap.idl.d.ts +2 -0
- package/dist/candid/sns_swap.idl.js +110 -0
- package/dist/cjs/index.cjs.js +853 -0
- package/dist/cjs/index.cjs.js.map +7 -0
- package/dist/esm/chunk-7F6PCBCJ.js +2 -0
- package/dist/esm/chunk-7F6PCBCJ.js.map +7 -0
- package/dist/esm/chunk-A576P2ZR.js +2 -0
- package/dist/esm/chunk-A576P2ZR.js.map +7 -0
- package/dist/esm/chunk-LXL5LYD3.js +2 -0
- package/dist/esm/chunk-LXL5LYD3.js.map +7 -0
- package/dist/esm/chunk-RB6XGLR7.js +2 -0
- package/dist/esm/chunk-RB6XGLR7.js.map +7 -0
- package/dist/esm/chunk-VMVMYL6O.js +840 -0
- package/dist/esm/chunk-VMVMYL6O.js.map +7 -0
- package/dist/esm/chunk-WPRZTZWQ.js +2 -0
- package/dist/esm/chunk-WPRZTZWQ.js.map +7 -0
- package/dist/esm/chunk-YKP66JDM.js +2 -0
- package/dist/esm/chunk-YKP66JDM.js.map +7 -0
- package/dist/esm/chunk-YL4WAPXH.js +2 -0
- package/dist/esm/chunk-YL4WAPXH.js.map +7 -0
- package/dist/esm/governance.canister.js +2 -0
- package/dist/esm/governance.canister.js.map +7 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/ledger.canister.js +2 -0
- package/dist/esm/ledger.canister.js.map +7 -0
- package/dist/esm/root.canister.js +2 -0
- package/dist/esm/root.canister.js.map +7 -0
- package/dist/esm/sns.js +2 -0
- package/dist/esm/sns.js.map +7 -0
- package/dist/esm/sns.wrapper.js +2 -0
- package/dist/esm/sns.wrapper.js.map +7 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/constants/governance.constants.d.ts +6 -0
- package/dist/types/governance.canister.d.ts +13 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/ledger.canister.d.ts +6 -0
- package/dist/types/root.canister.d.ts +22 -0
- package/dist/types/services/canister.d.ts +10 -0
- package/dist/types/sns.d.ts +21 -0
- package/dist/types/sns.wrapper.d.ts +43 -0
- package/dist/types/types/canister.options.d.ts +8 -0
- package/dist/types/types/governance.params.d.ts +14 -0
- package/dist/types/types/query.params.d.ts +7 -0
- package/dist/types/utils/actor.utils.d.ts +14 -0
- package/dist/types/utils/agent.utils.d.ts +5 -0
- package/dist/types/utils/asserts.utils.d.ts +3 -0
- package/dist/types/utils/did.utils.d.ts +1 -0
- package/package.json +40 -0
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_governance.did */
|
|
2
|
+
export const idlFactory = ({ IDL }) => {
|
|
3
|
+
const GenericNervousSystemFunction = IDL.Record({
|
|
4
|
+
'validator_canister_id' : IDL.Opt(IDL.Principal),
|
|
5
|
+
'target_canister_id' : IDL.Opt(IDL.Principal),
|
|
6
|
+
'validator_method_name' : IDL.Opt(IDL.Text),
|
|
7
|
+
'target_method_name' : IDL.Opt(IDL.Text),
|
|
8
|
+
});
|
|
9
|
+
const FunctionType = IDL.Variant({
|
|
10
|
+
'NativeNervousSystemFunction' : IDL.Record({}),
|
|
11
|
+
'GenericNervousSystemFunction' : GenericNervousSystemFunction,
|
|
12
|
+
});
|
|
13
|
+
const NervousSystemFunction = IDL.Record({
|
|
14
|
+
'id' : IDL.Nat64,
|
|
15
|
+
'name' : IDL.Text,
|
|
16
|
+
'description' : IDL.Opt(IDL.Text),
|
|
17
|
+
'function_type' : IDL.Opt(FunctionType),
|
|
18
|
+
});
|
|
19
|
+
const GovernanceCachedMetrics = IDL.Record({
|
|
20
|
+
'not_dissolving_neurons_e8s_buckets' : IDL.Vec(
|
|
21
|
+
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
22
|
+
),
|
|
23
|
+
'garbage_collectable_neurons_count' : IDL.Nat64,
|
|
24
|
+
'neurons_with_invalid_stake_count' : IDL.Nat64,
|
|
25
|
+
'not_dissolving_neurons_count_buckets' : IDL.Vec(
|
|
26
|
+
IDL.Tuple(IDL.Nat64, IDL.Nat64)
|
|
27
|
+
),
|
|
28
|
+
'neurons_with_less_than_6_months_dissolve_delay_count' : IDL.Nat64,
|
|
29
|
+
'dissolved_neurons_count' : IDL.Nat64,
|
|
30
|
+
'total_staked_e8s' : IDL.Nat64,
|
|
31
|
+
'total_supply_governance_tokens' : IDL.Nat64,
|
|
32
|
+
'not_dissolving_neurons_count' : IDL.Nat64,
|
|
33
|
+
'dissolved_neurons_e8s' : IDL.Nat64,
|
|
34
|
+
'neurons_with_less_than_6_months_dissolve_delay_e8s' : IDL.Nat64,
|
|
35
|
+
'dissolving_neurons_count_buckets' : IDL.Vec(
|
|
36
|
+
IDL.Tuple(IDL.Nat64, IDL.Nat64)
|
|
37
|
+
),
|
|
38
|
+
'dissolving_neurons_count' : IDL.Nat64,
|
|
39
|
+
'dissolving_neurons_e8s_buckets' : IDL.Vec(
|
|
40
|
+
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
41
|
+
),
|
|
42
|
+
'timestamp_seconds' : IDL.Nat64,
|
|
43
|
+
});
|
|
44
|
+
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
45
|
+
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
46
|
+
const DefaultFollowees = IDL.Record({
|
|
47
|
+
'followees' : IDL.Vec(IDL.Tuple(IDL.Nat64, Followees)),
|
|
48
|
+
});
|
|
49
|
+
const NeuronPermissionList = IDL.Record({
|
|
50
|
+
'permissions' : IDL.Vec(IDL.Int32),
|
|
51
|
+
});
|
|
52
|
+
const NervousSystemParameters = IDL.Record({
|
|
53
|
+
'default_followees' : IDL.Opt(DefaultFollowees),
|
|
54
|
+
'max_dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
|
|
55
|
+
'max_followees_per_function' : IDL.Opt(IDL.Nat64),
|
|
56
|
+
'neuron_claimer_permissions' : IDL.Opt(NeuronPermissionList),
|
|
57
|
+
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
58
|
+
'initial_voting_period' : IDL.Opt(IDL.Nat64),
|
|
59
|
+
'max_neuron_age_for_age_bonus' : IDL.Opt(IDL.Nat64),
|
|
60
|
+
'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),
|
|
61
|
+
'reject_cost_e8s' : IDL.Opt(IDL.Nat64),
|
|
62
|
+
'max_proposals_to_keep_per_action' : IDL.Opt(IDL.Nat32),
|
|
63
|
+
'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
|
|
64
|
+
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
65
|
+
'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
|
|
66
|
+
'reward_distribution_period_seconds' : IDL.Opt(IDL.Nat64),
|
|
67
|
+
'neuron_grantable_permissions' : IDL.Opt(NeuronPermissionList),
|
|
68
|
+
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
69
|
+
});
|
|
70
|
+
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
71
|
+
const RewardEvent = IDL.Record({
|
|
72
|
+
'actual_timestamp_seconds' : IDL.Nat64,
|
|
73
|
+
'periods_since_genesis' : IDL.Nat64,
|
|
74
|
+
'distributed_e8s_equivalent' : IDL.Nat64,
|
|
75
|
+
'settled_proposals' : IDL.Vec(ProposalId),
|
|
76
|
+
});
|
|
77
|
+
const GovernanceError = IDL.Record({
|
|
78
|
+
'error_message' : IDL.Text,
|
|
79
|
+
'error_type' : IDL.Int32,
|
|
80
|
+
});
|
|
81
|
+
const Ballot = IDL.Record({
|
|
82
|
+
'vote' : IDL.Int32,
|
|
83
|
+
'cast_timestamp_seconds' : IDL.Nat64,
|
|
84
|
+
'voting_power' : IDL.Nat64,
|
|
85
|
+
});
|
|
86
|
+
const Tally = IDL.Record({
|
|
87
|
+
'no' : IDL.Nat64,
|
|
88
|
+
'yes' : IDL.Nat64,
|
|
89
|
+
'total' : IDL.Nat64,
|
|
90
|
+
'timestamp_seconds' : IDL.Nat64,
|
|
91
|
+
});
|
|
92
|
+
const UpgradeSnsControlledCanister = IDL.Record({
|
|
93
|
+
'new_canister_wasm' : IDL.Vec(IDL.Nat8),
|
|
94
|
+
'canister_id' : IDL.Opt(IDL.Principal),
|
|
95
|
+
});
|
|
96
|
+
const ExecuteGenericNervousSystemFunction = IDL.Record({
|
|
97
|
+
'function_id' : IDL.Nat64,
|
|
98
|
+
'payload' : IDL.Vec(IDL.Nat8),
|
|
99
|
+
});
|
|
100
|
+
const Motion = IDL.Record({ 'motion_text' : IDL.Text });
|
|
101
|
+
const Action = IDL.Variant({
|
|
102
|
+
'ManageNervousSystemParameters' : NervousSystemParameters,
|
|
103
|
+
'AddGenericNervousSystemFunction' : NervousSystemFunction,
|
|
104
|
+
'RemoveGenericNervousSystemFunction' : IDL.Nat64,
|
|
105
|
+
'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
|
|
106
|
+
'Unspecified' : IDL.Record({}),
|
|
107
|
+
'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
|
|
108
|
+
'Motion' : Motion,
|
|
109
|
+
});
|
|
110
|
+
const Proposal = IDL.Record({
|
|
111
|
+
'url' : IDL.Text,
|
|
112
|
+
'title' : IDL.Text,
|
|
113
|
+
'action' : IDL.Opt(Action),
|
|
114
|
+
'summary' : IDL.Text,
|
|
115
|
+
});
|
|
116
|
+
const WaitForQuietState = IDL.Record({
|
|
117
|
+
'current_deadline_timestamp_seconds' : IDL.Nat64,
|
|
118
|
+
});
|
|
119
|
+
const ProposalData = IDL.Record({
|
|
120
|
+
'id' : IDL.Opt(ProposalId),
|
|
121
|
+
'payload_text_rendering' : IDL.Opt(IDL.Text),
|
|
122
|
+
'action' : IDL.Nat64,
|
|
123
|
+
'failure_reason' : IDL.Opt(GovernanceError),
|
|
124
|
+
'ballots' : IDL.Vec(IDL.Tuple(IDL.Text, Ballot)),
|
|
125
|
+
'reward_event_round' : IDL.Nat64,
|
|
126
|
+
'failed_timestamp_seconds' : IDL.Nat64,
|
|
127
|
+
'proposal_creation_timestamp_seconds' : IDL.Nat64,
|
|
128
|
+
'reject_cost_e8s' : IDL.Nat64,
|
|
129
|
+
'latest_tally' : IDL.Opt(Tally),
|
|
130
|
+
'decided_timestamp_seconds' : IDL.Nat64,
|
|
131
|
+
'proposal' : IDL.Opt(Proposal),
|
|
132
|
+
'proposer' : IDL.Opt(NeuronId),
|
|
133
|
+
'wait_for_quiet_state' : IDL.Opt(WaitForQuietState),
|
|
134
|
+
'executed_timestamp_seconds' : IDL.Nat64,
|
|
135
|
+
});
|
|
136
|
+
const Split = IDL.Record({ 'memo' : IDL.Nat64, 'amount_e8s' : IDL.Nat64 });
|
|
137
|
+
const Follow = IDL.Record({
|
|
138
|
+
'function_id' : IDL.Nat64,
|
|
139
|
+
'followees' : IDL.Vec(NeuronId),
|
|
140
|
+
});
|
|
141
|
+
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
142
|
+
const DisburseMaturity = IDL.Record({
|
|
143
|
+
'to_account' : IDL.Opt(AccountIdentifier),
|
|
144
|
+
'percentage_to_disburse' : IDL.Nat32,
|
|
145
|
+
});
|
|
146
|
+
const IncreaseDissolveDelay = IDL.Record({
|
|
147
|
+
'additional_dissolve_delay_seconds' : IDL.Nat32,
|
|
148
|
+
});
|
|
149
|
+
const SetDissolveTimestamp = IDL.Record({
|
|
150
|
+
'dissolve_timestamp_seconds' : IDL.Nat64,
|
|
151
|
+
});
|
|
152
|
+
const Operation = IDL.Variant({
|
|
153
|
+
'StopDissolving' : IDL.Record({}),
|
|
154
|
+
'StartDissolving' : IDL.Record({}),
|
|
155
|
+
'IncreaseDissolveDelay' : IncreaseDissolveDelay,
|
|
156
|
+
'SetDissolveTimestamp' : SetDissolveTimestamp,
|
|
157
|
+
});
|
|
158
|
+
const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
|
|
159
|
+
const RegisterVote = IDL.Record({
|
|
160
|
+
'vote' : IDL.Int32,
|
|
161
|
+
'proposal' : IDL.Opt(ProposalId),
|
|
162
|
+
});
|
|
163
|
+
const MemoAndController = IDL.Record({
|
|
164
|
+
'controller' : IDL.Opt(IDL.Principal),
|
|
165
|
+
'memo' : IDL.Nat64,
|
|
166
|
+
});
|
|
167
|
+
const By = IDL.Variant({
|
|
168
|
+
'MemoAndController' : MemoAndController,
|
|
169
|
+
'NeuronId' : IDL.Record({}),
|
|
170
|
+
});
|
|
171
|
+
const ClaimOrRefresh = IDL.Record({ 'by' : IDL.Opt(By) });
|
|
172
|
+
const RemoveNeuronPermissions = IDL.Record({
|
|
173
|
+
'permissions_to_remove' : IDL.Opt(NeuronPermissionList),
|
|
174
|
+
'principal_id' : IDL.Opt(IDL.Principal),
|
|
175
|
+
});
|
|
176
|
+
const AddNeuronPermissions = IDL.Record({
|
|
177
|
+
'permissions_to_add' : IDL.Opt(NeuronPermissionList),
|
|
178
|
+
'principal_id' : IDL.Opt(IDL.Principal),
|
|
179
|
+
});
|
|
180
|
+
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
181
|
+
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
182
|
+
const Disburse = IDL.Record({
|
|
183
|
+
'to_account' : IDL.Opt(AccountIdentifier),
|
|
184
|
+
'amount' : IDL.Opt(Amount),
|
|
185
|
+
});
|
|
186
|
+
const Command_2 = IDL.Variant({
|
|
187
|
+
'Split' : Split,
|
|
188
|
+
'Follow' : Follow,
|
|
189
|
+
'DisburseMaturity' : DisburseMaturity,
|
|
190
|
+
'Configure' : Configure,
|
|
191
|
+
'RegisterVote' : RegisterVote,
|
|
192
|
+
'MakeProposal' : Proposal,
|
|
193
|
+
'ClaimOrRefreshNeuron' : ClaimOrRefresh,
|
|
194
|
+
'RemoveNeuronPermissions' : RemoveNeuronPermissions,
|
|
195
|
+
'AddNeuronPermissions' : AddNeuronPermissions,
|
|
196
|
+
'MergeMaturity' : MergeMaturity,
|
|
197
|
+
'Disburse' : Disburse,
|
|
198
|
+
});
|
|
199
|
+
const NeuronInFlightCommand = IDL.Record({
|
|
200
|
+
'command' : IDL.Opt(Command_2),
|
|
201
|
+
'timestamp' : IDL.Nat64,
|
|
202
|
+
});
|
|
203
|
+
const NeuronPermission = IDL.Record({
|
|
204
|
+
'principal' : IDL.Opt(IDL.Principal),
|
|
205
|
+
'permission_type' : IDL.Vec(IDL.Int32),
|
|
206
|
+
});
|
|
207
|
+
const DissolveState = IDL.Variant({
|
|
208
|
+
'DissolveDelaySeconds' : IDL.Nat64,
|
|
209
|
+
'WhenDissolvedTimestampSeconds' : IDL.Nat64,
|
|
210
|
+
});
|
|
211
|
+
const Neuron = IDL.Record({
|
|
212
|
+
'id' : IDL.Opt(NeuronId),
|
|
213
|
+
'permissions' : IDL.Vec(NeuronPermission),
|
|
214
|
+
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
215
|
+
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
216
|
+
'created_timestamp_seconds' : IDL.Nat64,
|
|
217
|
+
'aging_since_timestamp_seconds' : IDL.Nat64,
|
|
218
|
+
'dissolve_state' : IDL.Opt(DissolveState),
|
|
219
|
+
'followees' : IDL.Vec(IDL.Tuple(IDL.Nat64, Followees)),
|
|
220
|
+
'neuron_fees_e8s' : IDL.Nat64,
|
|
221
|
+
});
|
|
222
|
+
const Governance = IDL.Record({
|
|
223
|
+
'root_canister_id' : IDL.Opt(IDL.Principal),
|
|
224
|
+
'id_to_nervous_system_functions' : IDL.Vec(
|
|
225
|
+
IDL.Tuple(IDL.Nat64, NervousSystemFunction)
|
|
226
|
+
),
|
|
227
|
+
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
228
|
+
'mode' : IDL.Int32,
|
|
229
|
+
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
230
|
+
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
231
|
+
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
232
|
+
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
233
|
+
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
|
|
234
|
+
'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
|
|
235
|
+
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
236
|
+
});
|
|
237
|
+
const GetNeuron = IDL.Record({ 'neuron_id' : IDL.Opt(NeuronId) });
|
|
238
|
+
const Result = IDL.Variant({ 'Error' : GovernanceError, 'Neuron' : Neuron });
|
|
239
|
+
const GetNeuronResponse = IDL.Record({ 'result' : IDL.Opt(Result) });
|
|
240
|
+
const GetProposal = IDL.Record({ 'proposal_id' : IDL.Opt(ProposalId) });
|
|
241
|
+
const Result_1 = IDL.Variant({
|
|
242
|
+
'Error' : GovernanceError,
|
|
243
|
+
'Proposal' : ProposalData,
|
|
244
|
+
});
|
|
245
|
+
const GetProposalResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });
|
|
246
|
+
const CanisterStatusType = IDL.Variant({
|
|
247
|
+
'stopped' : IDL.Null,
|
|
248
|
+
'stopping' : IDL.Null,
|
|
249
|
+
'running' : IDL.Null,
|
|
250
|
+
});
|
|
251
|
+
const DefiniteCanisterSettingsArgs = IDL.Record({
|
|
252
|
+
'controller' : IDL.Principal,
|
|
253
|
+
'freezing_threshold' : IDL.Nat,
|
|
254
|
+
'controllers' : IDL.Vec(IDL.Principal),
|
|
255
|
+
'memory_allocation' : IDL.Nat,
|
|
256
|
+
'compute_allocation' : IDL.Nat,
|
|
257
|
+
});
|
|
258
|
+
const CanisterStatusResultV2 = IDL.Record({
|
|
259
|
+
'controller' : IDL.Principal,
|
|
260
|
+
'status' : CanisterStatusType,
|
|
261
|
+
'freezing_threshold' : IDL.Nat,
|
|
262
|
+
'balance' : IDL.Vec(IDL.Tuple(IDL.Vec(IDL.Nat8), IDL.Nat)),
|
|
263
|
+
'memory_size' : IDL.Nat,
|
|
264
|
+
'cycles' : IDL.Nat,
|
|
265
|
+
'settings' : DefiniteCanisterSettingsArgs,
|
|
266
|
+
'idle_cycles_burned_per_day' : IDL.Nat,
|
|
267
|
+
'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
268
|
+
});
|
|
269
|
+
const ListNervousSystemFunctionsResponse = IDL.Record({
|
|
270
|
+
'reserved_ids' : IDL.Vec(IDL.Nat64),
|
|
271
|
+
'functions' : IDL.Vec(NervousSystemFunction),
|
|
272
|
+
});
|
|
273
|
+
const ListNeurons = IDL.Record({
|
|
274
|
+
'of_principal' : IDL.Opt(IDL.Principal),
|
|
275
|
+
'limit' : IDL.Nat32,
|
|
276
|
+
'start_page_at' : IDL.Opt(NeuronId),
|
|
277
|
+
});
|
|
278
|
+
const ListNeuronsResponse = IDL.Record({ 'neurons' : IDL.Vec(Neuron) });
|
|
279
|
+
const ListProposals = IDL.Record({
|
|
280
|
+
'include_reward_status' : IDL.Vec(IDL.Int32),
|
|
281
|
+
'before_proposal' : IDL.Opt(ProposalId),
|
|
282
|
+
'limit' : IDL.Nat32,
|
|
283
|
+
'exclude_type' : IDL.Vec(IDL.Nat64),
|
|
284
|
+
'include_status' : IDL.Vec(IDL.Int32),
|
|
285
|
+
});
|
|
286
|
+
const ListProposalsResponse = IDL.Record({
|
|
287
|
+
'proposals' : IDL.Vec(ProposalData),
|
|
288
|
+
});
|
|
289
|
+
const Command = IDL.Variant({
|
|
290
|
+
'Split' : Split,
|
|
291
|
+
'Follow' : Follow,
|
|
292
|
+
'DisburseMaturity' : DisburseMaturity,
|
|
293
|
+
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
294
|
+
'Configure' : Configure,
|
|
295
|
+
'RegisterVote' : RegisterVote,
|
|
296
|
+
'MakeProposal' : Proposal,
|
|
297
|
+
'RemoveNeuronPermissions' : RemoveNeuronPermissions,
|
|
298
|
+
'AddNeuronPermissions' : AddNeuronPermissions,
|
|
299
|
+
'MergeMaturity' : MergeMaturity,
|
|
300
|
+
'Disburse' : Disburse,
|
|
301
|
+
});
|
|
302
|
+
const ManageNeuron = IDL.Record({
|
|
303
|
+
'subaccount' : IDL.Vec(IDL.Nat8),
|
|
304
|
+
'command' : IDL.Opt(Command),
|
|
305
|
+
});
|
|
306
|
+
const SplitResponse = IDL.Record({ 'created_neuron_id' : IDL.Opt(NeuronId) });
|
|
307
|
+
const DisburseMaturityResponse = IDL.Record({
|
|
308
|
+
'transfer_block_height' : IDL.Nat64,
|
|
309
|
+
'amount_disbursed_e8s' : IDL.Nat64,
|
|
310
|
+
});
|
|
311
|
+
const ClaimOrRefreshResponse = IDL.Record({
|
|
312
|
+
'refreshed_neuron_id' : IDL.Opt(NeuronId),
|
|
313
|
+
});
|
|
314
|
+
const MergeMaturityResponse = IDL.Record({
|
|
315
|
+
'merged_maturity_e8s' : IDL.Nat64,
|
|
316
|
+
'new_stake_e8s' : IDL.Nat64,
|
|
317
|
+
});
|
|
318
|
+
const DisburseResponse = IDL.Record({ 'transfer_block_height' : IDL.Nat64 });
|
|
319
|
+
const Command_1 = IDL.Variant({
|
|
320
|
+
'Error' : GovernanceError,
|
|
321
|
+
'Split' : SplitResponse,
|
|
322
|
+
'Follow' : IDL.Record({}),
|
|
323
|
+
'DisburseMaturity' : DisburseMaturityResponse,
|
|
324
|
+
'ClaimOrRefresh' : ClaimOrRefreshResponse,
|
|
325
|
+
'Configure' : IDL.Record({}),
|
|
326
|
+
'RegisterVote' : IDL.Record({}),
|
|
327
|
+
'MakeProposal' : GetProposal,
|
|
328
|
+
'RemoveNeuronPermission' : IDL.Record({}),
|
|
329
|
+
'MergeMaturity' : MergeMaturityResponse,
|
|
330
|
+
'Disburse' : DisburseResponse,
|
|
331
|
+
'AddNeuronPermission' : IDL.Record({}),
|
|
332
|
+
});
|
|
333
|
+
const ManageNeuronResponse = IDL.Record({ 'command' : IDL.Opt(Command_1) });
|
|
334
|
+
const SetMode = IDL.Record({ 'mode' : IDL.Int32 });
|
|
335
|
+
return IDL.Service({
|
|
336
|
+
'get_build_metadata' : IDL.Func([], [IDL.Text], ['query']),
|
|
337
|
+
'get_nervous_system_parameters' : IDL.Func(
|
|
338
|
+
[IDL.Null],
|
|
339
|
+
[NervousSystemParameters],
|
|
340
|
+
['query'],
|
|
341
|
+
),
|
|
342
|
+
'get_neuron' : IDL.Func([GetNeuron], [GetNeuronResponse], ['query']),
|
|
343
|
+
'get_proposal' : IDL.Func([GetProposal], [GetProposalResponse], ['query']),
|
|
344
|
+
'get_root_canister_status' : IDL.Func(
|
|
345
|
+
[IDL.Null],
|
|
346
|
+
[CanisterStatusResultV2],
|
|
347
|
+
[],
|
|
348
|
+
),
|
|
349
|
+
'list_nervous_system_functions' : IDL.Func(
|
|
350
|
+
[],
|
|
351
|
+
[ListNervousSystemFunctionsResponse],
|
|
352
|
+
['query'],
|
|
353
|
+
),
|
|
354
|
+
'list_neurons' : IDL.Func([ListNeurons], [ListNeuronsResponse], ['query']),
|
|
355
|
+
'list_proposals' : IDL.Func(
|
|
356
|
+
[ListProposals],
|
|
357
|
+
[ListProposalsResponse],
|
|
358
|
+
['query'],
|
|
359
|
+
),
|
|
360
|
+
'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
|
|
361
|
+
'set_mode' : IDL.Func([SetMode], [IDL.Record({})], []),
|
|
362
|
+
});
|
|
363
|
+
};
|
|
364
|
+
export const init = ({ IDL }) => {
|
|
365
|
+
const GenericNervousSystemFunction = IDL.Record({
|
|
366
|
+
'validator_canister_id' : IDL.Opt(IDL.Principal),
|
|
367
|
+
'target_canister_id' : IDL.Opt(IDL.Principal),
|
|
368
|
+
'validator_method_name' : IDL.Opt(IDL.Text),
|
|
369
|
+
'target_method_name' : IDL.Opt(IDL.Text),
|
|
370
|
+
});
|
|
371
|
+
const FunctionType = IDL.Variant({
|
|
372
|
+
'NativeNervousSystemFunction' : IDL.Record({}),
|
|
373
|
+
'GenericNervousSystemFunction' : GenericNervousSystemFunction,
|
|
374
|
+
});
|
|
375
|
+
const NervousSystemFunction = IDL.Record({
|
|
376
|
+
'id' : IDL.Nat64,
|
|
377
|
+
'name' : IDL.Text,
|
|
378
|
+
'description' : IDL.Opt(IDL.Text),
|
|
379
|
+
'function_type' : IDL.Opt(FunctionType),
|
|
380
|
+
});
|
|
381
|
+
const GovernanceCachedMetrics = IDL.Record({
|
|
382
|
+
'not_dissolving_neurons_e8s_buckets' : IDL.Vec(
|
|
383
|
+
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
384
|
+
),
|
|
385
|
+
'garbage_collectable_neurons_count' : IDL.Nat64,
|
|
386
|
+
'neurons_with_invalid_stake_count' : IDL.Nat64,
|
|
387
|
+
'not_dissolving_neurons_count_buckets' : IDL.Vec(
|
|
388
|
+
IDL.Tuple(IDL.Nat64, IDL.Nat64)
|
|
389
|
+
),
|
|
390
|
+
'neurons_with_less_than_6_months_dissolve_delay_count' : IDL.Nat64,
|
|
391
|
+
'dissolved_neurons_count' : IDL.Nat64,
|
|
392
|
+
'total_staked_e8s' : IDL.Nat64,
|
|
393
|
+
'total_supply_governance_tokens' : IDL.Nat64,
|
|
394
|
+
'not_dissolving_neurons_count' : IDL.Nat64,
|
|
395
|
+
'dissolved_neurons_e8s' : IDL.Nat64,
|
|
396
|
+
'neurons_with_less_than_6_months_dissolve_delay_e8s' : IDL.Nat64,
|
|
397
|
+
'dissolving_neurons_count_buckets' : IDL.Vec(
|
|
398
|
+
IDL.Tuple(IDL.Nat64, IDL.Nat64)
|
|
399
|
+
),
|
|
400
|
+
'dissolving_neurons_count' : IDL.Nat64,
|
|
401
|
+
'dissolving_neurons_e8s_buckets' : IDL.Vec(
|
|
402
|
+
IDL.Tuple(IDL.Nat64, IDL.Float64)
|
|
403
|
+
),
|
|
404
|
+
'timestamp_seconds' : IDL.Nat64,
|
|
405
|
+
});
|
|
406
|
+
const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
|
|
407
|
+
const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
|
|
408
|
+
const DefaultFollowees = IDL.Record({
|
|
409
|
+
'followees' : IDL.Vec(IDL.Tuple(IDL.Nat64, Followees)),
|
|
410
|
+
});
|
|
411
|
+
const NeuronPermissionList = IDL.Record({
|
|
412
|
+
'permissions' : IDL.Vec(IDL.Int32),
|
|
413
|
+
});
|
|
414
|
+
const NervousSystemParameters = IDL.Record({
|
|
415
|
+
'default_followees' : IDL.Opt(DefaultFollowees),
|
|
416
|
+
'max_dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
|
|
417
|
+
'max_followees_per_function' : IDL.Opt(IDL.Nat64),
|
|
418
|
+
'neuron_claimer_permissions' : IDL.Opt(NeuronPermissionList),
|
|
419
|
+
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
420
|
+
'initial_voting_period' : IDL.Opt(IDL.Nat64),
|
|
421
|
+
'max_neuron_age_for_age_bonus' : IDL.Opt(IDL.Nat64),
|
|
422
|
+
'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),
|
|
423
|
+
'reject_cost_e8s' : IDL.Opt(IDL.Nat64),
|
|
424
|
+
'max_proposals_to_keep_per_action' : IDL.Opt(IDL.Nat32),
|
|
425
|
+
'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
|
|
426
|
+
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
427
|
+
'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
|
|
428
|
+
'reward_distribution_period_seconds' : IDL.Opt(IDL.Nat64),
|
|
429
|
+
'neuron_grantable_permissions' : IDL.Opt(NeuronPermissionList),
|
|
430
|
+
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
431
|
+
});
|
|
432
|
+
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
433
|
+
const RewardEvent = IDL.Record({
|
|
434
|
+
'actual_timestamp_seconds' : IDL.Nat64,
|
|
435
|
+
'periods_since_genesis' : IDL.Nat64,
|
|
436
|
+
'distributed_e8s_equivalent' : IDL.Nat64,
|
|
437
|
+
'settled_proposals' : IDL.Vec(ProposalId),
|
|
438
|
+
});
|
|
439
|
+
const GovernanceError = IDL.Record({
|
|
440
|
+
'error_message' : IDL.Text,
|
|
441
|
+
'error_type' : IDL.Int32,
|
|
442
|
+
});
|
|
443
|
+
const Ballot = IDL.Record({
|
|
444
|
+
'vote' : IDL.Int32,
|
|
445
|
+
'cast_timestamp_seconds' : IDL.Nat64,
|
|
446
|
+
'voting_power' : IDL.Nat64,
|
|
447
|
+
});
|
|
448
|
+
const Tally = IDL.Record({
|
|
449
|
+
'no' : IDL.Nat64,
|
|
450
|
+
'yes' : IDL.Nat64,
|
|
451
|
+
'total' : IDL.Nat64,
|
|
452
|
+
'timestamp_seconds' : IDL.Nat64,
|
|
453
|
+
});
|
|
454
|
+
const UpgradeSnsControlledCanister = IDL.Record({
|
|
455
|
+
'new_canister_wasm' : IDL.Vec(IDL.Nat8),
|
|
456
|
+
'canister_id' : IDL.Opt(IDL.Principal),
|
|
457
|
+
});
|
|
458
|
+
const ExecuteGenericNervousSystemFunction = IDL.Record({
|
|
459
|
+
'function_id' : IDL.Nat64,
|
|
460
|
+
'payload' : IDL.Vec(IDL.Nat8),
|
|
461
|
+
});
|
|
462
|
+
const Motion = IDL.Record({ 'motion_text' : IDL.Text });
|
|
463
|
+
const Action = IDL.Variant({
|
|
464
|
+
'ManageNervousSystemParameters' : NervousSystemParameters,
|
|
465
|
+
'AddGenericNervousSystemFunction' : NervousSystemFunction,
|
|
466
|
+
'RemoveGenericNervousSystemFunction' : IDL.Nat64,
|
|
467
|
+
'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
|
|
468
|
+
'Unspecified' : IDL.Record({}),
|
|
469
|
+
'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
|
|
470
|
+
'Motion' : Motion,
|
|
471
|
+
});
|
|
472
|
+
const Proposal = IDL.Record({
|
|
473
|
+
'url' : IDL.Text,
|
|
474
|
+
'title' : IDL.Text,
|
|
475
|
+
'action' : IDL.Opt(Action),
|
|
476
|
+
'summary' : IDL.Text,
|
|
477
|
+
});
|
|
478
|
+
const WaitForQuietState = IDL.Record({
|
|
479
|
+
'current_deadline_timestamp_seconds' : IDL.Nat64,
|
|
480
|
+
});
|
|
481
|
+
const ProposalData = IDL.Record({
|
|
482
|
+
'id' : IDL.Opt(ProposalId),
|
|
483
|
+
'payload_text_rendering' : IDL.Opt(IDL.Text),
|
|
484
|
+
'action' : IDL.Nat64,
|
|
485
|
+
'failure_reason' : IDL.Opt(GovernanceError),
|
|
486
|
+
'ballots' : IDL.Vec(IDL.Tuple(IDL.Text, Ballot)),
|
|
487
|
+
'reward_event_round' : IDL.Nat64,
|
|
488
|
+
'failed_timestamp_seconds' : IDL.Nat64,
|
|
489
|
+
'proposal_creation_timestamp_seconds' : IDL.Nat64,
|
|
490
|
+
'reject_cost_e8s' : IDL.Nat64,
|
|
491
|
+
'latest_tally' : IDL.Opt(Tally),
|
|
492
|
+
'decided_timestamp_seconds' : IDL.Nat64,
|
|
493
|
+
'proposal' : IDL.Opt(Proposal),
|
|
494
|
+
'proposer' : IDL.Opt(NeuronId),
|
|
495
|
+
'wait_for_quiet_state' : IDL.Opt(WaitForQuietState),
|
|
496
|
+
'executed_timestamp_seconds' : IDL.Nat64,
|
|
497
|
+
});
|
|
498
|
+
const Split = IDL.Record({ 'memo' : IDL.Nat64, 'amount_e8s' : IDL.Nat64 });
|
|
499
|
+
const Follow = IDL.Record({
|
|
500
|
+
'function_id' : IDL.Nat64,
|
|
501
|
+
'followees' : IDL.Vec(NeuronId),
|
|
502
|
+
});
|
|
503
|
+
const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
|
|
504
|
+
const DisburseMaturity = IDL.Record({
|
|
505
|
+
'to_account' : IDL.Opt(AccountIdentifier),
|
|
506
|
+
'percentage_to_disburse' : IDL.Nat32,
|
|
507
|
+
});
|
|
508
|
+
const IncreaseDissolveDelay = IDL.Record({
|
|
509
|
+
'additional_dissolve_delay_seconds' : IDL.Nat32,
|
|
510
|
+
});
|
|
511
|
+
const SetDissolveTimestamp = IDL.Record({
|
|
512
|
+
'dissolve_timestamp_seconds' : IDL.Nat64,
|
|
513
|
+
});
|
|
514
|
+
const Operation = IDL.Variant({
|
|
515
|
+
'StopDissolving' : IDL.Record({}),
|
|
516
|
+
'StartDissolving' : IDL.Record({}),
|
|
517
|
+
'IncreaseDissolveDelay' : IncreaseDissolveDelay,
|
|
518
|
+
'SetDissolveTimestamp' : SetDissolveTimestamp,
|
|
519
|
+
});
|
|
520
|
+
const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
|
|
521
|
+
const RegisterVote = IDL.Record({
|
|
522
|
+
'vote' : IDL.Int32,
|
|
523
|
+
'proposal' : IDL.Opt(ProposalId),
|
|
524
|
+
});
|
|
525
|
+
const MemoAndController = IDL.Record({
|
|
526
|
+
'controller' : IDL.Opt(IDL.Principal),
|
|
527
|
+
'memo' : IDL.Nat64,
|
|
528
|
+
});
|
|
529
|
+
const By = IDL.Variant({
|
|
530
|
+
'MemoAndController' : MemoAndController,
|
|
531
|
+
'NeuronId' : IDL.Record({}),
|
|
532
|
+
});
|
|
533
|
+
const ClaimOrRefresh = IDL.Record({ 'by' : IDL.Opt(By) });
|
|
534
|
+
const RemoveNeuronPermissions = IDL.Record({
|
|
535
|
+
'permissions_to_remove' : IDL.Opt(NeuronPermissionList),
|
|
536
|
+
'principal_id' : IDL.Opt(IDL.Principal),
|
|
537
|
+
});
|
|
538
|
+
const AddNeuronPermissions = IDL.Record({
|
|
539
|
+
'permissions_to_add' : IDL.Opt(NeuronPermissionList),
|
|
540
|
+
'principal_id' : IDL.Opt(IDL.Principal),
|
|
541
|
+
});
|
|
542
|
+
const MergeMaturity = IDL.Record({ 'percentage_to_merge' : IDL.Nat32 });
|
|
543
|
+
const Amount = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
544
|
+
const Disburse = IDL.Record({
|
|
545
|
+
'to_account' : IDL.Opt(AccountIdentifier),
|
|
546
|
+
'amount' : IDL.Opt(Amount),
|
|
547
|
+
});
|
|
548
|
+
const Command_2 = IDL.Variant({
|
|
549
|
+
'Split' : Split,
|
|
550
|
+
'Follow' : Follow,
|
|
551
|
+
'DisburseMaturity' : DisburseMaturity,
|
|
552
|
+
'Configure' : Configure,
|
|
553
|
+
'RegisterVote' : RegisterVote,
|
|
554
|
+
'MakeProposal' : Proposal,
|
|
555
|
+
'ClaimOrRefreshNeuron' : ClaimOrRefresh,
|
|
556
|
+
'RemoveNeuronPermissions' : RemoveNeuronPermissions,
|
|
557
|
+
'AddNeuronPermissions' : AddNeuronPermissions,
|
|
558
|
+
'MergeMaturity' : MergeMaturity,
|
|
559
|
+
'Disburse' : Disburse,
|
|
560
|
+
});
|
|
561
|
+
const NeuronInFlightCommand = IDL.Record({
|
|
562
|
+
'command' : IDL.Opt(Command_2),
|
|
563
|
+
'timestamp' : IDL.Nat64,
|
|
564
|
+
});
|
|
565
|
+
const NeuronPermission = IDL.Record({
|
|
566
|
+
'principal' : IDL.Opt(IDL.Principal),
|
|
567
|
+
'permission_type' : IDL.Vec(IDL.Int32),
|
|
568
|
+
});
|
|
569
|
+
const DissolveState = IDL.Variant({
|
|
570
|
+
'DissolveDelaySeconds' : IDL.Nat64,
|
|
571
|
+
'WhenDissolvedTimestampSeconds' : IDL.Nat64,
|
|
572
|
+
});
|
|
573
|
+
const Neuron = IDL.Record({
|
|
574
|
+
'id' : IDL.Opt(NeuronId),
|
|
575
|
+
'permissions' : IDL.Vec(NeuronPermission),
|
|
576
|
+
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
577
|
+
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
578
|
+
'created_timestamp_seconds' : IDL.Nat64,
|
|
579
|
+
'aging_since_timestamp_seconds' : IDL.Nat64,
|
|
580
|
+
'dissolve_state' : IDL.Opt(DissolveState),
|
|
581
|
+
'followees' : IDL.Vec(IDL.Tuple(IDL.Nat64, Followees)),
|
|
582
|
+
'neuron_fees_e8s' : IDL.Nat64,
|
|
583
|
+
});
|
|
584
|
+
const Governance = IDL.Record({
|
|
585
|
+
'root_canister_id' : IDL.Opt(IDL.Principal),
|
|
586
|
+
'id_to_nervous_system_functions' : IDL.Vec(
|
|
587
|
+
IDL.Tuple(IDL.Nat64, NervousSystemFunction)
|
|
588
|
+
),
|
|
589
|
+
'metrics' : IDL.Opt(GovernanceCachedMetrics),
|
|
590
|
+
'mode' : IDL.Int32,
|
|
591
|
+
'parameters' : IDL.Opt(NervousSystemParameters),
|
|
592
|
+
'latest_reward_event' : IDL.Opt(RewardEvent),
|
|
593
|
+
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
594
|
+
'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
|
|
595
|
+
'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
|
|
596
|
+
'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
|
|
597
|
+
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
598
|
+
});
|
|
599
|
+
return [Governance];
|
|
600
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_root.did */
|
|
2
|
+
export const idlFactory = ({ IDL }) => {
|
|
3
|
+
const CanisterStatusType_1 = IDL.Variant({
|
|
4
|
+
'stopped' : IDL.Null,
|
|
5
|
+
'stopping' : IDL.Null,
|
|
6
|
+
'running' : IDL.Null,
|
|
7
|
+
});
|
|
8
|
+
const DefiniteCanisterSettingsArgs = IDL.Record({
|
|
9
|
+
'controller' : IDL.Principal,
|
|
10
|
+
'freezing_threshold' : IDL.Nat,
|
|
11
|
+
'controllers' : IDL.Vec(IDL.Principal),
|
|
12
|
+
'memory_allocation' : IDL.Nat,
|
|
13
|
+
'compute_allocation' : IDL.Nat,
|
|
14
|
+
});
|
|
15
|
+
const CanisterStatusResultV2 = IDL.Record({
|
|
16
|
+
'controller' : IDL.Principal,
|
|
17
|
+
'status' : CanisterStatusType_1,
|
|
18
|
+
'freezing_threshold' : IDL.Nat,
|
|
19
|
+
'balance' : IDL.Vec(IDL.Tuple(IDL.Vec(IDL.Nat8), IDL.Nat)),
|
|
20
|
+
'memory_size' : IDL.Nat,
|
|
21
|
+
'cycles' : IDL.Nat,
|
|
22
|
+
'settings' : DefiniteCanisterSettingsArgs,
|
|
23
|
+
'idle_cycles_burned_per_day' : IDL.Nat,
|
|
24
|
+
'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
25
|
+
});
|
|
26
|
+
return IDL.Service({
|
|
27
|
+
'get_sns_canisters_summary' : IDL.Func(
|
|
28
|
+
[IDL.Vec(IDL.Principal)],
|
|
29
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Principal, CanisterStatusResultV2))],
|
|
30
|
+
[],
|
|
31
|
+
),
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
export const init = ({ IDL }) => { return []; };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Principal } from "@dfinity/principal";
|
|
2
|
+
export interface CanisterStatusResultV2 {
|
|
3
|
+
controller: Principal;
|
|
4
|
+
status: CanisterStatusType_1;
|
|
5
|
+
freezing_threshold: bigint;
|
|
6
|
+
balance: Array<[Array<number>, bigint]>;
|
|
7
|
+
memory_size: bigint;
|
|
8
|
+
cycles: bigint;
|
|
9
|
+
settings: DefiniteCanisterSettingsArgs;
|
|
10
|
+
idle_cycles_burned_per_day: bigint;
|
|
11
|
+
module_hash: [] | [Array<number>];
|
|
12
|
+
}
|
|
13
|
+
export type CanisterStatusType_1 =
|
|
14
|
+
| { stopped: null }
|
|
15
|
+
| { stopping: null }
|
|
16
|
+
| { running: null };
|
|
17
|
+
export interface DefiniteCanisterSettingsArgs {
|
|
18
|
+
controller: Principal;
|
|
19
|
+
freezing_threshold: bigint;
|
|
20
|
+
controllers: Array<Principal>;
|
|
21
|
+
memory_allocation: bigint;
|
|
22
|
+
compute_allocation: bigint;
|
|
23
|
+
}
|
|
24
|
+
export interface _SERVICE {
|
|
25
|
+
get_sns_canisters_summary: (
|
|
26
|
+
arg_0: Array<Principal>
|
|
27
|
+
) => Promise<Array<[string, Principal, CanisterStatusResultV2]>>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Generated from IC repo commit a1080f27696c890c19d7068f668bd062f3787564 'rs/sns/root/canister/root.did' by import-candid
|
|
2
|
+
type CanisterStatusResultV2 = record {
|
|
3
|
+
controller : principal;
|
|
4
|
+
status : CanisterStatusType_1;
|
|
5
|
+
freezing_threshold : nat;
|
|
6
|
+
balance : vec record { vec nat8; nat };
|
|
7
|
+
memory_size : nat;
|
|
8
|
+
cycles : nat;
|
|
9
|
+
settings : DefiniteCanisterSettingsArgs;
|
|
10
|
+
module_hash : opt vec nat8;
|
|
11
|
+
idle_cycles_burned_per_day : nat;
|
|
12
|
+
};
|
|
13
|
+
type CanisterStatusType_1 = variant { stopped; stopping; running };
|
|
14
|
+
type DefiniteCanisterSettingsArgs = record {
|
|
15
|
+
controller : principal;
|
|
16
|
+
freezing_threshold : nat;
|
|
17
|
+
controllers : vec principal;
|
|
18
|
+
memory_allocation : nat;
|
|
19
|
+
compute_allocation : nat;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
service : {
|
|
23
|
+
get_sns_canisters_summary : (vec principal) -> (
|
|
24
|
+
vec record { text; principal; CanisterStatusResultV2 },
|
|
25
|
+
);
|
|
26
|
+
}
|