@airgap/icp 0.13.15-beta.1 → 0.13.15-beta.10

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