@dfinity/nns 0.4.0 → 0.4.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.
Files changed (66) hide show
  1. package/dist/candid/genesis_token.certified.idl.js +37 -0
  2. package/dist/candid/genesis_token.did +30 -0
  3. package/dist/candid/genesis_token.idl.d.ts +10 -0
  4. package/dist/candid/genesis_token.idl.js +37 -0
  5. package/dist/candid/governance.certified.idl.js +14 -0
  6. package/dist/candid/governance.did +18 -4
  7. package/dist/candid/governance.idl.js +23 -5
  8. package/dist/candid/governanceTypes.d.ts +19 -13
  9. package/dist/candid/payloads.did +127 -21
  10. package/dist/candid/payloads.idl.d.ts +28 -1
  11. package/dist/candid/payloads.idl.js +97 -3
  12. package/dist/cjs/index.cjs.js +36 -33
  13. package/dist/cjs/index.cjs.js.map +3 -3
  14. package/dist/esm/account_identifier.js +1 -1
  15. package/dist/esm/{chunk-L4BUBLWY.js → chunk-E6UFXMWU.js} +20 -20
  16. package/dist/esm/{chunk-L4BUBLWY.js.map → chunk-E6UFXMWU.js.map} +2 -2
  17. package/dist/esm/{chunk-PKY54KPG.js → chunk-FL7E4DL3.js} +3 -3
  18. package/dist/esm/{chunk-PKY54KPG.js.map → chunk-FL7E4DL3.js.map} +1 -1
  19. package/dist/esm/chunk-HPCMNLTU.js +2 -0
  20. package/dist/esm/{chunk-7RUPLQYT.js.map → chunk-HPCMNLTU.js.map} +3 -3
  21. package/dist/esm/chunk-KUIJF2IJ.js +4 -0
  22. package/dist/esm/chunk-KUIJF2IJ.js.map +7 -0
  23. package/dist/esm/chunk-KXYKDST6.js +17 -0
  24. package/dist/esm/{chunk-BRAPLAM7.js.map → chunk-KXYKDST6.js.map} +3 -3
  25. package/dist/esm/chunk-MTPVFXPH.js +2 -0
  26. package/dist/esm/{chunk-EWMNJTAM.js.map → chunk-MTPVFXPH.js.map} +1 -1
  27. package/dist/esm/chunk-NOBP3Q32.js +7 -0
  28. package/dist/esm/chunk-NOBP3Q32.js.map +7 -0
  29. package/dist/esm/chunk-ONAVPXOT.js +2 -0
  30. package/dist/esm/chunk-ONAVPXOT.js.map +7 -0
  31. package/dist/esm/chunk-QNJXXPDD.js +2 -0
  32. package/dist/esm/chunk-QNJXXPDD.js.map +7 -0
  33. package/dist/esm/{chunk-CY2PTZ5N.js → chunk-XMQ7XZ3Q.js} +2 -2
  34. package/dist/esm/{chunk-CY2PTZ5N.js.map → chunk-XMQ7XZ3Q.js.map} +1 -1
  35. package/dist/esm/genesis_token.js +2 -0
  36. package/dist/esm/genesis_token.js.map +7 -0
  37. package/dist/esm/governance.js +1 -1
  38. package/dist/esm/icp.js +1 -1
  39. package/dist/esm/index.js +1 -1
  40. package/dist/esm/index.js.map +3 -3
  41. package/dist/esm/ledger.js +1 -1
  42. package/dist/proto/governance.proto +287 -0
  43. package/dist/proto/governance_pb.d.ts +1055 -0
  44. package/dist/proto/governance_pb.js +7806 -0
  45. package/dist/types/canisters/governance/request.converters.d.ts +15 -0
  46. package/dist/types/canisters/governance/request.proto.converters.d.ts +15 -0
  47. package/dist/types/canisters/governance/response.converters.d.ts +2 -0
  48. package/dist/types/canisters/governance/response.proto.converters.d.ts +1 -0
  49. package/dist/types/canisters/governance/services.d.ts +7 -1
  50. package/dist/types/constants/canister_ids.d.ts +1 -0
  51. package/dist/types/errors/governance.errors.d.ts +7 -1
  52. package/dist/types/genesis_token.d.ts +17 -0
  53. package/dist/types/governance.d.ts +49 -1
  54. package/dist/types/index.d.ts +2 -0
  55. package/dist/types/types/governance.d.ts +1 -0
  56. package/dist/types/types/governance_converters.d.ts +10 -5
  57. package/dist/types/utils/account_identifier.utils.d.ts +5 -0
  58. package/dist/types/utils/accounts.utils.d.ts +6 -0
  59. package/dist/types/utils/converter.utils.d.ts +0 -5
  60. package/dist/types/utils/number.utils.d.ts +1 -0
  61. package/package.json +17 -17
  62. package/dist/esm/chunk-7RUPLQYT.js +0 -4
  63. package/dist/esm/chunk-BRAPLAM7.js +0 -18
  64. package/dist/esm/chunk-DEPEAMHA.js +0 -3
  65. package/dist/esm/chunk-DEPEAMHA.js.map +0 -7
  66. package/dist/esm/chunk-EWMNJTAM.js +0 -2
