@airgap/icp 0.13.15-beta.0 → 0.13.15-beta.2

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.
Files changed (86) hide show
  1. package/package.json +8 -6
  2. package/v1/block-explorer/ICPBlockExplorer.js +16 -51
  3. package/v1/block-explorer/ICPBlockExplorer.js.map +1 -1
  4. package/v1/index.d.ts +2 -2
  5. package/v1/index.js +7 -5
  6. package/v1/index.js.map +1 -1
  7. package/v1/module/ICPModule.js +53 -94
  8. package/v1/module/ICPModule.js.map +1 -1
  9. package/v1/module.js +1 -1
  10. package/v1/module.js.map +1 -1
  11. package/v1/protocol/ICPGovernance.d.ts +38 -0
  12. package/v1/protocol/ICPGovernance.js +748 -0
  13. package/v1/protocol/ICPGovernance.js.map +1 -0
  14. package/v1/protocol/ICPImplementation.d.ts +27 -5
  15. package/v1/protocol/ICPImplementation.js +368 -250
  16. package/v1/protocol/ICPImplementation.js.map +1 -1
  17. package/v1/protocol/ICPProtocol.d.ts +29 -4
  18. package/v1/protocol/ICPProtocol.js +507 -320
  19. package/v1/protocol/ICPProtocol.js.map +1 -1
  20. package/v1/protocol/icrc/CkBTCProtocol.js +137 -223
  21. package/v1/protocol/icrc/CkBTCProtocol.js.map +1 -1
  22. package/v1/protocol/icrc/ICRC1Protocol.js +338 -553
  23. package/v1/protocol/icrc/ICRC1Protocol.js.map +1 -1
  24. package/v1/serializer/v3/schemas/converter/transaction-converter.js +17 -4
  25. package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
  26. package/v1/serializer/v3/schemas/generated/transaction-sign-request-icp.json +35 -6
  27. package/v1/serializer/v3/serializer-companion.js +86 -144
  28. package/v1/serializer/v3/serializer-companion.js.map +1 -1
  29. package/v1/serializer/v3/validators/transaction-validator.js +22 -60
  30. package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
  31. package/v1/serializer/v3/validators/validators.js +19 -58
  32. package/v1/serializer/v3/validators/validators.js.map +1 -1
  33. package/v1/types/governance.d.ts +2 -0
  34. package/v1/types/governance.js +268 -210
  35. package/v1/types/governance.js.map +1 -1
  36. package/v1/types/icrc/ledger.js +22 -23
  37. package/v1/types/icrc/ledger.js.map +1 -1
  38. package/v1/types/ledger.d.ts +1 -0
  39. package/v1/types/ledger.js +37 -38
  40. package/v1/types/ledger.js.map +1 -1
  41. package/v1/types/management_idl.js +6 -7
  42. package/v1/types/management_idl.js.map +1 -1
  43. package/v1/types/protocol.d.ts +1 -0
  44. package/v1/types/transaction.d.ts +21 -3
  45. package/v1/types/transaction.js +28 -0
  46. package/v1/types/transaction.js.map +1 -1
  47. package/v1/utils/account.js +42 -70
  48. package/v1/utils/account.js.map +1 -1
  49. package/v1/utils/actor.js +139 -322
  50. package/v1/utils/actor.js.map +1 -1
  51. package/v1/utils/auth.js +44 -134
  52. package/v1/utils/auth.js.map +1 -1
  53. package/v1/utils/bls.js +41 -109
  54. package/v1/utils/bls.js.map +1 -1
  55. package/v1/utils/buffer.js +47 -111
  56. package/v1/utils/buffer.js.map +1 -1
  57. package/v1/utils/cbor.js +50 -85
  58. package/v1/utils/cbor.js.map +1 -1
  59. package/v1/utils/certificate.js +116 -238
  60. package/v1/utils/certificate.js.map +1 -1
  61. package/v1/utils/convert.d.ts +1 -1
  62. package/v1/utils/convert.js +29 -49
  63. package/v1/utils/convert.js.map +1 -1
  64. package/v1/utils/der.js +37 -35
  65. package/v1/utils/der.js.map +1 -1
  66. package/v1/utils/errors.js +10 -30
  67. package/v1/utils/errors.js.map +1 -1
  68. package/v1/utils/hdkey.js +33 -33
  69. package/v1/utils/hdkey.js.map +1 -1
  70. package/v1/utils/http.d.ts +1 -1
  71. package/v1/utils/http.js +202 -426
  72. package/v1/utils/http.js.map +1 -1
  73. package/v1/utils/icrc1.js +24 -41
  74. package/v1/utils/icrc1.js.map +1 -1
  75. package/v1/utils/idl.js +780 -1159
  76. package/v1/utils/idl.js.map +1 -1
  77. package/v1/utils/leb128.js +29 -30
  78. package/v1/utils/leb128.js.map +1 -1
  79. package/v1/utils/polling.js +84 -234
  80. package/v1/utils/polling.js.map +1 -1
  81. package/v1/utils/principal.js +78 -126
  82. package/v1/utils/principal.js.map +1 -1
  83. package/v1/utils/secp256k1.js +68 -134
  84. package/v1/utils/secp256k1.js.map +1 -1
  85. package/v1/utils/transaction.js +7 -7
  86. package/v1/utils/transaction.js.map +1 -1
