@dfinity/nns 0.5.0 → 0.6.0

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 (105) hide show
  1. package/README.md +1 -1
  2. package/dist/candid/genesis_token.certified.idl.d.ts +2 -0
  3. package/dist/candid/genesis_token.certified.idl.js +2 -1
  4. package/dist/candid/genesis_token.d.ts +33 -0
  5. package/dist/candid/genesis_token.did +23 -22
  6. package/dist/candid/genesis_token.idl.d.ts +0 -8
  7. package/dist/candid/genesis_token.idl.js +2 -1
  8. package/dist/candid/governance.certified.idl.js +86 -33
  9. package/dist/candid/{governanceTypes.d.ts → governance.d.ts} +28 -1
  10. package/dist/candid/governance.did +26 -5
  11. package/dist/candid/governance.idl.d.ts +0 -3
  12. package/dist/candid/governance.idl.js +86 -33
  13. package/dist/candid/ledger.certified.idl.js +1 -1
  14. package/dist/candid/{ledgerTypes.d.ts → ledger.d.ts} +0 -5
  15. package/dist/candid/ledger.did +2 -2
  16. package/dist/candid/ledger.idl.d.ts +0 -3
  17. package/dist/candid/ledger.idl.js +1 -1
  18. package/dist/candid/sns_wasm.certified.idl.d.ts +2 -0
  19. package/dist/candid/sns_wasm.certified.idl.js +117 -0
  20. package/dist/candid/sns_wasm.d.ts +106 -0
  21. package/dist/candid/sns_wasm.did +76 -0
  22. package/dist/candid/sns_wasm.idl.d.ts +2 -0
  23. package/dist/candid/sns_wasm.idl.js +117 -0
  24. package/dist/cjs/index.cjs.js +32 -32
  25. package/dist/cjs/index.cjs.js.map +3 -3
  26. package/dist/esm/account_identifier.js +1 -1
  27. package/dist/esm/chunk-CKIW7YKS.js +2 -0
  28. package/dist/esm/chunk-CKIW7YKS.js.map +7 -0
  29. package/dist/esm/{chunk-S37GZOMR.js → chunk-FZGMZSQZ.js} +3 -3
  30. package/dist/esm/chunk-FZGMZSQZ.js.map +7 -0
  31. package/dist/esm/chunk-H6I2Z4SN.js +7 -0
  32. package/dist/esm/chunk-H6I2Z4SN.js.map +7 -0
  33. package/dist/esm/{chunk-FL7E4DL3.js → chunk-IPUXUCZB.js} +2 -2
  34. package/dist/esm/chunk-IPUXUCZB.js.map +7 -0
  35. package/dist/esm/chunk-JUIC5FZJ.js +2 -0
  36. package/dist/esm/chunk-JUIC5FZJ.js.map +7 -0
  37. package/dist/esm/chunk-MGC7CRB4.js +11 -0
  38. package/dist/esm/chunk-MGC7CRB4.js.map +7 -0
  39. package/dist/esm/chunk-NN3MUNHF.js +2 -0
  40. package/dist/esm/chunk-NN3MUNHF.js.map +7 -0
  41. package/dist/esm/chunk-NNJFBVJ3.js +831 -0
  42. package/dist/esm/{chunk-EDMSX7GK.js.map → chunk-NNJFBVJ3.js.map} +3 -3
  43. package/dist/esm/{chunk-MTPVFXPH.js → chunk-RHCXRQFK.js} +2 -2
  44. package/dist/esm/{chunk-MTPVFXPH.js.map → chunk-RHCXRQFK.js.map} +1 -1
  45. package/dist/esm/chunk-TLWRX3CX.js +9 -0
  46. package/dist/esm/chunk-TLWRX3CX.js.map +7 -0
  47. package/dist/esm/genesis_token.canister.js +2 -0
  48. package/dist/esm/{genesis_token.js.map → genesis_token.canister.js.map} +0 -0
  49. package/dist/esm/governance.canister.js +2 -0
  50. package/dist/esm/{governance.js.map → governance.canister.js.map} +0 -0
  51. package/dist/esm/icp.js +1 -1
  52. package/dist/esm/index.js +1 -1
  53. package/dist/esm/index.js.map +1 -1
  54. package/dist/esm/ledger.canister.js +2 -0
  55. package/dist/esm/{ledger.js.map → ledger.canister.js.map} +0 -0
  56. package/dist/esm/sns_wasm.canister.js +2 -0
  57. package/dist/esm/sns_wasm.canister.js.map +7 -0
  58. package/dist/proto/governance.proto +2 -0
  59. package/dist/proto/governance_pb.d.ts +7 -0
  60. package/dist/proto/governance_pb.js +57 -2
  61. package/dist/types/account_identifier.d.ts +3 -1
  62. package/dist/types/canisters/governance/request.converters.d.ts +4 -3
  63. package/dist/types/canisters/governance/request.proto.converters.d.ts +2 -2
  64. package/dist/types/canisters/governance/response.converters.d.ts +12 -5
  65. package/dist/types/canisters/governance/services.d.ts +1 -2
  66. package/dist/types/canisters/ledger/ledger.request.converts.d.ts +2 -2
  67. package/dist/types/constants/canister_ids.d.ts +1 -0
  68. package/dist/types/errors/governance.errors.d.ts +2 -2
  69. package/dist/types/errors/ledger.errors.d.ts +2 -2
  70. package/dist/types/genesis_token.canister.d.ts +11 -0
  71. package/dist/types/{governance.d.ts → governance.canister.d.ts} +11 -5
  72. package/dist/types/index.d.ts +8 -5
  73. package/dist/types/{ledger.d.ts → ledger.canister.d.ts} +4 -4
  74. package/dist/types/sns_wasm.canister.d.ts +11 -0
  75. package/dist/types/types/canister.options.d.ts +8 -0
  76. package/dist/types/types/governance.options.d.ts +5 -0
  77. package/dist/types/types/governance_converters.d.ts +22 -5
  78. package/dist/types/types/ledger.options.d.ts +15 -0
  79. package/dist/types/types/ledger_converters.d.ts +3 -3
  80. package/dist/types/types/sns_wasm.options.d.ts +3 -0
  81. package/dist/types/utils/account_identifier.utils.d.ts +2 -2
  82. package/dist/types/utils/actor.utils.d.ts +14 -0
  83. package/dist/types/utils/agent.utils.d.ts +1 -1
  84. package/dist/types/utils/did.utils.d.ts +1 -0
  85. package/dist/types/utils/proto.utils.d.ts +2 -2
  86. package/package.json +9 -35
  87. package/dist/esm/chunk-BDJ6FQPO.js +0 -2
  88. package/dist/esm/chunk-BDJ6FQPO.js.map +0 -7
  89. package/dist/esm/chunk-C2ZTAHQL.js +0 -3
  90. package/dist/esm/chunk-C2ZTAHQL.js.map +0 -7
  91. package/dist/esm/chunk-CVYDMRZA.js +0 -7
  92. package/dist/esm/chunk-CVYDMRZA.js.map +0 -7
  93. package/dist/esm/chunk-EDMSX7GK.js +0 -831
  94. package/dist/esm/chunk-FL7E4DL3.js.map +0 -7
  95. package/dist/esm/chunk-KXYKDST6.js +0 -17
  96. package/dist/esm/chunk-KXYKDST6.js.map +0 -7
  97. package/dist/esm/chunk-S37GZOMR.js.map +0 -7
  98. package/dist/esm/chunk-SOPGOKKH.js +0 -2
  99. package/dist/esm/chunk-SOPGOKKH.js.map +0 -7
  100. package/dist/esm/genesis_token.js +0 -2
  101. package/dist/esm/governance.js +0 -2
  102. package/dist/esm/ledger.js +0 -2
  103. package/dist/types/genesis_token.d.ts +0 -17
  104. package/dist/types/types/governance.d.ts +0 -10
  105. package/dist/types/types/ledger.d.ts +0 -18