@@ -0,0 +1,37 @@
1
+ /* Do not edit. Compiled with ./scripts/compile-idl-js from candid/genesis_token.did */
2
+ export const idlFactory = ({ IDL }) => {
3
+ const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
4
+ const Result = IDL.Variant({ 'Ok' : IDL.Vec(NeuronId), 'Err' : IDL.Text });
5
+ const Result_1 = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : IDL.Text });
6
+ const TransferredNeuron = IDL.Record({
7
+ 'error' : IDL.Opt(IDL.Text),
8
+ 'timestamp_seconds' : IDL.Nat64,
9
+ 'neuron_id' : IDL.Opt(NeuronId),
10
+ });
11
+ const AccountState = IDL.Record({
12
+ 'authenticated_principal_id' : IDL.Opt(IDL.Principal),
13
+ 'successfully_transferred_neurons' : IDL.Vec(TransferredNeuron),
14
+ 'is_whitelisted_for_forwarding' : IDL.Bool,
15
+ 'has_donated' : IDL.Bool,
16
+ 'failed_transferred_neurons' : IDL.Vec(TransferredNeuron),
17
+ 'neuron_ids' : IDL.Vec(NeuronId),
18
+ 'has_claimed' : IDL.Bool,
19
+ 'has_forwarded' : IDL.Bool,
20
+ 'icpts' : IDL.Nat32,
21
+ });
22
+ const Result_2 = IDL.Variant({ 'Ok' : AccountState, 'Err' : IDL.Text });
23
+ return IDL.Service({
24
+ 'balance' : IDL.Func([IDL.Text], [IDL.Nat32], []),
25
+ 'claim_neurons' : IDL.Func([IDL.Text], [Result], []),
26
+ 'donate_account' : IDL.Func([IDL.Text], [Result_1], []),
27
+ 'forward_whitelisted_unclaimed_accounts' : IDL.Func(
28
+ [IDL.Null],
29
+ [Result_1],
30
+ [],
31
+ ),
32
+ 'get_account' : IDL.Func([IDL.Text], [Result_2], []),
33
+ 'len' : IDL.Func([], [IDL.Nat16], []),
34
+ 'total' : IDL.Func([], [IDL.Nat32], []),
35
+ });
36
+ };
37
+ export const init = ({ IDL }) => { return []; };
@@ -0,0 +1,30 @@
1
+ type AccountState = record {
2
+ authenticated_principal_id : opt principal;
3
+ successfully_transferred_neurons : vec TransferredNeuron;
4
+ is_whitelisted_for_forwarding : bool;
5
+ has_donated : bool;
6
+ failed_transferred_neurons : vec TransferredNeuron;
7
+ neuron_ids : vec NeuronId;
8
+ has_claimed : bool;
9
+ has_forwarded : bool;
10
+ icpts : nat32;
11
+ };
12
+ type NeuronId = record { id : nat64 };
13
+ type Result = variant { Ok : vec NeuronId; Err : text };
14
+ type Result_1 = variant { Ok; Err : text };
15
+ type Result_2 = variant { Ok : AccountState; Err : text };
16
+ type TransferredNeuron = record {
17
+ error : opt text;
18
+ timestamp_seconds : nat64;
19
+ neuron_id : opt NeuronId;
20
+ };
21
+ service : {
22
+ balance : (text) -> (nat32) query;
23
+ claim_neurons : (text) -> (Result);
24
+ donate_account : (text) -> (Result_1);
25
+ forward_whitelisted_unclaimed_accounts : (null) -> (Result_1);
26
+ get_account : (text) -> (Result_2) query;
27
+ len : () -> (nat16) query;
28
+ total : () -> (nat32) query;
29
+ }
30
+
@@ -0,0 +1,10 @@
1
+ import type { IDL } from "@dfinity/candid";
2
+ export const idlFactory: IDL.InterfaceFactory;
3
+ export interface NeuronId {
4
+ id: bigint;
5
+ }
6
+
7
+ export type Result = { Ok: NeuronId[] } | { Err: string };
8
+ export interface GenesisTokenService {
9
+ claim_neurons: (arg_0: string) => Promise<Result>;
10
+ }
@@ -0,0 +1,37 @@
1
+ /* Do not edit. Compiled with ./scripts/compile-idl-js from candid/genesis_token.did */
2
+ export const idlFactory = ({ IDL }) => {
3
+ const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
4
+ const Result = IDL.Variant({ 'Ok' : IDL.Vec(NeuronId), 'Err' : IDL.Text });
5
+ const Result_1 = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : IDL.Text });
6
+ const TransferredNeuron = IDL.Record({
7
+ 'error' : IDL.Opt(IDL.Text),
8
+ 'timestamp_seconds' : IDL.Nat64,
9
+ 'neuron_id' : IDL.Opt(NeuronId),
10
+ });
11
+ const AccountState = IDL.Record({
12
+ 'authenticated_principal_id' : IDL.Opt(IDL.Principal),
13
+ 'successfully_transferred_neurons' : IDL.Vec(TransferredNeuron),
14
+ 'is_whitelisted_for_forwarding' : IDL.Bool,
15
+ 'has_donated' : IDL.Bool,
16
+ 'failed_transferred_neurons' : IDL.Vec(TransferredNeuron),
17
+ 'neuron_ids' : IDL.Vec(NeuronId),
18
+ 'has_claimed' : IDL.Bool,
19
+ 'has_forwarded' : IDL.Bool,
20
+ 'icpts' : IDL.Nat32,
21
+ });
22
+ const Result_2 = IDL.Variant({ 'Ok' : AccountState, 'Err' : IDL.Text });
23
+ return IDL.Service({
24
+ 'balance' : IDL.Func([IDL.Text], [IDL.Nat32], ['query']),
25
+ 'claim_neurons' : IDL.Func([IDL.Text], [Result], []),
26
+ 'donate_account' : IDL.Func([IDL.Text], [Result_1], []),
27
+ 'forward_whitelisted_unclaimed_accounts' : IDL.Func(
28
+ [IDL.Null],
29
+ [Result_1],
30
+ [],
31
+ ),
32
+ 'get_account' : IDL.Func([IDL.Text], [Result_2], ['query']),
33
+ 'len' : IDL.Func([], [IDL.Nat16], ['query']),
34
+ 'total' : IDL.Func([], [IDL.Nat32], ['query']),
35
+ });
36
+ };
37
+ export const init = ({ IDL }) => { return []; };
@@ -79,6 +79,7 @@ export const idlFactory = ({ IDL }) => {
79
79
  'known_neuron_data' : IDL.Opt(KnownNeuronData),
80
80
  });