@@ -1,74 +1,77 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.init = exports.idlFactory = void 0;
4
- // export interface _SERVICE {
5
- // claim_gtc_neurons: ActorMethod<[Principal, Array<NeuronId>], Result>;
6
- // claim_or_refresh_neuron_from_account: ActorMethod<
7
- // [ClaimOrRefreshNeuronFromAccount],
8
- // ClaimOrRefreshNeuronFromAccountResponse
9
- // >;
10
- // get_build_metadata: ActorMethod<[], string>;
11
- // get_full_neuron: ActorMethod<[bigint], Result_2>;
12
- // get_full_neuron_by_id_or_subaccount: ActorMethod<
13
- // [NeuronIdOrSubaccount],
14
- // Result_2
15
- // >;
16
- // get_monthly_node_provider_rewards: ActorMethod<[], Result_3>;
17
- // get_most_recent_monthly_node_provider_rewards: ActorMethod<
18
- // [],
19
- // [] | [MostRecentMonthlyNodeProviderRewards]
20
- // >;
21
- // get_network_economics_parameters: ActorMethod<[], NetworkEconomics>;
22
- // get_neuron_ids: ActorMethod<[], BigUint64Array>;
23
- // get_neuron_info: ActorMethod<[bigint], Result_4>;
24
- // get_neuron_info_by_id_or_subaccount: ActorMethod<
25
- // [NeuronIdOrSubaccount],
26
- // Result_4
27
- // >;
28
- // get_node_provider_by_caller: ActorMethod<[null], Result_5>;
29
- // get_pending_proposals: ActorMethod<[], Array<ProposalInfo>>;
30
- // get_proposal_info: ActorMethod<[bigint], [] | [ProposalInfo]>;
31
- // list_known_neurons: ActorMethod<[], ListKnownNeuronsResponse>;
32
- // list_neurons: ActorMethod<[ListNeurons], ListNeuronsResponse>;
33
- // list_node_providers: ActorMethod<[], ListNodeProvidersResponse>;
34
- // list_proposals: ActorMethod<[ListProposalInfo], ListProposalInfoResponse>;
35
- // manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
36
- // settle_community_fund_participation: ActorMethod<
37
- // [SettleCommunityFundParticipation],
38
- // Result
39
- // >;
40
- // transfer_gtc_neuron: ActorMethod<[NeuronId, NeuronId], Result>;
41
- // update_node_provider: ActorMethod<[UpdateNodeProvider], Result>;
42
- // }
43
- /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/governance.did */
44
- var idlFactory = function (_a) {
45
- var IDL = _a.IDL;
46
- var Proposal = IDL.Rec();
47
- var NeuronId = IDL.Record({ id: IDL.Nat64 });
48
- var Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
49
- var AccountIdentifier = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
50
- var NodeProvider = IDL.Record({
26
+ exports.ListNeurons = exports.init = exports.idlFactory = void 0;
27
+ const IDL = __importStar(require("../utils/idl"));
28
+ const idlFactory = ({ IDL }) => {
29
+ const Proposal = IDL.Rec();
30
+ const NeuronId = IDL.Record({ id: IDL.Nat64 });
31
+ const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
32
+ const AccountIdentifier = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
33
+ const NodeProvider = IDL.Record({
51
34
  id: IDL.Opt(IDL.Principal),
52
35
  reward_account: IDL.Opt(AccountIdentifier)
53
36
  });
54
- var RewardToNeuron = IDL.Record({ dissolve_delay_seconds: IDL.Nat64 });
55
- var RewardToAccount = IDL.Record({
37
+ const RewardToNeuron = IDL.Record({ dissolve_delay_seconds: IDL.Nat64 });
38
+ const RewardToAccount = IDL.Record({
56
39
  to_account: IDL.Opt(AccountIdentifier)
57
40
  });
58
- var RewardMode = IDL.Variant({
41
+ const RewardMode = IDL.Variant({
59
42
  RewardToNeuron: RewardToNeuron,
60
43
  RewardToAccount: RewardToAccount
61
44
  });
62
- var RewardNodeProvider = IDL.Record({
45
+ const RewardNodeProvider = IDL.Record({
63
46
  node_provider: IDL.Opt(NodeProvider),
64
47
  reward_mode: IDL.Opt(RewardMode),
65
48
  amount_e8s: IDL.Nat64
66
49
  });
67
- var MostRecentMonthlyNodeProviderRewards = IDL.Record({
50
+ const MostRecentMonthlyNodeProviderRewards = IDL.Record({
68
51
  timestamp: IDL.Nat64,
69
52
  rewards: IDL.Vec(RewardNodeProvider)
70
53
  });
71
- var NetworkEconomics = IDL.Record({
54
+ const GovernanceCachedMetrics = IDL.Record({
55
+ not_dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
56
+ garbage_collectable_neurons_count: IDL.Nat64,
57
+ neurons_with_invalid_stake_count: IDL.Nat64,
58
+ not_dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
59
+ total_supply_icp: IDL.Nat64,
60
+ neurons_with_less_than_6_months_dissolve_delay_count: IDL.Nat64,
61
+ dissolved_neurons_count: IDL.Nat64,
62
+ community_fund_total_maturity_e8s_equivalent: IDL.Nat64,
63
+ total_staked_e8s: IDL.Nat64,
64
+ not_dissolving_neurons_count: IDL.Nat64,
65
+ total_locked_e8s: IDL.Nat64,
66
+ dissolved_neurons_e8s: IDL.Nat64,
67
+ neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
68
+ dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
69
+ dissolving_neurons_count: IDL.Nat64,
70
+ dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
71
+ community_fund_total_staked_e8s: IDL.Nat64,
72
+ timestamp_seconds: IDL.Nat64
73
+ });
74
+ const NetworkEconomics = IDL.Record({
72
75
  neuron_minimum_stake_e8s: IDL.Nat64,
73
76
  max_proposals_to_keep_per_topic: IDL.Nat32,
74
77
  neuron_management_fee_per_proposal_e8s: IDL.Nat64,
@@ -78,7 +81,7 @@ var idlFactory = function (_a) {
78
81
  minimum_icp_xdr_rate: IDL.Nat64,
79
82
  maximum_node_provider_rewards_e8s: IDL.Nat64
80
83
  });
81
- var NeuronStakeTransfer = IDL.Record({
84
+ const NeuronStakeTransfer = IDL.Record({
82
85
  to_subaccount: IDL.Vec(IDL.Nat8),
83
86
  neuron_stake_e8s: IDL.Nat64,
84
87
  from: IDL.Opt(IDL.Principal),
@@ -87,59 +90,85 @@ var idlFactory = function (_a) {
87
90
  transfer_timestamp: IDL.Nat64,
88
91
  block_height: IDL.Nat64
89
92
  });
90
- var GovernanceError = IDL.Record({
93
+ const GovernanceError = IDL.Record({
91
94
  error_message: IDL.Text,
92
95
  error_type: IDL.Int32
93
96
  });
94
- var Ballot = IDL.Record({ vote: IDL.Int32, voting_power: IDL.Nat64 });
95
- var Tally = IDL.Record({
97
+ const Ballot = IDL.Record({ vote: IDL.Int32, voting_power: IDL.Nat64 });
98
+ const CanisterStatusResultV2 = IDL.Record({
99
+ status: IDL.Opt(IDL.Int32),
100
+ freezing_threshold: IDL.Opt(IDL.Nat64),
101
+ controllers: IDL.Vec(IDL.Principal),
102
+ memory_size: IDL.Opt(IDL.Nat64),
103
+ cycles: IDL.Opt(IDL.Nat64),
104
+ idle_cycles_burned_per_day: IDL.Opt(IDL.Nat64),
105
+ module_hash: IDL.Vec(IDL.Nat8)
106
+ });
107
+ const CanisterSummary = IDL.Record({
108
+ status: IDL.Opt(CanisterStatusResultV2),
109
+ canister_id: IDL.Opt(IDL.Principal)
110
+ });
111
+ const SwapBackgroundInformation = IDL.Record({
112
+ ledger_index_canister_summary: IDL.Opt(CanisterSummary),
113
+ fallback_controller_principal_ids: IDL.Vec(IDL.Principal),
114
+ ledger_archive_canister_summaries: IDL.Vec(CanisterSummary),
115
+ ledger_canister_summary: IDL.Opt(CanisterSummary),
116
+ swap_canister_summary: IDL.Opt(CanisterSummary),
117
+ governance_canister_summary: IDL.Opt(CanisterSummary),
118
+ root_canister_summary: IDL.Opt(CanisterSummary),
119
+ dapp_canister_summaries: IDL.Vec(CanisterSummary)
120
+ });
121
+ const DerivedProposalInformation = IDL.Record({
122
+ swap_background_information: IDL.Opt(SwapBackgroundInformation)
123
+ });
124
+ const Tally = IDL.Record({
96
125
  no: IDL.Nat64,
97
126
  yes: IDL.Nat64,
98
127
  total: IDL.Nat64,
99
128
  timestamp_seconds: IDL.Nat64
100
129
  });
101
- var KnownNeuronData = IDL.Record({
130
+ const KnownNeuronData = IDL.Record({
102
131
  name: IDL.Text,
103
132
  description: IDL.Opt(IDL.Text)
104
133
  });
105
- var KnownNeuron = IDL.Record({
134
+ const KnownNeuron = IDL.Record({
106
135
  id: IDL.Opt(NeuronId),
107
136
  known_neuron_data: IDL.Opt(KnownNeuronData)
108
137
  });
109
- var Spawn = IDL.Record({
138
+ const Spawn = IDL.Record({
110
139
  percentage_to_spawn: IDL.Opt(IDL.Nat32),
111
140
  new_controller: IDL.Opt(IDL.Principal),
112
141
  nonce: IDL.Opt(IDL.Nat64)
113
142
  });
114
- var Split = IDL.Record({ amount_e8s: IDL.Nat64 });
115
- var Follow = IDL.Record({
143
+ const Split = IDL.Record({ amount_e8s: IDL.Nat64 });
144
+ const Follow = IDL.Record({
116
145
  topic: IDL.Int32,
117
146
  followees: IDL.Vec(NeuronId)
118
147
  });
119
- var ClaimOrRefreshNeuronFromAccount = IDL.Record({
148
+ const ClaimOrRefreshNeuronFromAccount = IDL.Record({
120
149
  controller: IDL.Opt(IDL.Principal),
121
150
  memo: IDL.Nat64
122
151
  });
123
- var By = IDL.Variant({
152
+ const By = IDL.Variant({
124
153
  NeuronIdOrSubaccount: IDL.Record({}),
125
154
  MemoAndController: ClaimOrRefreshNeuronFromAccount,
126
155
  Memo: IDL.Nat64
127
156
  });
128
- var ClaimOrRefresh = IDL.Record({ by: IDL.Opt(By) });
129
- var RemoveHotKey = IDL.Record({
157
+ const ClaimOrRefresh = IDL.Record({ by: IDL.Opt(By) });
158
+ const RemoveHotKey = IDL.Record({
130
159
  hot_key_to_remove: IDL.Opt(IDL.Principal)
131
160
  });
132
- var AddHotKey = IDL.Record({ new_hot_key: IDL.Opt(IDL.Principal) });
133
- var ChangeAutoStakeMaturity = IDL.Record({
161
+ const AddHotKey = IDL.Record({ new_hot_key: IDL.Opt(IDL.Principal) });
162
+ const ChangeAutoStakeMaturity = IDL.Record({
134
163
  requested_setting_for_auto_stake_maturity: IDL.Bool
135
164
  });
136
- var IncreaseDissolveDelay = IDL.Record({
165
+ const IncreaseDissolveDelay = IDL.Record({
137
166
  additional_dissolve_delay_seconds: IDL.Nat32
138
167
  });
139
- var SetDissolveTimestamp = IDL.Record({
168
+ const SetDissolveTimestamp = IDL.Record({
140
169
  dissolve_timestamp_seconds: IDL.Nat64
141
170
  });
142
- var Operation = IDL.Variant({
171
+ const Operation = IDL.Variant({
143
172
  RemoveHotKey: RemoveHotKey,
144
173
  AddHotKey: AddHotKey,
145
174
  ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
@@ -150,29 +179,29 @@ var idlFactory = function (_a) {
150
179
  LeaveCommunityFund: IDL.Record({}),
151
180
  SetDissolveTimestamp: SetDissolveTimestamp
152
181
  });
153
- var Configure = IDL.Record({ operation: IDL.Opt(Operation) });
154
- var RegisterVote = IDL.Record({
182
+ const Configure = IDL.Record({ operation: IDL.Opt(Operation) });
183
+ const RegisterVote = IDL.Record({
155
184
  vote: IDL.Int32,
156
185
  proposal: IDL.Opt(NeuronId)
157
186
  });
158
- var Merge = IDL.Record({ source_neuron_id: IDL.Opt(NeuronId) });
159
- var DisburseToNeuron = IDL.Record({
187
+ const Merge = IDL.Record({ source_neuron_id: IDL.Opt(NeuronId) });
188
+ const DisburseToNeuron = IDL.Record({
160
189
  dissolve_delay_seconds: IDL.Nat64,
161
190
  kyc_verified: IDL.Bool,
162
191
  amount_e8s: IDL.Nat64,
163
192
  new_controller: IDL.Opt(IDL.Principal),
164
193
  nonce: IDL.Nat64
165
194
  });
166
- var StakeMaturity = IDL.Record({
195
+ const StakeMaturity = IDL.Record({
167
196
  percentage_to_stake: IDL.Opt(IDL.Nat32)
168
197
  });
169
- var MergeMaturity = IDL.Record({ percentage_to_merge: IDL.Nat32 });
170
- var Amount = IDL.Record({ e8s: IDL.Nat64 });
171
- var Disburse = IDL.Record({
198
+ const MergeMaturity = IDL.Record({ percentage_to_merge: IDL.Nat32 });
199
+ const Amount = IDL.Record({ e8s: IDL.Nat64 });
200
+ const Disburse = IDL.Record({
172
201
  to_account: IDL.Opt(AccountIdentifier),
173
202
  amount: IDL.Opt(Amount)
174
203
  });
175
- var Command = IDL.Variant({
204
+ const Command = IDL.Variant({
176
205
  Spawn: Spawn,
177
206
  Split: Split,
178
207
  Follow: Follow,
@@ -186,66 +215,67 @@ var idlFactory = function (_a) {
186
215
  MergeMaturity: MergeMaturity,
187
216
  Disburse: Disburse
188
217
  });
189
- var NeuronIdOrSubaccount = IDL.Variant({
218
+ const NeuronIdOrSubaccount = IDL.Variant({
190
219
  Subaccount: IDL.Vec(IDL.Nat8),
191
220
  NeuronId: NeuronId
192
221
  });
193
- var ManageNeuron = IDL.Record({
222
+ const ManageNeuron = IDL.Record({
194
223
  id: IDL.Opt(NeuronId),
195
224
  command: IDL.Opt(Command),
196
225
  neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount)
197
226
  });
198
- var ExecuteNnsFunction = IDL.Record({
227
+ const ExecuteNnsFunction = IDL.Record({
199
228
  nns_function: IDL.Int32,
200
229
  payload: IDL.Vec(IDL.Nat8)
201
230
  });
202
- var NeuronBasketConstructionParameters = IDL.Record({
231
+ const NeuronBasketConstructionParameters = IDL.Record({
203
232
  dissolve_delay_interval_seconds: IDL.Nat64,
204
233
  count: IDL.Nat64
205
234
  });
206
- var Params = IDL.Record({
235
+ const Params = IDL.Record({
207
236
  min_participant_icp_e8s: IDL.Nat64,
208
237
  neuron_basket_construction_parameters: IDL.Opt(NeuronBasketConstructionParameters),
209
238
  max_icp_e8s: IDL.Nat64,
210
239
  swap_due_timestamp_seconds: IDL.Nat64,
211
240
  min_participants: IDL.Nat32,
212
241
  sns_token_e8s: IDL.Nat64,
242
+ sale_delay_seconds: IDL.Opt(IDL.Nat64),
213
243
  max_participant_icp_e8s: IDL.Nat64,
214
244
  min_icp_e8s: IDL.Nat64
215
245
  });
216
- var OpenSnsTokenSwap = IDL.Record({
246
+ const OpenSnsTokenSwap = IDL.Record({
217
247
  community_fund_investment_e8s: IDL.Opt(IDL.Nat64),
218
248
  target_swap_canister_id: IDL.Opt(IDL.Principal),
219
249
  params: IDL.Opt(Params)
220
250
  });
221
- var TimeWindow = IDL.Record({
251
+ const TimeWindow = IDL.Record({
222
252
  start_timestamp_seconds: IDL.Nat64,
223
253
  end_timestamp_seconds: IDL.Nat64
224
254
  });
225
- var SetOpenTimeWindowRequest = IDL.Record({
255
+ const SetOpenTimeWindowRequest = IDL.Record({
226
256
  open_time_window: IDL.Opt(TimeWindow)
227
257
  });
228
- var SetSnsTokenSwapOpenTimeWindow = IDL.Record({
258
+ const SetSnsTokenSwapOpenTimeWindow = IDL.Record({
229
259
  request: IDL.Opt(SetOpenTimeWindowRequest),
230
260
  swap_canister_id: IDL.Opt(IDL.Principal)
231
261
  });
232
- var SetDefaultFollowees = IDL.Record({
262
+ const SetDefaultFollowees = IDL.Record({
233
263
  default_followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees))
234
264
  });
235
- var RewardNodeProviders = IDL.Record({
265
+ const RewardNodeProviders = IDL.Record({
236
266
  use_registry_derived_rewards: IDL.Opt(IDL.Bool),
237
267
  rewards: IDL.Vec(RewardNodeProvider)
238
268
  });
239
- var ApproveGenesisKyc = IDL.Record({
269
+ const ApproveGenesisKyc = IDL.Record({
240
270
  principals: IDL.Vec(IDL.Principal)
241
271
  });
242
- var Change = IDL.Variant({
272
+ const Change = IDL.Variant({
243
273
  ToRemove: NodeProvider,
244
274
  ToAdd: NodeProvider
245
275
  });
246
- var AddOrRemoveNodeProvider = IDL.Record({ change: IDL.Opt(Change) });
247
- var Motion = IDL.Record({ motion_text: IDL.Text });
248
- var Action = IDL.Variant({
276
+ const AddOrRemoveNodeProvider = IDL.Record({ change: IDL.Opt(Change) });
277
+ const Motion = IDL.Record({ motion_text: IDL.Text });
278
+ const Action = IDL.Variant({
249
279
  RegisterKnownNeuron: KnownNeuron,
250
280
  ManageNeuron: ManageNeuron,
251
281
  ExecuteNnsFunction: ExecuteNnsFunction,
@@ -265,15 +295,15 @@ var idlFactory = function (_a) {
265
295
  action: IDL.Opt(Action),
266
296
  summary: IDL.Text
267
297
  }));
268
- var BallotInfo = IDL.Record({
298
+ const BallotInfo = IDL.Record({
269
299
  vote: IDL.Int32,
270
300
  proposal_id: IDL.Opt(NeuronId)
271
301
  });
272
- var DissolveState = IDL.Variant({
302
+ const DissolveState = IDL.Variant({
273
303
  DissolveDelaySeconds: IDL.Nat64,
274
304
  WhenDissolvedTimestampSeconds: IDL.Nat64
275
305
  });
276
- var Neuron = IDL.Record({
306
+ const Neuron = IDL.Record({
277
307
  id: IDL.Opt(NeuronId),
278
308
  staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
279
309
  controller: IDL.Opt(IDL.Principal),
@@ -295,20 +325,24 @@ var idlFactory = function (_a) {
295
325
  known_neuron_data: IDL.Opt(KnownNeuronData),
296
326
  spawn_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
297
327
  });
298
- var Result = IDL.Variant({ Ok: IDL.Null, Err: GovernanceError });
299
- var Result_1 = IDL.Variant({
328
+ const Result = IDL.Variant({ Ok: IDL.Null, Err: GovernanceError });
329
+ const Result_1 = IDL.Variant({
300
330
  Error: GovernanceError,
301
331
  NeuronId: NeuronId
302
332
  });
303
- var ClaimOrRefreshNeuronFromAccountResponse = IDL.Record({
333
+ const ClaimOrRefreshNeuronFromAccountResponse = IDL.Record({
304
334
  result: IDL.Opt(Result_1)
305
335
  });
306
- var Result_2 = IDL.Variant({ Ok: Neuron, Err: GovernanceError });
307
- var Result_3 = IDL.Variant({
336
+ const Result_2 = IDL.Variant({ Ok: Neuron, Err: GovernanceError });
337
+ const Result_3 = IDL.Variant({
338
+ Ok: GovernanceCachedMetrics,
339
+ Err: GovernanceError
340
+ });
341
+ const Result_4 = IDL.Variant({
308
342
  Ok: RewardNodeProviders,
309
343
  Err: GovernanceError
310
344
  });
311
- var NeuronInfo = IDL.Record({
345
+ const NeuronInfo = IDL.Record({
312
346
  dissolve_delay_seconds: IDL.Nat64,
313
347
  recent_ballots: IDL.Vec(BallotInfo),
314
348
  created_timestamp_seconds: IDL.Nat64,
@@ -320,12 +354,12 @@ var idlFactory = function (_a) {
320
354
  voting_power: IDL.Nat64,
321
355
  age_seconds: IDL.Nat64
322
356
  });
323
- var Result_4 = IDL.Variant({ Ok: NeuronInfo, Err: GovernanceError });
324
- var Result_5 = IDL.Variant({
357
+ const Result_5 = IDL.Variant({ Ok: NeuronInfo, Err: GovernanceError });
358
+ const Result_6 = IDL.Variant({
325
359
  Ok: NodeProvider,
326
360
  Err: GovernanceError
327
361
  });
328
- var ProposalInfo = IDL.Record({
362
+ const ProposalInfo = IDL.Record({
329
363
  id: IDL.Opt(NeuronId),
330
364
  status: IDL.Int32,
331
365
  topic: IDL.Int32,
@@ -336,6 +370,7 @@ var idlFactory = function (_a) {
336
370
  deadline_timestamp_seconds: IDL.Opt(IDL.Nat64),
337
371
  failed_timestamp_seconds: IDL.Nat64,
338
372
  reject_cost_e8s: IDL.Nat64,
373
+ derived_proposal_information: IDL.Opt(DerivedProposalInformation),
339
374
  latest_tally: IDL.Opt(Tally),
340
375
  reward_status: IDL.Int32,
341
376
  decided_timestamp_seconds: IDL.Nat64,
@@ -343,47 +378,47 @@ var idlFactory = function (_a) {
343
378
  proposer: IDL.Opt(NeuronId),
344
379
  executed_timestamp_seconds: IDL.Nat64
345
380
  });
346
- var ListKnownNeuronsResponse = IDL.Record({
381
+ const ListKnownNeuronsResponse = IDL.Record({
347
382
  known_neurons: IDL.Vec(KnownNeuron)
348
383
  });
349
- var ListNeurons = IDL.Record({
384
+ const ListNeurons = IDL.Record({
350
385
  neuron_ids: IDL.Vec(IDL.Nat64),
351
386
  include_neurons_readable_by_caller: IDL.Bool
352
387
  });
353
- var ListNeuronsResponse = IDL.Record({
388
+ const ListNeuronsResponse = IDL.Record({
354
389
  neuron_infos: IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInfo)),
355
390
  full_neurons: IDL.Vec(Neuron)
356
391
  });
357
- var ListNodeProvidersResponse = IDL.Record({
392
+ const ListNodeProvidersResponse = IDL.Record({
358
393
  node_providers: IDL.Vec(NodeProvider)
359
394
  });
360
- var ListProposalInfo = IDL.Record({
395
+ const ListProposalInfo = IDL.Record({
361
396
  include_reward_status: IDL.Vec(IDL.Int32),
362
397
  before_proposal: IDL.Opt(NeuronId),
363
398
  limit: IDL.Nat32,
364
399
  exclude_topic: IDL.Vec(IDL.Int32),
365
400
  include_status: IDL.Vec(IDL.Int32)
366
401
  });
367
- var ListProposalInfoResponse = IDL.Record({
402
+ const ListProposalInfoResponse = IDL.Record({
368
403
  proposal_info: IDL.Vec(ProposalInfo)
369
404
  });
370
- var SpawnResponse = IDL.Record({ created_neuron_id: IDL.Opt(NeuronId) });
371
- var ClaimOrRefreshResponse = IDL.Record({
405
+ const SpawnResponse = IDL.Record({ created_neuron_id: IDL.Opt(NeuronId) });
406
+ const ClaimOrRefreshResponse = IDL.Record({
372
407
  refreshed_neuron_id: IDL.Opt(NeuronId)
373
408
  });
374
- var MakeProposalResponse = IDL.Record({
409
+ const MakeProposalResponse = IDL.Record({
375
410
  proposal_id: IDL.Opt(NeuronId)
376
411
  });
377
- var StakeMaturityResponse = IDL.Record({
412
+ const StakeMaturityResponse = IDL.Record({
378
413
  maturity_e8s: IDL.Nat64,
379
414
  staked_maturity_e8s: IDL.Nat64
380
415
  });
381
- var MergeMaturityResponse = IDL.Record({
416
+ const MergeMaturityResponse = IDL.Record({
382
417
  merged_maturity_e8s: IDL.Nat64,
383
418
  new_stake_e8s: IDL.Nat64
384
419
  });
385
- var DisburseResponse = IDL.Record({ transfer_block_height: IDL.Nat64 });
386
- var Command_1 = IDL.Variant({
420
+ const DisburseResponse = IDL.Record({ transfer_block_height: IDL.Nat64 });
421
+ const Command_1 = IDL.Variant({
387
422
  Error: GovernanceError,
388
423
  Spawn: SpawnResponse,
389
424
  Split: SpawnResponse,
@@ -398,19 +433,19 @@ var idlFactory = function (_a) {
398
433
  MergeMaturity: MergeMaturityResponse,
399
434
  Disburse: DisburseResponse
400
435
  });
401
- var ManageNeuronResponse = IDL.Record({ command: IDL.Opt(Command_1) });
402
- var Committed = IDL.Record({
436
+ const ManageNeuronResponse = IDL.Record({ command: IDL.Opt(Command_1) });
437
+ const Committed = IDL.Record({
403
438
  sns_governance_canister_id: IDL.Opt(IDL.Principal)
404
439
  });
405
- var Result_6 = IDL.Variant({
440
+ const Result_7 = IDL.Variant({
406
441
  Committed: Committed,
407
442
  Aborted: IDL.Record({})
408
443
  });
409
- var SettleCommunityFundParticipation = IDL.Record({
410
- result: IDL.Opt(Result_6),
444
+ const SettleCommunityFundParticipation = IDL.Record({
445
+ result: IDL.Opt(Result_7),
411
446
  open_sns_token_swap_proposal_id: IDL.Opt(IDL.Nat64)
412
447
  });
413
- var UpdateNodeProvider = IDL.Record({
448
+ const UpdateNodeProvider = IDL.Record({
414
449
  reward_account: IDL.Opt(AccountIdentifier)
415
450
  });
416
451
  return IDL.Service({
@@ -419,13 +454,14 @@ var idlFactory = function (_a) {
419
454
  get_build_metadata: IDL.Func([], [IDL.Text], ['query']),
420
455
  get_full_neuron: IDL.Func([IDL.Nat64], [Result_2], ['query']),
421
456
  get_full_neuron_by_id_or_subaccount: IDL.Func([NeuronIdOrSubaccount], [Result_2], ['query']),
422
- get_monthly_node_provider_rewards: IDL.Func([], [Result_3], []),
457
+ get_metrics: IDL.Func([], [Result_3], ['query']),
458
+ get_monthly_node_provider_rewards: IDL.Func([], [Result_4], []),
423
459
  get_most_recent_monthly_node_provider_rewards: IDL.Func([], [IDL.Opt(MostRecentMonthlyNodeProviderRewards)], ['query']),
424
460
  get_network_economics_parameters: IDL.Func([], [NetworkEconomics], ['query']),
425
461
  get_neuron_ids: IDL.Func([], [IDL.Vec(IDL.Nat64)], ['query']),
426
- get_neuron_info: IDL.Func([IDL.Nat64], [Result_4], ['query']),
427
- get_neuron_info_by_id_or_subaccount: IDL.Func([NeuronIdOrSubaccount], [Result_4], ['query']),
428
- get_node_provider_by_caller: IDL.Func([IDL.Null], [Result_5], ['query']),
462
+ get_neuron_info: IDL.Func([IDL.Nat64], [Result_5], ['query']),
463
+ get_neuron_info_by_id_or_subaccount: IDL.Func([NeuronIdOrSubaccount], [Result_5], ['query']),
464
+ get_node_provider_by_caller: IDL.Func([IDL.Null], [Result_6], ['query']),
429
465
  get_pending_proposals: IDL.Func([], [IDL.Vec(ProposalInfo)], ['query']),
430
466
  get_proposal_info: IDL.Func([IDL.Nat64], [IDL.Opt(ProposalInfo)], ['query']),
431
467
  list_known_neurons: IDL.Func([], [ListKnownNeuronsResponse], ['query']),
@@ -439,34 +475,33 @@ var idlFactory = function (_a) {
439
475
  });
440
476
  };
441
477
  exports.idlFactory = idlFactory;
442
- var init = function (_a) {
443
- var IDL = _a.IDL;
444
- var Proposal = IDL.Rec();
445
- var NeuronId = IDL.Record({ id: IDL.Nat64 });
446
- var Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
447
- var AccountIdentifier = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
448
- var NodeProvider = IDL.Record({
478
+ const init = ({ IDL }) => {
479
+ const Proposal = IDL.Rec();
480
+ const NeuronId = IDL.Record({ id: IDL.Nat64 });
481
+ const Followees = IDL.Record({ followees: IDL.Vec(NeuronId) });
482
+ const AccountIdentifier = IDL.Record({ hash: IDL.Vec(IDL.Nat8) });
483
+ const NodeProvider = IDL.Record({
449
484
  id: IDL.Opt(IDL.Principal),
450
485
  reward_account: IDL.Opt(AccountIdentifier)
451
486
  });
452
- var RewardToNeuron = IDL.Record({ dissolve_delay_seconds: IDL.Nat64 });
453
- var RewardToAccount = IDL.Record({
487
+ const RewardToNeuron = IDL.Record({ dissolve_delay_seconds: IDL.Nat64 });
488
+ const RewardToAccount = IDL.Record({
454
489
  to_account: IDL.Opt(AccountIdentifier)
455
490
  });
456
- var RewardMode = IDL.Variant({
491
+ const RewardMode = IDL.Variant({
457
492
  RewardToNeuron: RewardToNeuron,
458
493
  RewardToAccount: RewardToAccount
459
494
  });
460
- var RewardNodeProvider = IDL.Record({
495
+ const RewardNodeProvider = IDL.Record({
461
496
  node_provider: IDL.Opt(NodeProvider),
462
497
  reward_mode: IDL.Opt(RewardMode),
463
498
  amount_e8s: IDL.Nat64
464
499
  });
465
- var MostRecentMonthlyNodeProviderRewards = IDL.Record({
500
+ const MostRecentMonthlyNodeProviderRewards = IDL.Record({
466
501
  timestamp: IDL.Nat64,
467
502
  rewards: IDL.Vec(RewardNodeProvider)
468
503
  });
469
- var GovernanceCachedMetrics = IDL.Record({
504
+ const GovernanceCachedMetrics = IDL.Record({
470
505
  not_dissolving_neurons_e8s_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Float64)),
471
506
  garbage_collectable_neurons_count: IDL.Nat64,
472
507
  neurons_with_invalid_stake_count: IDL.Nat64,
@@ -477,6 +512,7 @@ var init = function (_a) {
477
512
  community_fund_total_maturity_e8s_equivalent: IDL.Nat64,
478
513
  total_staked_e8s: IDL.Nat64,
479
514
  not_dissolving_neurons_count: IDL.Nat64,
515
+ total_locked_e8s: IDL.Nat64,
480
516
  dissolved_neurons_e8s: IDL.Nat64,
481
517
  neurons_with_less_than_6_months_dissolve_delay_e8s: IDL.Nat64,
482
518
  dissolving_neurons_count_buckets: IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
@@ -485,7 +521,7 @@ var init = function (_a) {
485
521
  community_fund_total_staked_e8s: IDL.Nat64,
486
522
  timestamp_seconds: IDL.Nat64
487
523
  });
488
- var NetworkEconomics = IDL.Record({
524
+ const NetworkEconomics = IDL.Record({
489
525
  neuron_minimum_stake_e8s: IDL.Nat64,
490
526
  max_proposals_to_keep_per_topic: IDL.Nat32,
491
527
  neuron_management_fee_per_proposal_e8s: IDL.Nat64,
@@ -495,13 +531,13 @@ var init = function (_a) {
495
531
  minimum_icp_xdr_rate: IDL.Nat64,
496
532
  maximum_node_provider_rewards_e8s: IDL.Nat64
497
533
  });
498
- var RewardEvent = IDL.Record({
534
+ const RewardEvent = IDL.Record({
499
535
  day_after_genesis: IDL.Nat64,
500
536
  actual_timestamp_seconds: IDL.Nat64,
501
537
  distributed_e8s_equivalent: IDL.Nat64,
502
538
  settled_proposals: IDL.Vec(NeuronId)
503
539
  });
504
- var NeuronStakeTransfer = IDL.Record({
540
+ const NeuronStakeTransfer = IDL.Record({
505
541
  to_subaccount: IDL.Vec(IDL.Nat8),
506
542
  neuron_stake_e8s: IDL.Nat64,
507
543
  from: IDL.Opt(IDL.Principal),
@@ -510,76 +546,93 @@ var init = function (_a) {
510
546
  transfer_timestamp: IDL.Nat64,
511
547
  block_height: IDL.Nat64
512
548
  });
513
- var GovernanceError = IDL.Record({
549
+ const GovernanceError = IDL.Record({
514
550
  error_message: IDL.Text,
515
551
  error_type: IDL.Int32
516
552
  });
517
- var CfNeuron = IDL.Record({
553
+ const CfNeuron = IDL.Record({
518
554
  nns_neuron_id: IDL.Nat64,
519
555
  amount_icp_e8s: IDL.Nat64
520
556
  });
521
- var CfParticipant = IDL.Record({
557
+ const CfParticipant = IDL.Record({
522
558
  hotkey_principal: IDL.Text,
523
559
  cf_neurons: IDL.Vec(CfNeuron)
524
560
  });
525
- var Ballot = IDL.Record({ vote: IDL.Int32, voting_power: IDL.Nat64 });
526
- var Tally = IDL.Record({
561
+ const Ballot = IDL.Record({ vote: IDL.Int32, voting_power: IDL.Nat64 });
562
+ const CanisterStatusResultV2 = IDL.Record({
563
+ status: IDL.Opt(IDL.Int32),
564
+ freezing_threshold: IDL.Opt(IDL.Nat64),
565
+ controllers: IDL.Vec(IDL.Principal),
566
+ memory_size: IDL.Opt(IDL.Nat64),
567
+ cycles: IDL.Opt(IDL.Nat64),
568
+ idle_cycles_burned_per_day: IDL.Opt(IDL.Nat64),
569
+ module_hash: IDL.Vec(IDL.Nat8)
570
+ });
571
+ const CanisterSummary = IDL.Record({
572
+ status: IDL.Opt(CanisterStatusResultV2),
573
+ canister_id: IDL.Opt(IDL.Principal)
574
+ });
575
+ const SwapBackgroundInformation = IDL.Record({
576
+ ledger_index_canister_summary: IDL.Opt(CanisterSummary),
577
+ fallback_controller_principal_ids: IDL.Vec(IDL.Principal),
578
+ ledger_archive_canister_summaries: IDL.Vec(CanisterSummary),
579
+ ledger_canister_summary: IDL.Opt(CanisterSummary),
580
+ swap_canister_summary: IDL.Opt(CanisterSummary),
581
+ governance_canister_summary: IDL.Opt(CanisterSummary),
582
+ root_canister_summary: IDL.Opt(CanisterSummary),
583
+ dapp_canister_summaries: IDL.Vec(CanisterSummary)
584
+ });
585
+ const DerivedProposalInformation = IDL.Record({
586
+ swap_background_information: IDL.Opt(SwapBackgroundInformation)
587
+ });
588
+ const Tally = IDL.Record({
527
589
  no: IDL.Nat64,
528
590
  yes: IDL.Nat64,
529
591
  total: IDL.Nat64,
530
592
  timestamp_seconds: IDL.Nat64
531
593
  });
532
- var SwapBackgroundInformation = IDL.Record({
533
- sns_root_canister_id: IDL.Opt(IDL.Principal),
534
- dapp_canister_ids: IDL.Vec(IDL.Principal),
535
- fallback_controller_principal_ids: IDL.Vec(IDL.Principal),
536
- sns_ledger_archive_canister_ids: IDL.Vec(IDL.Principal),
537
- sns_ledger_index_canister_id: IDL.Opt(IDL.Principal),
538
- sns_ledger_canister_id: IDL.Opt(IDL.Principal),
539
- sns_governance_canister_id: IDL.Opt(IDL.Principal)
540
- });
541
- var KnownNeuronData = IDL.Record({
594
+ const KnownNeuronData = IDL.Record({
542
595
  name: IDL.Text,
543
596
  description: IDL.Opt(IDL.Text)
544
597
  });
545
- var KnownNeuron = IDL.Record({
598
+ const KnownNeuron = IDL.Record({
546
599
  id: IDL.Opt(NeuronId),
547
600
  known_neuron_data: IDL.Opt(KnownNeuronData)
548
601
  });
549
- var Spawn = IDL.Record({
602
+ const Spawn = IDL.Record({
550
603
  percentage_to_spawn: IDL.Opt(IDL.Nat32),
551
604
  new_controller: IDL.Opt(IDL.Principal),
552
605
  nonce: IDL.Opt(IDL.Nat64)
553
606
  });
554
- var Split = IDL.Record({ amount_e8s: IDL.Nat64 });
555
- var Follow = IDL.Record({
607
+ const Split = IDL.Record({ amount_e8s: IDL.Nat64 });
608
+ const Follow = IDL.Record({
556
609
  topic: IDL.Int32,
557
610
  followees: IDL.Vec(NeuronId)
558
611
  });
559
- var ClaimOrRefreshNeuronFromAccount = IDL.Record({
612
+ const ClaimOrRefreshNeuronFromAccount = IDL.Record({
560
613
  controller: IDL.Opt(IDL.Principal),
561
614
  memo: IDL.Nat64
562
615
  });
563
- var By = IDL.Variant({
616
+ const By = IDL.Variant({
564
617
  NeuronIdOrSubaccount: IDL.Record({}),
565
618
  MemoAndController: ClaimOrRefreshNeuronFromAccount,
566
619
  Memo: IDL.Nat64
567
620
  });
568
- var ClaimOrRefresh = IDL.Record({ by: IDL.Opt(By) });
569
- var RemoveHotKey = IDL.Record({
621
+ const ClaimOrRefresh = IDL.Record({ by: IDL.Opt(By) });
622
+ const RemoveHotKey = IDL.Record({
570
623
  hot_key_to_remove: IDL.Opt(IDL.Principal)
571
624
  });
572
- var AddHotKey = IDL.Record({ new_hot_key: IDL.Opt(IDL.Principal) });
573
- var ChangeAutoStakeMaturity = IDL.Record({
625
+ const AddHotKey = IDL.Record({ new_hot_key: IDL.Opt(IDL.Principal) });
626
+ const ChangeAutoStakeMaturity = IDL.Record({
574
627
  requested_setting_for_auto_stake_maturity: IDL.Bool
575
628
  });
576
- var IncreaseDissolveDelay = IDL.Record({
629
+ const IncreaseDissolveDelay = IDL.Record({
577
630
  additional_dissolve_delay_seconds: IDL.Nat32
578
631
  });
579
- var SetDissolveTimestamp = IDL.Record({
632
+ const SetDissolveTimestamp = IDL.Record({
580
633
  dissolve_timestamp_seconds: IDL.Nat64
581
634
  });
582
- var Operation = IDL.Variant({
635
+ const Operation = IDL.Variant({
583
636
  RemoveHotKey: RemoveHotKey,
584
637
  AddHotKey: AddHotKey,
585
638
  ChangeAutoStakeMaturity: ChangeAutoStakeMaturity,
@@ -590,29 +643,29 @@ var init = function (_a) {
590
643
  LeaveCommunityFund: IDL.Record({}),
591
644
  SetDissolveTimestamp: SetDissolveTimestamp
592
645
  });
593
- var Configure = IDL.Record({ operation: IDL.Opt(Operation) });
594
- var RegisterVote = IDL.Record({
646
+ const Configure = IDL.Record({ operation: IDL.Opt(Operation) });
647
+ const RegisterVote = IDL.Record({
595
648
  vote: IDL.Int32,
596
649
  proposal: IDL.Opt(NeuronId)
597
650
  });
598
- var Merge = IDL.Record({ source_neuron_id: IDL.Opt(NeuronId) });
599
- var DisburseToNeuron = IDL.Record({
651
+ const Merge = IDL.Record({ source_neuron_id: IDL.Opt(NeuronId) });
652
+ const DisburseToNeuron = IDL.Record({
600
653
  dissolve_delay_seconds: IDL.Nat64,
601
654
  kyc_verified: IDL.Bool,
602
655
  amount_e8s: IDL.Nat64,
603
656
  new_controller: IDL.Opt(IDL.Principal),
604
657
  nonce: IDL.Nat64
605
658
  });
606
- var StakeMaturity = IDL.Record({
659
+ const StakeMaturity = IDL.Record({
607
660
  percentage_to_stake: IDL.Opt(IDL.Nat32)
608
661
  });
609
- var MergeMaturity = IDL.Record({ percentage_to_merge: IDL.Nat32 });
610
- var Amount = IDL.Record({ e8s: IDL.Nat64 });
611
- var Disburse = IDL.Record({
662
+ const MergeMaturity = IDL.Record({ percentage_to_merge: IDL.Nat32 });
663
+ const Amount = IDL.Record({ e8s: IDL.Nat64 });
664
+ const Disburse = IDL.Record({
612
665
  to_account: IDL.Opt(AccountIdentifier),
613
666
  amount: IDL.Opt(Amount)
614
667
  });
615
- var Command = IDL.Variant({
668
+ const Command = IDL.Variant({
616
669
  Spawn: Spawn,
617
670
  Split: Split,
618
671
  Follow: Follow,
@@ -626,66 +679,67 @@ var init = function (_a) {
626
679
  MergeMaturity: MergeMaturity,
627
680
  Disburse: Disburse
628
681
  });
629
- var NeuronIdOrSubaccount = IDL.Variant({
682
+ const NeuronIdOrSubaccount = IDL.Variant({
630
683
  Subaccount: IDL.Vec(IDL.Nat8),
631
684
  NeuronId: NeuronId
632
685
  });
633
- var ManageNeuron = IDL.Record({
686
+ const ManageNeuron = IDL.Record({
634
687
  id: IDL.Opt(NeuronId),
635
688
  command: IDL.Opt(Command),
636
689
  neuron_id_or_subaccount: IDL.Opt(NeuronIdOrSubaccount)
637
690
  });
638
- var ExecuteNnsFunction = IDL.Record({
691
+ const ExecuteNnsFunction = IDL.Record({
639
692
  nns_function: IDL.Int32,
640
693
  payload: IDL.Vec(IDL.Nat8)
641
694
  });
642
- var NeuronBasketConstructionParameters = IDL.Record({
695
+ const NeuronBasketConstructionParameters = IDL.Record({
643
696
  dissolve_delay_interval_seconds: IDL.Nat64,
644
697
  count: IDL.Nat64
645
698
  });
646
- var Params = IDL.Record({
699
+ const Params = IDL.Record({
647
700
  min_participant_icp_e8s: IDL.Nat64,
648
701
  neuron_basket_construction_parameters: IDL.Opt(NeuronBasketConstructionParameters),
649
702
  max_icp_e8s: IDL.Nat64,
650
703
  swap_due_timestamp_seconds: IDL.Nat64,
651
704
  min_participants: IDL.Nat32,
652
705
  sns_token_e8s: IDL.Nat64,
706
+ sale_delay_seconds: IDL.Opt(IDL.Nat64),
653
707
  max_participant_icp_e8s: IDL.Nat64,
654
708
  min_icp_e8s: IDL.Nat64
655
709
  });
656
- var OpenSnsTokenSwap = IDL.Record({
710
+ const OpenSnsTokenSwap = IDL.Record({
657
711
  community_fund_investment_e8s: IDL.Opt(IDL.Nat64),
658
712
  target_swap_canister_id: IDL.Opt(IDL.Principal),
659
713
  params: IDL.Opt(Params)
660
714
  });
661
- var TimeWindow = IDL.Record({
715
+ const TimeWindow = IDL.Record({
662
716
  start_timestamp_seconds: IDL.Nat64,
663
717
  end_timestamp_seconds: IDL.Nat64
664
718
  });
665
- var SetOpenTimeWindowRequest = IDL.Record({
719
+ const SetOpenTimeWindowRequest = IDL.Record({
666
720
  open_time_window: IDL.Opt(TimeWindow)
667
721
  });
668
- var SetSnsTokenSwapOpenTimeWindow = IDL.Record({
722
+ const SetSnsTokenSwapOpenTimeWindow = IDL.Record({
669
723
  request: IDL.Opt(SetOpenTimeWindowRequest),
670
724
  swap_canister_id: IDL.Opt(IDL.Principal)
671
725
  });
672
- var SetDefaultFollowees = IDL.Record({
726
+ const SetDefaultFollowees = IDL.Record({
673
727
  default_followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees))
674
728
  });
675
- var RewardNodeProviders = IDL.Record({
729
+ const RewardNodeProviders = IDL.Record({
676
730
  use_registry_derived_rewards: IDL.Opt(IDL.Bool),
677
731
  rewards: IDL.Vec(RewardNodeProvider)
678
732
  });
679
- var ApproveGenesisKyc = IDL.Record({
733
+ const ApproveGenesisKyc = IDL.Record({
680
734
  principals: IDL.Vec(IDL.Principal)
681
735
  });
682
- var Change = IDL.Variant({
736
+ const Change = IDL.Variant({
683
737
  ToRemove: NodeProvider,
684
738
  ToAdd: NodeProvider
685
739
  });
686
- var AddOrRemoveNodeProvider = IDL.Record({ change: IDL.Opt(Change) });
687
- var Motion = IDL.Record({ motion_text: IDL.Text });
688
- var Action = IDL.Variant({
740
+ const AddOrRemoveNodeProvider = IDL.Record({ change: IDL.Opt(Change) });
741
+ const Motion = IDL.Record({ motion_text: IDL.Text });
742
+ const Action = IDL.Variant({
689
743
  RegisterKnownNeuron: KnownNeuron,
690
744
  ManageNeuron: ManageNeuron,
691
745
  ExecuteNnsFunction: ExecuteNnsFunction,
@@ -705,10 +759,10 @@ var init = function (_a) {
705
759
  action: IDL.Opt(Action),
706
760
  summary: IDL.Text
707
761
  }));
708
- var WaitForQuietState = IDL.Record({
762
+ const WaitForQuietState = IDL.Record({
709
763
  current_deadline_timestamp_seconds: IDL.Nat64
710
764
  });
711
- var ProposalData = IDL.Record({
765
+ const ProposalData = IDL.Record({
712
766
  id: IDL.Opt(NeuronId),
713
767
  failure_reason: IDL.Opt(GovernanceError),
714
768
  cf_participants: IDL.Vec(CfParticipant),
@@ -717,17 +771,17 @@ var init = function (_a) {
717
771
  reward_event_round: IDL.Nat64,
718
772
  failed_timestamp_seconds: IDL.Nat64,
719
773
  reject_cost_e8s: IDL.Nat64,
774
+ derived_proposal_information: IDL.Opt(DerivedProposalInformation),
720
775
  latest_tally: IDL.Opt(Tally),
721
776
  sns_token_swap_lifecycle: IDL.Opt(IDL.Int32),
722
777
  decided_timestamp_seconds: IDL.Nat64,
723
- swap_background_information: IDL.Opt(SwapBackgroundInformation),
724
778
  proposal: IDL.Opt(Proposal),
725
779
  proposer: IDL.Opt(NeuronId),
726
780
  wait_for_quiet_state: IDL.Opt(WaitForQuietState),
727
781
  executed_timestamp_seconds: IDL.Nat64,
728
782
  original_total_community_fund_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64)
729
783
  });
730
- var Command_2 = IDL.Variant({
784
+ const Command_2 = IDL.Variant({
731
785
  Spawn: NeuronId,
732
786
  Split: Split,
733
787
  Configure: Configure,
@@ -738,19 +792,19 @@ var init = function (_a) {
738
792
  MergeMaturity: MergeMaturity,
739
793
  Disburse: Disburse
740
794
  });
741
- var NeuronInFlightCommand = IDL.Record({
795
+ const NeuronInFlightCommand = IDL.Record({
742
796
  command: IDL.Opt(Command_2),
743
797
  timestamp: IDL.Nat64
744
798
  });
745
- var BallotInfo = IDL.Record({
799
+ const BallotInfo = IDL.Record({
746
800
  vote: IDL.Int32,
747
801
  proposal_id: IDL.Opt(NeuronId)
748
802
  });
749
- var DissolveState = IDL.Variant({
803
+ const DissolveState = IDL.Variant({
750
804
  DissolveDelaySeconds: IDL.Nat64,
751
805
  WhenDissolvedTimestampSeconds: IDL.Nat64
752
806
  });
753
- var Neuron = IDL.Record({
807
+ const Neuron = IDL.Record({
754
808
  id: IDL.Opt(NeuronId),
755
809
  staked_maturity_e8s_equivalent: IDL.Opt(IDL.Nat64),
756
810
  controller: IDL.Opt(IDL.Principal),
@@ -772,7 +826,7 @@ var init = function (_a) {
772
826
  known_neuron_data: IDL.Opt(KnownNeuronData),
773
827
  spawn_at_timestamp_seconds: IDL.Opt(IDL.Nat64)
774
828
  });
775
- var Governance = IDL.Record({
829
+ const Governance = IDL.Record({
776
830
  default_followees: IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
777
831
  most_recent_monthly_node_provider_rewards: IDL.Opt(MostRecentMonthlyNodeProviderRewards),
778
832
  maturity_modulation_last_updated_at_timestamp_seconds: IDL.Opt(IDL.Nat64),
@@ -793,4 +847,8 @@ var init = function (_a) {
793
847
  return [Governance];
794
848
  };
795
849
  exports.init = init;
850
+ exports.ListNeurons = IDL.Record({
851
+ neuron_ids: IDL.Vec(IDL.Nat64),
852
+ include_neurons_readable_by_caller: IDL.Bool
853
+ });
796
854
  //# sourceMappingURL=governance.js.map