package/README.md CHANGED
@@ -28,4 +28,4 @@ async function main() {
28
28
  main();
29
29
  ```
30
30
 
31
- # [How-To](/HOWTO.md)
31
+ # [How-To](/HACKING.md)
@@ -0,0 +1,2 @@
1
+ import type { IDL } from "@dfinity/candid";
2
+ export const idlFactory: IDL.InterfaceFactory;
@@ -1,4 +1,4 @@
1
- /* Do not edit. Compiled with ./scripts/compile-idl-js from candid/genesis_token.did */
1
+ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/genesis_token.did */
2
2
  export const idlFactory = ({ IDL }) => {
3
3
  const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
4
4
  const Result = IDL.Variant({ 'Ok' : IDL.Vec(NeuronId), 'Err' : IDL.Text });
@@ -30,6 +30,7 @@ export const idlFactory = ({ IDL }) => {
30
30
  [],
31
31
  ),
32
32
  'get_account' : IDL.Func([IDL.Text], [Result_2], []),
33
+ 'get_build_metadata' : IDL.Func([], [IDL.Text], []),
33
34
  'len' : IDL.Func([], [IDL.Nat16], []),
34
35
  'total' : IDL.Func([], [IDL.Nat32], []),
35
36
  });
@@ -0,0 +1,33 @@
1
+ import type { Principal } from "@dfinity/principal";
2
+ export interface AccountState {
3
+ authenticated_principal_id: [] | [Principal];
4
+ successfully_transferred_neurons: Array<TransferredNeuron>;
5
+ is_whitelisted_for_forwarding: boolean;
6
+ has_donated: boolean;
7
+ failed_transferred_neurons: Array<TransferredNeuron>;
8
+ neuron_ids: Array<NeuronId>;
9
+ has_claimed: boolean;
10
+ has_forwarded: boolean;
11
+ icpts: number;
12
+ }
13
+ export interface NeuronId {
14
+ id: bigint;
15
+ }
16
+ export type Result = { Ok: Array<NeuronId> } | { Err: string };
17
+ export type Result_1 = { Ok: null } | { Err: string };
18
+ export type Result_2 = { Ok: AccountState } | { Err: string };
19
+ export interface TransferredNeuron {
20
+ error: [] | [string];
21
+ timestamp_seconds: bigint;
22
+ neuron_id: [] | [NeuronId];
23
+ }
24
+ export interface _SERVICE {
25
+ balance: (arg_0: string) => Promise<number>;
26
+ claim_neurons: (arg_0: string) => Promise<Result>;
27
+ donate_account: (arg_0: string) => Promise<Result_1>;
28
+ forward_whitelisted_unclaimed_accounts: (arg_0: null) => Promise<Result_1>;
29
+ get_account: (arg_0: string) => Promise<Result_2>;
30
+ get_build_metadata: () => Promise<string>;
31
+ len: () => Promise<number>;
32
+ total: () => Promise<number>;
33
+ }
@@ -1,30 +1,31 @@
1
+ // Generated from IC repo commit d1f1bbefafa90fd444a9088e377bf68c78ee0f3f 'rs/nns/gtc/canister/gtc.did' by import-candid
1
2
  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
- };
3
+ authenticated_principal_id : opt principal;
4
+ successfully_transferred_neurons : vec TransferredNeuron;
5
+ is_whitelisted_for_forwarding : bool;
6
+ has_donated : bool;
7
+ failed_transferred_neurons : vec TransferredNeuron;
8
+ neuron_ids : vec NeuronId;
9
+ has_claimed : bool;
10
+ has_forwarded : bool;
11
+ icpts : nat32;
12
+ };
12
13
  type NeuronId = record { id : nat64 };
13
14
  type Result = variant { Ok : vec NeuronId; Err : text };
14
15
  type Result_1 = variant { Ok; Err : text };
15
16
  type Result_2 = variant { Ok : AccountState; Err : text };
16
17
  type TransferredNeuron = record {
17
- error : opt text;
18
- timestamp_seconds : nat64;
19
- neuron_id : opt NeuronId;
18
+ error : opt text;
19
+ timestamp_seconds : nat64;
20
+ neuron_id : opt NeuronId;
20
21
  };
21
22
  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
-
23
+ balance : (text) -> (nat32) query;
24
+ claim_neurons : (text) -> (Result);
25
+ donate_account : (text) -> (Result_1);
26
+ forward_whitelisted_unclaimed_accounts : (null) -> (Result_1);
27
+ get_account : (text) -> (Result_2) query;
28
+ get_build_metadata : () -> (text) query;
29
+ len : () -> (nat16) query;
30
+ total : () -> (nat32) query;
31
+ }
@@ -1,10 +1,2 @@
1
1
  import type { IDL } from "@dfinity/candid";
2
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
- }
@@ -1,4 +1,4 @@
1
- /* Do not edit. Compiled with ./scripts/compile-idl-js from candid/genesis_token.did */
1
+ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/genesis_token.did */
2
2
  export const idlFactory = ({ IDL }) => {
3
3
  const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
4
4
  const Result = IDL.Variant({ 'Ok' : IDL.Vec(NeuronId), 'Err' : IDL.Text });
@@ -30,6 +30,7 @@ export const idlFactory = ({ IDL }) => {
30
30
  [],
31
31
  ),
32
32
  'get_account' : IDL.Func([IDL.Text], [Result_2], ['query']),
33
+ 'get_build_metadata' : IDL.Func([], [IDL.Text], ['query']),
33
34
  'len' : IDL.Func([], [IDL.Nat16], ['query']),
34
35
  'total' : IDL.Func([], [IDL.Nat32], ['query']),
35
36
  });
@@ -1,8 +1,30 @@
1
- /* Do not edit. Compiled with ./scripts/compile-idl-js from candid/governance.did */
1
+ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/governance.did */
2
2
  export const idlFactory = ({ IDL }) => {
3
3
  const Proposal = IDL.Rec();
4
4
  const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
5
5
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
6
+ const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
7
+ const NodeProvider = IDL.Record({
8
+ 'id' : IDL.Opt(IDL.Principal),
9
+ 'reward_account' : IDL.Opt(AccountIdentifier),
10
+ });
11
+ const RewardToNeuron = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64 });
12
+ const RewardToAccount = IDL.Record({
13
+ 'to_account' : IDL.Opt(AccountIdentifier),
14
+ });
15
+ const RewardMode = IDL.Variant({
16
+ 'RewardToNeuron' : RewardToNeuron,
17
+ 'RewardToAccount' : RewardToAccount,
18
+ });
19
+ const RewardNodeProvider = IDL.Record({
20
+ 'node_provider' : IDL.Opt(NodeProvider),
21
+ 'reward_mode' : IDL.Opt(RewardMode),
22
+ 'amount_e8s' : IDL.Nat64,
23
+ });
24
+ const MostRecentMonthlyNodeProviderRewards = IDL.Record({
25
+ 'timestamp' : IDL.Nat64,
26
+ 'rewards' : IDL.Vec(RewardNodeProvider),
27
+ });
6
28
  const GovernanceCachedMetrics = IDL.Record({
7
29
  'not_dissolving_neurons_e8s_buckets' : IDL.Vec(
8
30
  IDL.Tuple(IDL.Nat64, IDL.Float64)
@@ -29,11 +51,6 @@ export const idlFactory = ({ IDL }) => {
29
51
  'community_fund_total_staked_e8s' : IDL.Nat64,
30
52
  'timestamp_seconds' : IDL.Nat64,
31
53
  });
32
- const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
33
- const NodeProvider = IDL.Record({
34
- 'id' : IDL.Opt(IDL.Principal),
35
- 'reward_account' : IDL.Opt(AccountIdentifier),
36
- });
37
54
  const NetworkEconomics = IDL.Record({
38
55
  'neuron_minimum_stake_e8s' : IDL.Nat64,
39
56
  'max_proposals_to_keep_per_topic' : IDL.Nat32,
@@ -115,6 +132,7 @@ export const idlFactory = ({ IDL }) => {
115
132
  'StartDissolving' : IDL.Record({}),
116
133
  'IncreaseDissolveDelay' : IncreaseDissolveDelay,
117
134
  'JoinCommunityFund' : IDL.Record({}),
135
+ 'LeaveCommunityFund' : IDL.Record({}),
118
136
  'SetDissolveTimestamp' : SetDissolveTimestamp,
119
137
  });
120
138
  const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
@@ -162,18 +180,16 @@ export const idlFactory = ({ IDL }) => {
162
180
  'nns_function' : IDL.Int32,
163
181
  'payload' : IDL.Vec(IDL.Nat8),
164
182
  });
165
- const RewardToNeuron = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64 });
166
- const RewardToAccount = IDL.Record({
167
- 'to_account' : IDL.Opt(AccountIdentifier),
183
+ const TimeWindow = IDL.Record({
184
+ 'start_timestamp_seconds' : IDL.Nat64,
185
+ 'end_timestamp_seconds' : IDL.Nat64,
168
186
  });
169
- const RewardMode = IDL.Variant({
170
- 'RewardToNeuron' : RewardToNeuron,
171
- 'RewardToAccount' : RewardToAccount,
187
+ const SetOpenTimeWindowRequest = IDL.Record({
188
+ 'open_time_window' : IDL.Opt(TimeWindow),
172
189
  });
173
- const RewardNodeProvider = IDL.Record({
174
- 'node_provider' : IDL.Opt(NodeProvider),
175
- 'reward_mode' : IDL.Opt(RewardMode),
176
- 'amount_e8s' : IDL.Nat64,
190
+ const SetSnsTokenSwapOpenTimeWindow = IDL.Record({
191
+ 'request' : IDL.Opt(SetOpenTimeWindowRequest),
192
+ 'swap_canister_id' : IDL.Opt(IDL.Principal),
177
193
  });
178
194
  const SetDefaultFollowees = IDL.Record({
179
195
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
@@ -196,6 +212,7 @@ export const idlFactory = ({ IDL }) => {
196
212
  'ManageNeuron' : ManageNeuron,
197
213
  'ExecuteNnsFunction' : ExecuteNnsFunction,
198
214
  'RewardNodeProvider' : RewardNodeProvider,
215
+ 'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
199
216
  'SetDefaultFollowees' : SetDefaultFollowees,
200
217
  'RewardNodeProviders' : RewardNodeProviders,
201
218
  'ManageNetworkEconomics' : NetworkEconomics,
@@ -230,7 +247,7 @@ export const idlFactory = ({ IDL }) => {
230
247
  'executed_timestamp_seconds' : IDL.Nat64,
231
248
  });
232
249
  const Command_2 = IDL.Variant({
233
- 'Spawn' : Spawn,
250
+ 'Spawn' : NeuronId,
234
251
  'Split' : Split,
235
252
  'Configure' : Configure,
236
253
  'Merge' : Merge,
@@ -269,19 +286,26 @@ export const idlFactory = ({ IDL }) => {
269
286
  'neuron_fees_e8s' : IDL.Nat64,
270
287
  'transfer' : IDL.Opt(NeuronStakeTransfer),
271
288
  'known_neuron_data' : IDL.Opt(KnownNeuronData),
289
+ 'spawn_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
272
290
  });
273
291
  const Governance = IDL.Record({
274
292
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
293
+ 'most_recent_monthly_node_provider_rewards' : IDL.Opt(
294
+ MostRecentMonthlyNodeProviderRewards
295
+ ),
275
296
  'wait_for_quiet_threshold_seconds' : IDL.Nat64,
276
297
  'metrics' : IDL.Opt(GovernanceCachedMetrics),
298
+ 'cached_daily_maturity_modulation' : IDL.Opt(IDL.Float64),
277
299
  'node_providers' : IDL.Vec(NodeProvider),
278
300
  'economics' : IDL.Opt(NetworkEconomics),
301
+ 'spawning_neurons' : IDL.Opt(IDL.Bool),
279
302
  'latest_reward_event' : IDL.Opt(RewardEvent),
280
303
  'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
281
304
  'short_voting_period_seconds' : IDL.Nat64,
282
305
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
283
306
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
284
307
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
308
+ 'last_updated_maturity_modulation_cache' : IDL.Opt(IDL.Nat64),
285
309
  'genesis_timestamp_seconds' : IDL.Nat64,
286
310
  });
287
311
  const Result = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : GovernanceError });
@@ -405,6 +429,11 @@ export const idlFactory = ({ IDL }) => {
405
429
  [],
406
430
  ),
407
431
  'get_monthly_node_provider_rewards' : IDL.Func([], [Result_3], []),
432
+ 'get_most_recent_monthly_node_provider_rewards' : IDL.Func(
433
+ [],
434
+ [IDL.Opt(MostRecentMonthlyNodeProviderRewards)],
435
+ [],
436
+ ),
408
437
  'get_network_economics_parameters' : IDL.Func([], [NetworkEconomics], []),
409
438
  'get_neuron_ids' : IDL.Func([], [IDL.Vec(IDL.Nat64)], []),
410
439
  'get_neuron_info' : IDL.Func([IDL.Nat64], [Result_4], []),
@@ -433,6 +462,28 @@ export const init = ({ IDL }) => {
433
462
  const Proposal = IDL.Rec();
434
463
  const NeuronId = IDL.Record({ 'id' : IDL.Nat64 });
435
464
  const Followees = IDL.Record({ 'followees' : IDL.Vec(NeuronId) });
465
+ const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
466
+ const NodeProvider = IDL.Record({
467
+ 'id' : IDL.Opt(IDL.Principal),
468
+ 'reward_account' : IDL.Opt(AccountIdentifier),
469
+ });
470
+ const RewardToNeuron = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64 });
471
+ const RewardToAccount = IDL.Record({
472
+ 'to_account' : IDL.Opt(AccountIdentifier),
473
+ });
474
+ const RewardMode = IDL.Variant({
475
+ 'RewardToNeuron' : RewardToNeuron,
476
+ 'RewardToAccount' : RewardToAccount,
477
+ });
478
+ const RewardNodeProvider = IDL.Record({
479
+ 'node_provider' : IDL.Opt(NodeProvider),
480
+ 'reward_mode' : IDL.Opt(RewardMode),
481
+ 'amount_e8s' : IDL.Nat64,
482
+ });
483
+ const MostRecentMonthlyNodeProviderRewards = IDL.Record({
484
+ 'timestamp' : IDL.Nat64,
485
+ 'rewards' : IDL.Vec(RewardNodeProvider),
486
+ });
436
487
  const GovernanceCachedMetrics = IDL.Record({
437
488
  'not_dissolving_neurons_e8s_buckets' : IDL.Vec(
438
489
  IDL.Tuple(IDL.Nat64, IDL.Float64)
@@ -459,11 +510,6 @@ export const init = ({ IDL }) => {
459
510
  'community_fund_total_staked_e8s' : IDL.Nat64,
460
511
  'timestamp_seconds' : IDL.Nat64,
461
512
  });
462
- const AccountIdentifier = IDL.Record({ 'hash' : IDL.Vec(IDL.Nat8) });
463
- const NodeProvider = IDL.Record({
464
- 'id' : IDL.Opt(IDL.Principal),
465
- 'reward_account' : IDL.Opt(AccountIdentifier),
466
- });
467
513
  const NetworkEconomics = IDL.Record({
468
514
  'neuron_minimum_stake_e8s' : IDL.Nat64,
469
515
  'max_proposals_to_keep_per_topic' : IDL.Nat32,
@@ -545,6 +591,7 @@ export const init = ({ IDL }) => {
545
591
  'StartDissolving' : IDL.Record({}),
546
592
  'IncreaseDissolveDelay' : IncreaseDissolveDelay,
547
593
  'JoinCommunityFund' : IDL.Record({}),
594
+ 'LeaveCommunityFund' : IDL.Record({}),
548
595
  'SetDissolveTimestamp' : SetDissolveTimestamp,
549
596
  });
550
597
  const Configure = IDL.Record({ 'operation' : IDL.Opt(Operation) });
@@ -592,18 +639,16 @@ export const init = ({ IDL }) => {
592
639
  'nns_function' : IDL.Int32,
593
640
  'payload' : IDL.Vec(IDL.Nat8),
594
641
  });
595
- const RewardToNeuron = IDL.Record({ 'dissolve_delay_seconds' : IDL.Nat64 });
596
- const RewardToAccount = IDL.Record({
597
- 'to_account' : IDL.Opt(AccountIdentifier),
642
+ const TimeWindow = IDL.Record({
643
+ 'start_timestamp_seconds' : IDL.Nat64,
644
+ 'end_timestamp_seconds' : IDL.Nat64,
598
645
  });
599
- const RewardMode = IDL.Variant({
600
- 'RewardToNeuron' : RewardToNeuron,
601
- 'RewardToAccount' : RewardToAccount,
646
+ const SetOpenTimeWindowRequest = IDL.Record({
647
+ 'open_time_window' : IDL.Opt(TimeWindow),
602
648
  });
603
- const RewardNodeProvider = IDL.Record({
604
- 'node_provider' : IDL.Opt(NodeProvider),
605
- 'reward_mode' : IDL.Opt(RewardMode),
606
- 'amount_e8s' : IDL.Nat64,
649
+ const SetSnsTokenSwapOpenTimeWindow = IDL.Record({
650
+ 'request' : IDL.Opt(SetOpenTimeWindowRequest),
651
+ 'swap_canister_id' : IDL.Opt(IDL.Principal),
607
652
  });
608
653
  const SetDefaultFollowees = IDL.Record({
609
654
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
@@ -626,6 +671,7 @@ export const init = ({ IDL }) => {
626
671
  'ManageNeuron' : ManageNeuron,
627
672
  'ExecuteNnsFunction' : ExecuteNnsFunction,
628
673
  'RewardNodeProvider' : RewardNodeProvider,
674
+ 'SetSnsTokenSwapOpenTimeWindow' : SetSnsTokenSwapOpenTimeWindow,
629
675
  'SetDefaultFollowees' : SetDefaultFollowees,
630
676
  'RewardNodeProviders' : RewardNodeProviders,
631
677
  'ManageNetworkEconomics' : NetworkEconomics,
@@ -660,7 +706,7 @@ export const init = ({ IDL }) => {
660
706
  'executed_timestamp_seconds' : IDL.Nat64,
661
707
  });
662
708
  const Command_2 = IDL.Variant({
663
- 'Spawn' : Spawn,
709
+ 'Spawn' : NeuronId,
664
710
  'Split' : Split,
665
711
  'Configure' : Configure,
666
712
  'Merge' : Merge,
@@ -699,19 +745,26 @@ export const init = ({ IDL }) => {
699
745
  'neuron_fees_e8s' : IDL.Nat64,
700
746
  'transfer' : IDL.Opt(NeuronStakeTransfer),
701
747
  'known_neuron_data' : IDL.Opt(KnownNeuronData),
748
+ 'spawn_at_timestamp_seconds' : IDL.Opt(IDL.Nat64),
702
749
  });
703
750
  const Governance = IDL.Record({
704
751
  'default_followees' : IDL.Vec(IDL.Tuple(IDL.Int32, Followees)),
752
+ 'most_recent_monthly_node_provider_rewards' : IDL.Opt(
753
+ MostRecentMonthlyNodeProviderRewards
754
+ ),
705
755
  'wait_for_quiet_threshold_seconds' : IDL.Nat64,
706
756
  'metrics' : IDL.Opt(GovernanceCachedMetrics),
757
+ 'cached_daily_maturity_modulation' : IDL.Opt(IDL.Float64),
707
758
  'node_providers' : IDL.Vec(NodeProvider),
708
759
  'economics' : IDL.Opt(NetworkEconomics),
760
+ 'spawning_neurons' : IDL.Opt(IDL.Bool),
709
761
  'latest_reward_event' : IDL.Opt(RewardEvent),
710
762
  'to_claim_transfers' : IDL.Vec(NeuronStakeTransfer),
711
763
  'short_voting_period_seconds' : IDL.Nat64,
712
764
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
713
765
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
714
766
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
767
+ 'last_updated_maturity_modulation_cache' : IDL.Opt(IDL.Nat64),
715
768
  'genesis_timestamp_seconds' : IDL.Nat64,
716
769
  });
717
770
  return [Governance];
@@ -7,6 +7,7 @@ export type Action =
7
7
  | { ManageNeuron: ManageNeuron }
8
8
  | { ExecuteNnsFunction: ExecuteNnsFunction }
9
9
  | { RewardNodeProvider: RewardNodeProvider }
10
+ | { SetSnsTokenSwapOpenTimeWindow: SetSnsTokenSwapOpenTimeWindow }
10
11
  | { SetDefaultFollowees: SetDefaultFollowees }
11
12
  | { RewardNodeProviders: RewardNodeProviders }
12
13
  | { ManageNetworkEconomics: NetworkEconomics }
@@ -77,7 +78,7 @@ export type Command_1 =
77
78
  | { MergeMaturity: MergeMaturityResponse }
78
79
  | { Disburse: DisburseResponse };
79
80
  export type Command_2 =
80
- | { Spawn: Spawn }
81
+ | { Spawn: NeuronId }
81
82
  | { Split: Split }
82
83
  | { Configure: Configure }
83
84
  | { Merge: Merge }
@@ -118,16 +119,22 @@ export interface Followees {
118
119
  }
119
120
  export interface Governance {
120
121
  default_followees: Array<[number, Followees]>;
122
+ most_recent_monthly_node_provider_rewards:
123
+ | []
124
+ | [MostRecentMonthlyNodeProviderRewards];
121
125
  wait_for_quiet_threshold_seconds: bigint;
122
126
  metrics: [] | [GovernanceCachedMetrics];
127
+ cached_daily_maturity_modulation: [] | [number];
123
128
  node_providers: Array<NodeProvider>;
124
129
  economics: [] | [NetworkEconomics];
130
+ spawning_neurons: [] | [boolean];
125
131
  latest_reward_event: [] | [RewardEvent];
126
132
  to_claim_transfers: Array<NeuronStakeTransfer>;
127
133
  short_voting_period_seconds: bigint;
128
134
  proposals: Array<[bigint, ProposalData]>;
129
135
  in_flight_commands: Array<[bigint, NeuronInFlightCommand]>;
130
136
  neurons: Array<[bigint, Neuron]>;
137
+ last_updated_maturity_modulation_cache: [] | [bigint];
131
138
  genesis_timestamp_seconds: bigint;
132
139
  }
133
140
  export interface GovernanceCachedMetrics {
@@ -208,6 +215,10 @@ export interface MergeMaturityResponse {
208
215
  merged_maturity_e8s: bigint;
209
216
  new_stake_e8s: bigint;
210
217
  }
218
+ export interface MostRecentMonthlyNodeProviderRewards {
219
+ timestamp: bigint;
220
+ rewards: Array<RewardNodeProvider>;
221
+ }
211
222
  export interface Motion {
212
223
  motion_text: string;
213
224
  }
@@ -239,6 +250,7 @@ export interface Neuron {
239
250
  neuron_fees_e8s: bigint;
240
251
  transfer: [] | [NeuronStakeTransfer];
241
252
  known_neuron_data: [] | [KnownNeuronData];
253
+ spawn_at_timestamp_seconds: [] | [bigint];
242
254
  }
243
255
  export interface NeuronId {
244
256
  id: bigint;
@@ -282,6 +294,7 @@ export type Operation =
282
294
  | { StartDissolving: {} }
283
295
  | { IncreaseDissolveDelay: IncreaseDissolveDelay }
284
296
  | { JoinCommunityFund: {} }
297
+ | { LeaveCommunityFund: {} }
285
298
  | { SetDissolveTimestamp: SetDissolveTimestamp };
286
299
  export interface Proposal {
287
300
  url: string;
@@ -365,6 +378,13 @@ export interface SetDefaultFollowees {
365
378
  export interface SetDissolveTimestamp {
366
379
  dissolve_timestamp_seconds: bigint;
367
380
  }
381
+ export interface SetOpenTimeWindowRequest {
382
+ open_time_window: [] | [TimeWindow];
383
+ }
384
+ export interface SetSnsTokenSwapOpenTimeWindow {
385
+ request: [] | [SetOpenTimeWindowRequest];
386
+ swap_canister_id: [] | [Principal];
387
+ }
368
388
  export interface Spawn {
369
389
  percentage_to_spawn: [] | [number];
370
390
  new_controller: [] | [Principal];
@@ -382,6 +402,10 @@ export interface Tally {
382
402
  total: bigint;
383
403
  timestamp_seconds: bigint;
384
404
  }
405
+ export interface TimeWindow {
406
+ start_timestamp_seconds: bigint;
407
+ end_timestamp_seconds: bigint;
408
+ }
385
409
  export interface UpdateNodeProvider {
386
410
  reward_account: [] | [AccountIdentifier];
387
411
  }
@@ -402,6 +426,9 @@ export interface _SERVICE {
402
426
  arg_0: NeuronIdOrSubaccount
403
427
  ) => Promise<Result_2>;
404
428
  get_monthly_node_provider_rewards: () => Promise<Result_3>;
429
+ get_most_recent_monthly_node_provider_rewards: () => Promise<
430
+ [] | [MostRecentMonthlyNodeProviderRewards]
431
+ >;
405
432
  get_network_economics_parameters: () => Promise<NetworkEconomics>;
406
433
  get_neuron_ids: () => Promise<Array<bigint>>;
407
434
  get_neuron_info: (arg_0: bigint) => Promise<Result_4>;
@@ -1,12 +1,11 @@
1
- // Generated from IC repo commit a7af3db3065aa1d6acd8160a79b4ca67b20ac63c by governance.update.sh
2
- // Updated ae1f3a3902240ff31aa4add01122a02274522c96
3
-
1
+ // Generated from IC repo commit d1f1bbefafa90fd444a9088e377bf68c78ee0f3f 'rs/nns/governance/canister/governance.did' by import-candid
4
2
  type AccountIdentifier = record { hash : vec nat8 };
5
3
  type Action = variant {
6
4
  RegisterKnownNeuron : KnownNeuron;
7
5
  ManageNeuron : ManageNeuron;
8
6
  ExecuteNnsFunction : ExecuteNnsFunction;
9
7
  RewardNodeProvider : RewardNodeProvider;
8
+ SetSnsTokenSwapOpenTimeWindow : SetSnsTokenSwapOpenTimeWindow;
10
9
  SetDefaultFollowees : SetDefaultFollowees;
11
10
  RewardNodeProviders : RewardNodeProviders;
12
11
  ManageNetworkEconomics : NetworkEconomics;
@@ -61,7 +60,7 @@ type Command_1 = variant {
61
60
  Disburse : DisburseResponse;
62
61
  };
63
62
  type Command_2 = variant {
64
- Spawn : Spawn;
63
+ Spawn : NeuronId;
65
64
  Split : Split;
66
65
  Configure : Configure;
67
66
  Merge : Merge;
@@ -92,16 +91,20 @@ type Follow = record { topic : int32; followees : vec NeuronId };
92
91
  type Followees = record { followees : vec NeuronId };
93
92
  type Governance = record {
94
93
  default_followees : vec record { int32; Followees };
94
+ most_recent_monthly_node_provider_rewards : opt MostRecentMonthlyNodeProviderRewards;
95
95
  wait_for_quiet_threshold_seconds : nat64;
96
96
  metrics : opt GovernanceCachedMetrics;
97
+ cached_daily_maturity_modulation : opt float64;
97
98
  node_providers : vec NodeProvider;
98
99
  economics : opt NetworkEconomics;
100
+ spawning_neurons : opt bool;
99
101
  latest_reward_event : opt RewardEvent;
100
102
  to_claim_transfers : vec NeuronStakeTransfer;
101
103
  short_voting_period_seconds : nat64;
102
104
  proposals : vec record { nat64; ProposalData };
103
105
  in_flight_commands : vec record { nat64; NeuronInFlightCommand };
104
106
  neurons : vec record { nat64; Neuron };
107
+ last_updated_maturity_modulation_cache : opt nat64;
105
108
  genesis_timestamp_seconds : nat64;
106
109
  };
107
110
  type GovernanceCachedMetrics = record {
@@ -162,6 +165,10 @@ type MergeMaturityResponse = record {
162
165
  merged_maturity_e8s : nat64;
163
166
  new_stake_e8s : nat64;
164
167
  };
168
+ type MostRecentMonthlyNodeProviderRewards = record {
169
+ timestamp : nat64;
170
+ rewards : vec RewardNodeProvider;
171
+ };
165
172
  type Motion = record { motion_text : text };
166
173
  type NetworkEconomics = record {
167
174
  neuron_minimum_stake_e8s : nat64;
@@ -191,6 +198,7 @@ type Neuron = record {
191
198
  neuron_fees_e8s : nat64;
192
199
  transfer : opt NeuronStakeTransfer;
193
200
  known_neuron_data : opt KnownNeuronData;
201
+ spawn_at_timestamp_seconds : opt nat64;
194
202
  };
195
203
  type NeuronId = record { id : nat64 };
196
204
  type NeuronIdOrSubaccount = variant {
@@ -233,6 +241,7 @@ type Operation = variant {
233
241
  StartDissolving : record {};
234
242
  IncreaseDissolveDelay : IncreaseDissolveDelay;
235
243
  JoinCommunityFund : record {};
244
+ LeaveCommunityFund : record {};
236
245
  SetDissolveTimestamp : SetDissolveTimestamp;
237
246
  };
238
247
  type Proposal = record {
@@ -307,6 +316,11 @@ type SetDefaultFollowees = record {
307
316
  default_followees : vec record { int32; Followees };
308
317
  };
309
318
  type SetDissolveTimestamp = record { dissolve_timestamp_seconds : nat64 };
319
+ type SetOpenTimeWindowRequest = record { open_time_window : opt TimeWindow };
320
+ type SetSnsTokenSwapOpenTimeWindow = record {
321
+ request : opt SetOpenTimeWindowRequest;
322
+ swap_canister_id : opt principal;
323
+ };
310
324
  type Spawn = record {
311
325
  percentage_to_spawn : opt nat32;
312
326
  new_controller : opt principal;
@@ -320,6 +334,10 @@ type Tally = record {
320
334
  total : nat64;
321
335
  timestamp_seconds : nat64;
322
336
  };
337
+ type TimeWindow = record {
338
+ start_timestamp_seconds : nat64;
339
+ end_timestamp_seconds : nat64;
340
+ };
323
341
  type UpdateNodeProvider = record { reward_account : opt AccountIdentifier };
324
342
  type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 };
325
343
  service : (Governance) -> {
@@ -333,6 +351,9 @@ service : (Governance) -> {
333
351
  Result_2,
334
352
  ) query;
335
353
  get_monthly_node_provider_rewards : () -> (Result_3);
354
+ get_most_recent_monthly_node_provider_rewards : () -> (
355
+ opt MostRecentMonthlyNodeProviderRewards,
356
+ ) query;
336
357
  get_network_economics_parameters : () -> (NetworkEconomics) query;
337
358
  get_neuron_ids : () -> (vec nat64) query;
338
359
  get_neuron_info : (nat64) -> (Result_4) query;
@@ -349,4 +370,4 @@ service : (Governance) -> {
349
370
  manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
350
371
  transfer_gtc_neuron : (NeuronId, NeuronId) -> (Result);
351
372
  update_node_provider : (UpdateNodeProvider) -> (Result);
352
- }
373
+ }
@@ -1,5 +1,2 @@
1
1
  import type { IDL } from "@dfinity/candid";
2
- import { _SERVICE } from "./governanceTypes";
3
2
  export const idlFactory: IDL.InterfaceFactory;
4
-
5
- export { _SERVICE as GovernanceService };