81
81
  const Spawn = IDL.Record({
82
+ 'percentage_to_spawn' : IDL.Opt(IDL.Nat32),
82
83
  'new_controller' : IDL.Opt(IDL.Principal),
83
84
  'nonce' : IDL.Opt(IDL.Nat64),
84
85
  });
@@ -178,6 +179,7 @@ export const idlFactory = ({ IDL }) => {
178
179
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
179
180
  });
180
181
  const RewardNodeProviders = IDL.Record({
182
+ 'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
181
183
  'rewards' : IDL.Vec(RewardNodeProvider),
182
184
  });
183
185
  const ApproveGenesisKyc = IDL.Record({
@@ -308,6 +310,10 @@ export const idlFactory = ({ IDL }) => {
308
310
  'age_seconds' : IDL.Nat64,
309
311
  });
310
312
  const Result_4 = IDL.Variant({ 'Ok' : NeuronInfo, 'Err' : GovernanceError });
313
+ const Result_5 = IDL.Variant({
314
+ 'Ok' : NodeProvider,
315
+ 'Err' : GovernanceError,
316
+ });
311
317
  const ProposalInfo = IDL.Record({
312
318
  'id' : IDL.Opt(NeuronId),
313
319
  'status' : IDL.Int32,
@@ -337,6 +343,9 @@ export const idlFactory = ({ IDL }) => {
337
343
  'neuron_infos' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInfo)),
338
344
  'full_neurons' : IDL.Vec(Neuron),
339
345
  });
346
+ const ListNodeProvidersResponse = IDL.Record({
347
+ 'node_providers' : IDL.Vec(NodeProvider),
348
+ });
340
349
  const ListProposalInfo = IDL.Record({
341
350
  'include_reward_status' : IDL.Vec(IDL.Int32),
342
351
  'before_proposal' : IDL.Opt(NeuronId),
@@ -396,6 +405,7 @@ export const idlFactory = ({ IDL }) => {
396
405
  [],
397
406
  ),
398
407
  'get_monthly_node_provider_rewards' : IDL.Func([], [Result_3], []),
408
+ 'get_network_economics_parameters' : IDL.Func([], [NetworkEconomics], []),
399
409
  'get_neuron_ids' : IDL.Func([], [IDL.Vec(IDL.Nat64)], []),
400
410
  'get_neuron_info' : IDL.Func([IDL.Nat64], [Result_4], []),
401
411
  'get_neuron_info_by_id_or_subaccount' : IDL.Func(
@@ -403,10 +413,12 @@ export const idlFactory = ({ IDL }) => {
403
413
  [Result_4],
404
414
  [],
405
415
  ),
416
+ 'get_node_provider_by_caller' : IDL.Func([IDL.Null], [Result_5], []),
406
417
  'get_pending_proposals' : IDL.Func([], [IDL.Vec(ProposalInfo)], []),
407
418
  'get_proposal_info' : IDL.Func([IDL.Nat64], [IDL.Opt(ProposalInfo)], []),
408
419
  'list_known_neurons' : IDL.Func([], [ListKnownNeuronsResponse], []),
409
420
  'list_neurons' : IDL.Func([ListNeurons], [ListNeuronsResponse], []),
421
+ 'list_node_providers' : IDL.Func([], [ListNodeProvidersResponse], []),
410
422
  'list_proposals' : IDL.Func(
411
423
  [ListProposalInfo],
412
424
  [ListProposalInfoResponse],
@@ -497,6 +509,7 @@ export const init = ({ IDL }) => {
497
509
  'known_neuron_data' : IDL.Opt(KnownNeuronData),
498
510
  });
499
511
  const Spawn = IDL.Record({
512
+ 'percentage_to_spawn' : IDL.Opt(IDL.Nat32),
500
513
  'new_controller' : IDL.Opt(IDL.Principal),
501
514
  'nonce' : IDL.Opt(IDL.Nat64),
502
515
  });
@@ -596,6 +609,7 @@ export const init = ({ IDL }) => {
596
609
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
597
610
  });
598
611
  const RewardNodeProviders = IDL.Record({
612
+ 'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
599
613
  'rewards' : IDL.Vec(RewardNodeProvider),
600
614
  });
601
615
  const ApproveGenesisKyc = IDL.Record({
@@ -1,4 +1,6 @@
1
1
  // Generated from IC repo commit a7af3db3065aa1d6acd8160a79b4ca67b20ac63c by governance.update.sh
2
+ // Updated ae1f3a3902240ff31aa4add01122a02274522c96
3
+
2
4
  type AccountIdentifier = record { hash : vec nat8 };
3
5
  type Action = variant {
4
6
  RegisterKnownNeuron : KnownNeuron;
@@ -138,6 +140,7 @@ type ListNeuronsResponse = record {
138
140
  neuron_infos : vec record { nat64; NeuronInfo };
139
141
  full_neurons : vec Neuron;
140
142
  };
143
+ type ListNodeProvidersResponse = record { node_providers : vec NodeProvider };
141
144
  type ListProposalInfo = record {
142
145
  include_reward_status : vec int32;
143
146
  before_proposal : opt NeuronId;
@@ -278,6 +281,7 @@ type Result_1 = variant { Error : GovernanceError; NeuronId : NeuronId };
278
281
  type Result_2 = variant { Ok : Neuron; Err : GovernanceError };
279
282
  type Result_3 = variant { Ok : RewardNodeProviders; Err : GovernanceError };
280
283
  type Result_4 = variant { Ok : NeuronInfo; Err : GovernanceError };
284
+ type Result_5 = variant { Ok : NodeProvider; Err : GovernanceError };
281
285
  type RewardEvent = record {
282
286
  day_after_genesis : nat64;
283
287
  actual_timestamp_seconds : nat64;
@@ -293,14 +297,21 @@ type RewardNodeProvider = record {
293
297
  reward_mode : opt RewardMode;
294
298
  amount_e8s : nat64;
295
299
  };
296
- type RewardNodeProviders = record { rewards : vec RewardNodeProvider };
300
+ type RewardNodeProviders = record {
301
+ use_registry_derived_rewards : opt bool;
302
+ rewards : vec RewardNodeProvider;
303
+ };
297
304
  type RewardToAccount = record { to_account : opt AccountIdentifier };
298
305
  type RewardToNeuron = record { dissolve_delay_seconds : nat64 };
299
306
  type SetDefaultFollowees = record {
300
307
  default_followees : vec record { int32; Followees };
301
308
  };
302
309
  type SetDissolveTimestamp = record { dissolve_timestamp_seconds : nat64 };
303
- type Spawn = record { new_controller : opt principal; nonce : opt nat64 };
310
+ type Spawn = record {
311
+ percentage_to_spawn : opt nat32;
312
+ new_controller : opt principal;
313
+ nonce : opt nat64;
314
+ };
304
315
  type SpawnResponse = record { created_neuron_id : opt NeuronId };
305
316
  type Split = record { amount_e8s : nat64 };
306
317
  type Tally = record {
@@ -322,17 +333,20 @@ service : (Governance) -> {
322
333
  Result_2,
323
334
  ) query;
324
335
  get_monthly_node_provider_rewards : () -> (Result_3);
336
+ get_network_economics_parameters : () -> (NetworkEconomics) query;
325
337
  get_neuron_ids : () -> (vec nat64) query;
326
338
  get_neuron_info : (nat64) -> (Result_4) query;
327
339
  get_neuron_info_by_id_or_subaccount : (NeuronIdOrSubaccount) -> (
328
340
  Result_4,
329
341
  ) query;
342
+ get_node_provider_by_caller : (null) -> (Result_5) query;
330
343
  get_pending_proposals : () -> (vec ProposalInfo) query;
331
344
  get_proposal_info : (nat64) -> (opt ProposalInfo) query;
332
345
  list_known_neurons : () -> (ListKnownNeuronsResponse) query;
333
346
  list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
347
+ list_node_providers : () -> (ListNodeProvidersResponse) query;
334
348
  list_proposals : (ListProposalInfo) -> (ListProposalInfoResponse) query;
335
349
  manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
336
350
  transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result);
337
- update_node_provider : (UpdateNodeProvider) -> (Result) query;
338
- }
351
+ update_node_provider : (UpdateNodeProvider) -> (Result);
352
+ }
@@ -79,6 +79,7 @@ export const idlFactory = ({ IDL }) => {
79
79
  'known_neuron_data' : IDL.Opt(KnownNeuronData),
80
80
  });
81
81
  const Spawn = IDL.Record({
82
+ 'percentage_to_spawn' : IDL.Opt(IDL.Nat32),
82
83
  'new_controller' : IDL.Opt(IDL.Principal),
83
84
  'nonce' : IDL.Opt(IDL.Nat64),
84
85
  });
@@ -178,6 +179,7 @@ export const idlFactory = ({ IDL }) => {
178
179
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
179
180
  });
180
181
  const RewardNodeProviders = IDL.Record({
182
+ 'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
181
183
  'rewards' : IDL.Vec(RewardNodeProvider),
182
184
  });
183
185
  const ApproveGenesisKyc = IDL.Record({
@@ -308,6 +310,10 @@ export const idlFactory = ({ IDL }) => {
308
310
  'age_seconds' : IDL.Nat64,
309
311
  });
310
312
  const Result_4 = IDL.Variant({ 'Ok' : NeuronInfo, 'Err' : GovernanceError });
313
+ const Result_5 = IDL.Variant({
314
+ 'Ok' : NodeProvider,
315
+ 'Err' : GovernanceError,
316
+ });
311
317
  const ProposalInfo = IDL.Record({
312
318
  'id' : IDL.Opt(NeuronId),
313
319
  'status' : IDL.Int32,
@@ -337,6 +343,9 @@ export const idlFactory = ({ IDL }) => {
337
343
  'neuron_infos' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInfo)),
338
344
  'full_neurons' : IDL.Vec(Neuron),
339
345
  });
346
+ const ListNodeProvidersResponse = IDL.Record({
347
+ 'node_providers' : IDL.Vec(NodeProvider),
348
+ });
340
349
  const ListProposalInfo = IDL.Record({
341
350
  'include_reward_status' : IDL.Vec(IDL.Int32),
342
351
  'before_proposal' : IDL.Opt(NeuronId),
@@ -396,6 +405,11 @@ export const idlFactory = ({ IDL }) => {
396
405
  ['query'],
397
406
  ),
398
407
  'get_monthly_node_provider_rewards' : IDL.Func([], [Result_3], []),
408
+ 'get_network_economics_parameters' : IDL.Func(
409
+ [],
410
+ [NetworkEconomics],
411
+ ['query'],
412
+ ),
399
413
  'get_neuron_ids' : IDL.Func([], [IDL.Vec(IDL.Nat64)], ['query']),
400
414
  'get_neuron_info' : IDL.Func([IDL.Nat64], [Result_4], ['query']),
401
415
  'get_neuron_info_by_id_or_subaccount' : IDL.Func(
@@ -403,6 +417,7 @@ export const idlFactory = ({ IDL }) => {
403
417
  [Result_4],
404
418
  ['query'],
405
419
  ),
420
+ 'get_node_provider_by_caller' : IDL.Func([IDL.Null], [Result_5], ['query']),
406
421
  'get_pending_proposals' : IDL.Func([], [IDL.Vec(ProposalInfo)], ['query']),
407
422
  'get_proposal_info' : IDL.Func(
408
423
  [IDL.Nat64],
@@ -411,6 +426,11 @@ export const idlFactory = ({ IDL }) => {
411
426
  ),
412
427
  'list_known_neurons' : IDL.Func([], [ListKnownNeuronsResponse], ['query']),
413
428
  'list_neurons' : IDL.Func([ListNeurons], [ListNeuronsResponse], ['query']),
429
+ 'list_node_providers' : IDL.Func(
430
+ [],
431
+ [ListNodeProvidersResponse],
432
+ ['query'],
433
+ ),
414
434
  'list_proposals' : IDL.Func(
415
435
  [ListProposalInfo],
416
436
  [ListProposalInfoResponse],
@@ -418,11 +438,7 @@ export const idlFactory = ({ IDL }) => {
418
438
  ),
419
439
  'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
420
440
  'transfer_gtc_neuron' : IDL.Func([NeuronId, NeuronId], [Result], []),
421
- 'update_node_provider' : IDL.Func(
422
- [UpdateNodeProvider],
423
- [Result],
424
- ['query'],
425
- ),
441
+ 'update_node_provider' : IDL.Func([UpdateNodeProvider], [Result], []),
426
442
  });
427
443
  };
428
444
  export const init = ({ IDL }) => {
@@ -505,6 +521,7 @@ export const init = ({ IDL }) => {
505
521
  'known_neuron_data' : IDL.Opt(KnownNeuronData),
506
522
  });
507
523
  const Spawn = IDL.Record({
524
+ 'percentage_to_spawn' : IDL.Opt(IDL.Nat32),
508
525
  'new_controller' : IDL.Opt(IDL.Principal),
509
526
  'nonce' : IDL.Opt(IDL.Nat64),
510
527
  });
@@ -604,6 +621,7 @@ export const init = ({ IDL }) => {
604
621
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
605
622
  });
606
623
  const RewardNodeProviders = IDL.Record({
624
+ 'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
607
625
  'rewards' : IDL.Vec(RewardNodeProvider),
608
626
  });
609
627
  const ApproveGenesisKyc = IDL.Record({
@@ -64,7 +64,7 @@ export type Command =
64
64
  | { MergeMaturity: MergeMaturity }
65
65
  | { Disburse: Disburse };
66
66
  export type Command_1 =
67
- | { Error: GovernanceErrorDetail }
67
+ | { Error: GovernanceError }
68
68
  | { Spawn: SpawnResponse }
69
69
  | { Split: SpawnResponse }
70
70
  | { Follow: {} }
@@ -148,7 +148,7 @@ export interface GovernanceCachedMetrics {
148
148
  community_fund_total_staked_e8s: bigint;
149
149
  timestamp_seconds: bigint;
150
150
  }
151
- export interface GovernanceErrorDetail {
151
+ export interface GovernanceError {
152
152
  error_message: string;
153
153
  error_type: number;
154
154
  }
@@ -174,6 +174,9 @@ export interface ListNeuronsResponse {
174
174
  neuron_infos: Array<[bigint, NeuronInfo]>;
175
175
  full_neurons: Array<Neuron>;
176
176
  }
177
+ export interface ListNodeProvidersResponse {
178
+ node_providers: Array<NodeProvider>;
179
+ }
177
180
  export interface ListProposalInfo {
178
181
  include_reward_status: Array<number>;
179
182
  before_proposal: [] | [NeuronId];
@@ -288,7 +291,7 @@ export interface Proposal {
288
291
  }
289
292
  export interface ProposalData {
290
293
  id: [] | [NeuronId];
291
- failure_reason: [] | [GovernanceErrorDetail];
294
+ failure_reason: [] | [GovernanceError];
292
295
  ballots: Array<[bigint, Ballot]>;
293
296
  proposal_timestamp_seconds: bigint;
294
297
  reward_event_round: bigint;
@@ -305,7 +308,7 @@ export interface ProposalInfo {
305
308
  id: [] | [NeuronId];
306
309
  status: number;
307
310
  topic: number;
308
- failure_reason: [] | [GovernanceErrorDetail];
311
+ failure_reason: [] | [GovernanceError];
309
312
  ballots: Array<[bigint, Ballot]>;
310
313
  proposal_timestamp_seconds: bigint;
311
314
  reward_event_round: bigint;
@@ -326,15 +329,12 @@ export interface RegisterVote {
326
329
  export interface RemoveHotKey {
327
330
  hot_key_to_remove: [] | [Principal];
328
331
  }
329
- export type Result = { Ok: null } | { Err: GovernanceErrorDetail };
330
- export type Result_1 =
331
- | { Error: GovernanceErrorDetail }
332
- | { NeuronId: NeuronId };
333
- export type Result_2 = { Ok: Neuron } | { Err: GovernanceErrorDetail };
334
- export type Result_3 =
335
- | { Ok: RewardNodeProviders }
336
- | { Err: GovernanceErrorDetail };
337
- export type Result_4 = { Ok: NeuronInfo } | { Err: GovernanceErrorDetail };
332
+ export type Result = { Ok: null } | { Err: GovernanceError };
333
+ export type Result_1 = { Error: GovernanceError } | { NeuronId: NeuronId };
334
+ export type Result_2 = { Ok: Neuron } | { Err: GovernanceError };
335
+ export type Result_3 = { Ok: RewardNodeProviders } | { Err: GovernanceError };
336
+ export type Result_4 = { Ok: NeuronInfo } | { Err: GovernanceError };
337
+ export type Result_5 = { Ok: NodeProvider } | { Err: GovernanceError };
338
338
  export interface RewardEvent {
339
339
  day_after_genesis: bigint;
340
340
  actual_timestamp_seconds: bigint;
@@ -350,6 +350,7 @@ export interface RewardNodeProvider {
350
350
  amount_e8s: bigint;
351
351
  }
352
352
  export interface RewardNodeProviders {
353
+ use_registry_derived_rewards: [] | [boolean];
353
354
  rewards: Array<RewardNodeProvider>;
354
355
  }
355
356
  export interface RewardToAccount {
@@ -365,6 +366,7 @@ export interface SetDissolveTimestamp {
365
366
  dissolve_timestamp_seconds: bigint;
366
367
  }
367
368
  export interface Spawn {
369
+ percentage_to_spawn: [] | [number];
368
370
  new_controller: [] | [Principal];
369
371
  nonce: [] | [bigint];
370
372
  }
@@ -394,20 +396,24 @@ export interface _SERVICE {
394
396
  claim_or_refresh_neuron_from_account: (
395
397
  arg_0: ClaimOrRefreshNeuronFromAccount
396
398
  ) => Promise<ClaimOrRefreshNeuronFromAccountResponse>;
399
+ get_build_metadata: () => Promise<string>;
397
400
  get_full_neuron: (arg_0: bigint) => Promise<Result_2>;
398
401
  get_full_neuron_by_id_or_subaccount: (
399
402
  arg_0: NeuronIdOrSubaccount
400
403
  ) => Promise<Result_2>;
401
404
  get_monthly_node_provider_rewards: () => Promise<Result_3>;
405
+ get_network_economics_parameters: () => Promise<NetworkEconomics>;
402
406
  get_neuron_ids: () => Promise<Array<bigint>>;
403
407
  get_neuron_info: (arg_0: bigint) => Promise<Result_4>;
404
408
  get_neuron_info_by_id_or_subaccount: (
405
409
  arg_0: NeuronIdOrSubaccount
406
410
  ) => Promise<Result_4>;
411
+ get_node_provider_by_caller: (arg_0: null) => Promise<Result_5>;
407
412
  get_pending_proposals: () => Promise<Array<ProposalInfo>>;
408
413
  get_proposal_info: (arg_0: bigint) => Promise<[] | [ProposalInfo]>;
409
414
  list_known_neurons: () => Promise<ListKnownNeuronsResponse>;
410
415
  list_neurons: (arg_0: ListNeurons) => Promise<ListNeuronsResponse>;
416
+ list_node_providers: () => Promise<ListNodeProvidersResponse>;
411
417
  list_proposals: (
412
418
  arg_0: ListProposalInfo
413
419
  ) => Promise<ListProposalInfoResponse>;