@dfinity/sns 3.2.4 → 3.2.5-next-2024-12-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.
@@ -19,6 +19,7 @@ export type Action =
19
19
  | { UpgradeSnsControlledCanister: UpgradeSnsControlledCanister }
20
20
  | { DeregisterDappCanisters: DeregisterDappCanisters }
21
21
  | { MintSnsTokens: MintSnsTokens }
22
+ | { AdvanceSnsTargetVersion: AdvanceSnsTargetVersion }
22
23
  | { Unspecified: {} }
23
24
  | { ManageSnsMetadata: ManageSnsMetadata }
24
25
  | {
@@ -30,7 +31,8 @@ export type ActionAuxiliary =
30
31
  | {
31
32
  TransferSnsTreasuryFunds: MintSnsTokensActionAuxiliary;
32
33
  }
33
- | { MintSnsTokens: MintSnsTokensActionAuxiliary };
34
+ | { MintSnsTokens: MintSnsTokensActionAuxiliary }
35
+ | { AdvanceSnsTargetVersion: AdvanceSnsTargetVersionActionAuxiliary };
34
36
  export interface AddMaturityRequest {
35
37
  id: [] | [NeuronId];
36
38
  amount_e8s: [] | [bigint];
@@ -42,6 +44,12 @@ export interface AddNeuronPermissions {
42
44
  permissions_to_add: [] | [NeuronPermissionList];
43
45
  principal_id: [] | [Principal];
44
46
  }
47
+ export interface AdvanceSnsTargetVersion {
48
+ new_target: [] | [SnsVersion];
49
+ }
50
+ export interface AdvanceSnsTargetVersionActionAuxiliary {
51
+ target_version: [] | [SnsVersion];
52
+ }
45
53
  export interface AdvanceTargetVersionRequest {
46
54
  target_version: [] | [Version];
47
55
  }
@@ -228,7 +236,16 @@ export interface GetProposalResponse {
228
236
  }
229
237
  export interface GetRunningSnsVersionResponse {
230
238
  deployed_version: [] | [Version];
231
- pending_version: [] | [UpgradeInProgress];
239
+ pending_version:
240
+ | []
241
+ | [
242
+ {
243
+ mark_failed_at_seconds: bigint;
244
+ checking_upgrade_lock: bigint;
245
+ proposal_id: bigint;
246
+ target_version: [] | [Version];
247
+ },
248
+ ];
232
249
  }
233
250
  export interface GetSnsInitializationParametersResponse {
234
251
  sns_initialization_parameters: string;
@@ -236,12 +253,17 @@ export interface GetSnsInitializationParametersResponse {
236
253
  export interface GetTimersResponse {
237
254
  timers: [] | [Timers];
238
255
  }
239
- export type GetUpgradeJournalRequest = {};
256
+ export interface GetUpgradeJournalRequest {
257
+ offset: [] | [bigint];
258
+ limit: [] | [bigint];
259
+ }
240
260
  export interface GetUpgradeJournalResponse {
241
261
  upgrade_journal: [] | [UpgradeJournal];
242
262
  upgrade_steps: [] | [Versions];
243
263
  response_timestamp_seconds: [] | [bigint];
264
+ deployed_version: [] | [Version];
244
265
  target_version: [] | [Version];
266
+ upgrade_journal_entry_count: [] | [bigint];
245
267
  }
246
268
  export interface Governance {
247
269
  root_canister_id: [] | [Principal];
@@ -472,7 +494,7 @@ export type Participant = { NeuronsFund: NeuronsFund } | { Direct: {} };
472
494
  export interface PendingVersion {
473
495
  mark_failed_at_seconds: bigint;
474
496
  checking_upgrade_lock: bigint;
475
- proposal_id: bigint;
497
+ proposal_id: [] | [bigint];
476
498
  target_version: [] | [Version];
477
499
  }
478
500
  export interface Percentage {
@@ -542,6 +564,14 @@ export interface SetDissolveTimestamp {
542
564
  export interface SetMode {
543
565
  mode: number;
544
566
  }
567
+ export interface SnsVersion {
568
+ archive_wasm_hash: [] | [Uint8Array | number[]];
569
+ root_wasm_hash: [] | [Uint8Array | number[]];
570
+ swap_wasm_hash: [] | [Uint8Array | number[]];
571
+ ledger_wasm_hash: [] | [Uint8Array | number[]];
572
+ governance_wasm_hash: [] | [Uint8Array | number[]];
573
+ index_wasm_hash: [] | [Uint8Array | number[]];
574
+ }
545
575
  export interface Split {
546
576
  memo: bigint;
547
577
  amount_e8s: bigint;
@@ -570,6 +600,7 @@ export interface Tally {
570
600
  timestamp_seconds: bigint;
571
601
  }
572
602
  export interface TargetVersionReset {
603
+ human_readable: [] | [string];
573
604
  old_target_version: [] | [Version];
574
605
  new_target_version: [] | [Version];
575
606
  }
@@ -595,7 +626,7 @@ export interface TransferSnsTreasuryFunds {
595
626
  export interface UpgradeInProgress {
596
627
  mark_failed_at_seconds: bigint;
597
628
  checking_upgrade_lock: bigint;
598
- proposal_id: bigint;
629
+ proposal_id: [] | [bigint];
599
630
  target_version: [] | [Version];
600
631
  }
601
632
  export interface UpgradeJournal {
@@ -717,6 +748,7 @@ export interface _SERVICE {
717
748
  list_proposals: ActorMethod<[ListProposals], ListProposalsResponse>;
718
749
  manage_neuron: ActorMethod<[ManageNeuron], ManageNeuronResponse>;
719
750
  mint_tokens: ActorMethod<[MintTokensRequest], {}>;
751
+ refresh_cached_upgrade_steps: ActorMethod<[{}], {}>;
720
752
  reset_timers: ActorMethod<[{}], {}>;
721
753
  set_mode: ActorMethod<[SetMode], {}>;
722
754
  update_neuron: ActorMethod<[Neuron], [] | [GovernanceError]>;
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/sns/governance/canister/governance_test.did' by import-candid
1
+ // Generated from IC repo commit d9fe207 (2024-12-06 tags: release-2024-12-06_03-16-base) 'rs/sns/governance/canister/governance_test.did' by import-candid
2
2
  type Account = record {
3
3
  owner : opt principal;
4
4
  subaccount : opt Subaccount;
@@ -10,6 +10,7 @@ type Action = variant {
10
10
  ManageDappCanisterSettings : ManageDappCanisterSettings;
11
11
  RemoveGenericNervousSystemFunction : nat64;
12
12
  UpgradeSnsToNextVersion : record {};
13
+ AdvanceSnsTargetVersion : AdvanceSnsTargetVersion;
13
14
  RegisterDappCanisters : RegisterDappCanisters;
14
15
  TransferSnsTreasuryFunds : TransferSnsTreasuryFunds;
15
16
  UpgradeSnsControlledCanister : UpgradeSnsControlledCanister;
@@ -25,6 +26,7 @@ type Action = variant {
25
26
  type ActionAuxiliary = variant {
26
27
  TransferSnsTreasuryFunds : MintSnsTokensActionAuxiliary;
27
28
  MintSnsTokens : MintSnsTokensActionAuxiliary;
29
+ AdvanceSnsTargetVersion : AdvanceSnsTargetVersionActionAuxiliary;
28
30
  };
29
31
 
30
32
  type AddMaturityRequest = record {
@@ -267,7 +269,12 @@ type GetProposalResponse = record {
267
269
 
268
270
  type GetRunningSnsVersionResponse = record {
269
271
  deployed_version : opt Version;
270
- pending_version : opt UpgradeInProgress;
272
+ pending_version : opt record {
273
+ mark_failed_at_seconds : nat64;
274
+ checking_upgrade_lock : nat64;
275
+ proposal_id : nat64;
276
+ target_version : opt Version;
277
+ };
271
278
  };
272
279
 
273
280
  type GetSnsInitializationParametersResponse = record {
@@ -300,7 +307,7 @@ type Governance = record {
300
307
  sns_metadata : opt ManageSnsMetadata;
301
308
  neurons : vec record { text; Neuron };
302
309
  genesis_timestamp_seconds : nat64;
303
- target_version: opt Version;
310
+ target_version : opt Version;
304
311
  timers : opt Timers;
305
312
  upgrade_journal : opt UpgradeJournal;
306
313
  };
@@ -380,6 +387,19 @@ type ManageDappCanisterSettings = record {
380
387
  compute_allocation : opt nat64;
381
388
  };
382
389
 
390
+ type SnsVersion = record {
391
+ governance_wasm_hash : opt blob;
392
+ swap_wasm_hash : opt blob;
393
+ root_wasm_hash : opt blob;
394
+ index_wasm_hash : opt blob;
395
+ ledger_wasm_hash : opt blob;
396
+ archive_wasm_hash : opt blob;
397
+ };
398
+
399
+ type AdvanceSnsTargetVersion = record {
400
+ new_target : opt SnsVersion;
401
+ };
402
+
383
403
  type ManageLedgerParameters = record {
384
404
  token_symbol : opt text;
385
405
  transfer_fee : opt nat64;
@@ -433,6 +453,10 @@ type MintSnsTokensActionAuxiliary = record {
433
453
  valuation : opt Valuation;
434
454
  };
435
455
 
456
+ type AdvanceSnsTargetVersionActionAuxiliary = record {
457
+ target_version : opt SnsVersion;
458
+ };
459
+
436
460
  type MintTokensRequest = record {
437
461
  recipient : opt Account;
438
462
  amount_e8s : opt nat64;
@@ -689,14 +713,14 @@ type TransferSnsTreasuryFunds = record {
689
713
  type UpgradeInProgress = record {
690
714
  mark_failed_at_seconds : nat64;
691
715
  checking_upgrade_lock : nat64;
692
- proposal_id : nat64;
716
+ proposal_id : opt nat64;
693
717
  target_version : opt Version;
694
718
  };
695
719
 
696
720
  type PendingVersion = record {
697
721
  mark_failed_at_seconds : nat64;
698
722
  checking_upgrade_lock : nat64;
699
- proposal_id : nat64;
723
+ proposal_id : opt nat64;
700
724
  target_version : opt Version;
701
725
  };
702
726
 
@@ -771,6 +795,7 @@ type TargetVersionSet = record {
771
795
  type TargetVersionReset = record {
772
796
  new_target_version : opt Version;
773
797
  old_target_version : opt Version;
798
+ human_readable : opt text;
774
799
  };
775
800
 
776
801
  type UpgradeStarted = record {
@@ -796,13 +821,18 @@ type UpgradeJournal = record {
796
821
  entries : vec UpgradeJournalEntry;
797
822
  };
798
823
 
799
- type GetUpgradeJournalRequest = record {};
824
+ type GetUpgradeJournalRequest = record {
825
+ limit : opt nat64;
826
+ offset : opt nat64;
827
+ };
800
828
 
801
829
  type GetUpgradeJournalResponse = record {
802
830
  upgrade_steps : opt Versions;
803
831
  response_timestamp_seconds : opt nat64;
804
832
  target_version : opt Version;
833
+ deployed_version : opt Version;
805
834
  upgrade_journal : opt UpgradeJournal;
835
+ upgrade_journal_entry_count: opt nat64;
806
836
  };
807
837
 
808
838
  type AdvanceTargetVersionRequest = record { target_version : opt Version; };
@@ -822,13 +852,9 @@ service : (Governance) -> {
822
852
  get_proposal : (GetProposal) -> (GetProposalResponse) query;
823
853
  get_root_canister_status : (null) -> (CanisterStatusResultV2);
824
854
  get_running_sns_version : (record {}) -> (GetRunningSnsVersionResponse) query;
825
- get_sns_initialization_parameters : (record {}) -> (
826
- GetSnsInitializationParametersResponse,
827
- ) query;
855
+ get_sns_initialization_parameters : (record {}) -> (GetSnsInitializationParametersResponse) query;
828
856
  get_upgrade_journal : (GetUpgradeJournalRequest) -> (GetUpgradeJournalResponse) query;
829
- list_nervous_system_functions : () -> (
830
- ListNervousSystemFunctionsResponse,
831
- ) query;
857
+ list_nervous_system_functions : () -> (ListNervousSystemFunctionsResponse) query;
832
858
  list_neurons : (ListNeurons) -> (ListNeuronsResponse) query;
833
859
  list_proposals : (ListProposals) -> (ListProposalsResponse) query;
834
860
  manage_neuron : (ManageNeuron) -> (ManageNeuronResponse);
@@ -838,4 +864,5 @@ service : (Governance) -> {
838
864
  advance_target_version : (AdvanceTargetVersionRequest) -> (AdvanceTargetVersionResponse);
839
865
  reset_timers : (record {}) -> (record {});
840
866
  get_timers : (record {}) -> (GetTimersResponse) query;
867
+ refresh_cached_upgrade_steps : (record {}) -> (record {});
841
868
  }
@@ -98,6 +98,7 @@ export const idlFactory = ({ IDL }) => {
98
98
  'upgrade_steps' : IDL.Opt(Versions),
99
99
  });
100
100
  const TargetVersionReset = IDL.Record({
101
+ 'human_readable' : IDL.Opt(IDL.Text),
101
102
  'old_target_version' : IDL.Opt(Version),
102
103
  'new_target_version' : IDL.Opt(Version),
103
104
  });
@@ -165,7 +166,7 @@ export const idlFactory = ({ IDL }) => {
165
166
  const PendingVersion = IDL.Record({
166
167
  'mark_failed_at_seconds' : IDL.Nat64,
167
168
  'checking_upgrade_lock' : IDL.Nat64,
168
- 'proposal_id' : IDL.Nat64,
169
+ 'proposal_id' : IDL.Opt(IDL.Nat64),
169
170
  'target_version' : IDL.Opt(Version),
170
171
  });
171
172
  const GovernanceError = IDL.Record({
@@ -193,9 +194,21 @@ export const idlFactory = ({ IDL }) => {
193
194
  const MintSnsTokensActionAuxiliary = IDL.Record({
194
195
  'valuation' : IDL.Opt(Valuation),
195
196
  });
197
+ const SnsVersion = IDL.Record({
198
+ 'archive_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
199
+ 'root_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
200
+ 'swap_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
201
+ 'ledger_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
202
+ 'governance_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
203
+ 'index_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
204
+ });
205
+ const AdvanceSnsTargetVersionActionAuxiliary = IDL.Record({
206
+ 'target_version' : IDL.Opt(SnsVersion),
207
+ });
196
208
  const ActionAuxiliary = IDL.Variant({
197
209
  'TransferSnsTreasuryFunds' : MintSnsTokensActionAuxiliary,
198
210
  'MintSnsTokens' : MintSnsTokensActionAuxiliary,
211
+ 'AdvanceSnsTargetVersion' : AdvanceSnsTargetVersionActionAuxiliary,
199
212
  });
200
213
  const Ballot = IDL.Record({
201
214
  'vote' : IDL.Int32,
@@ -244,6 +257,9 @@ export const idlFactory = ({ IDL }) => {
244
257
  'memo' : IDL.Opt(IDL.Nat64),
245
258
  'amount_e8s' : IDL.Opt(IDL.Nat64),
246
259
  });
260
+ const AdvanceSnsTargetVersion = IDL.Record({
261
+ 'new_target' : IDL.Opt(SnsVersion),
262
+ });
247
263
  const ManageSnsMetadata = IDL.Record({
248
264
  'url' : IDL.Opt(IDL.Text),
249
265
  'logo' : IDL.Opt(IDL.Text),
@@ -272,6 +288,7 @@ export const idlFactory = ({ IDL }) => {
272
288
  'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
273
289
  'DeregisterDappCanisters' : DeregisterDappCanisters,
274
290
  'MintSnsTokens' : MintSnsTokens,
291
+ 'AdvanceSnsTargetVersion' : AdvanceSnsTargetVersion,
275
292
  'Unspecified' : IDL.Record({}),
276
293
  'ManageSnsMetadata' : ManageSnsMetadata,
277
294
  'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
@@ -533,26 +550,32 @@ export const idlFactory = ({ IDL }) => {
533
550
  'idle_cycles_burned_per_day' : IDL.Nat,
534
551
  'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
535
552
  });
536
- const UpgradeInProgress = IDL.Record({
537
- 'mark_failed_at_seconds' : IDL.Nat64,
538
- 'checking_upgrade_lock' : IDL.Nat64,
539
- 'proposal_id' : IDL.Nat64,
540
- 'target_version' : IDL.Opt(Version),
541
- });
542
553
  const GetRunningSnsVersionResponse = IDL.Record({
543
554
  'deployed_version' : IDL.Opt(Version),
544
- 'pending_version' : IDL.Opt(UpgradeInProgress),
555
+ 'pending_version' : IDL.Opt(
556
+ IDL.Record({
557
+ 'mark_failed_at_seconds' : IDL.Nat64,
558
+ 'checking_upgrade_lock' : IDL.Nat64,
559
+ 'proposal_id' : IDL.Nat64,
560
+ 'target_version' : IDL.Opt(Version),
561
+ })
562
+ ),
545
563
  });
546
564
  const GetSnsInitializationParametersResponse = IDL.Record({
547
565
  'sns_initialization_parameters' : IDL.Text,
548
566
  });
549
567
  const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });
550
- const GetUpgradeJournalRequest = IDL.Record({});
568
+ const GetUpgradeJournalRequest = IDL.Record({
569
+ 'offset' : IDL.Opt(IDL.Nat64),
570
+ 'limit' : IDL.Opt(IDL.Nat64),
571
+ });
551
572
  const GetUpgradeJournalResponse = IDL.Record({
552
573
  'upgrade_journal' : IDL.Opt(UpgradeJournal),
553
574
  'upgrade_steps' : IDL.Opt(Versions),
554
575
  'response_timestamp_seconds' : IDL.Opt(IDL.Nat64),
576
+ 'deployed_version' : IDL.Opt(Version),
555
577
  'target_version' : IDL.Opt(Version),
578
+ 'upgrade_journal_entry_count' : IDL.Opt(IDL.Nat64),
556
579
  });
557
580
  const ListNervousSystemFunctionsResponse = IDL.Record({
558
581
  'reserved_ids' : IDL.Vec(IDL.Nat64),
@@ -705,6 +728,11 @@ export const idlFactory = ({ IDL }) => {
705
728
  ),
706
729
  'manage_neuron' : IDL.Func([ManageNeuron], [ManageNeuronResponse], []),
707
730
  'mint_tokens' : IDL.Func([MintTokensRequest], [IDL.Record({})], []),
731
+ 'refresh_cached_upgrade_steps' : IDL.Func(
732
+ [IDL.Record({})],
733
+ [IDL.Record({})],
734
+ [],
735
+ ),
708
736
  'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []),
709
737
  'set_mode' : IDL.Func([SetMode], [IDL.Record({})], []),
710
738
  'update_neuron' : IDL.Func([Neuron], [IDL.Opt(GovernanceError)], []),
@@ -809,6 +837,7 @@ export const init = ({ IDL }) => {
809
837
  'upgrade_steps' : IDL.Opt(Versions),
810
838
  });
811
839
  const TargetVersionReset = IDL.Record({
840
+ 'human_readable' : IDL.Opt(IDL.Text),
812
841
  'old_target_version' : IDL.Opt(Version),
813
842
  'new_target_version' : IDL.Opt(Version),
814
843
  });
@@ -876,7 +905,7 @@ export const init = ({ IDL }) => {
876
905
  const PendingVersion = IDL.Record({
877
906
  'mark_failed_at_seconds' : IDL.Nat64,
878
907
  'checking_upgrade_lock' : IDL.Nat64,
879
- 'proposal_id' : IDL.Nat64,
908
+ 'proposal_id' : IDL.Opt(IDL.Nat64),
880
909
  'target_version' : IDL.Opt(Version),
881
910
  });
882
911
  const GovernanceError = IDL.Record({
@@ -904,9 +933,21 @@ export const init = ({ IDL }) => {
904
933
  const MintSnsTokensActionAuxiliary = IDL.Record({
905
934
  'valuation' : IDL.Opt(Valuation),
906
935
  });
936
+ const SnsVersion = IDL.Record({
937
+ 'archive_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
938
+ 'root_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
939
+ 'swap_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
940
+ 'ledger_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
941
+ 'governance_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
942
+ 'index_wasm_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
943
+ });
944
+ const AdvanceSnsTargetVersionActionAuxiliary = IDL.Record({
945
+ 'target_version' : IDL.Opt(SnsVersion),
946
+ });
907
947
  const ActionAuxiliary = IDL.Variant({
908
948
  'TransferSnsTreasuryFunds' : MintSnsTokensActionAuxiliary,
909
949
  'MintSnsTokens' : MintSnsTokensActionAuxiliary,
950
+ 'AdvanceSnsTargetVersion' : AdvanceSnsTargetVersionActionAuxiliary,
910
951
  });
911
952
  const Ballot = IDL.Record({
912
953
  'vote' : IDL.Int32,
@@ -955,6 +996,9 @@ export const init = ({ IDL }) => {
955
996
  'memo' : IDL.Opt(IDL.Nat64),
956
997
  'amount_e8s' : IDL.Opt(IDL.Nat64),
957
998
  });
999
+ const AdvanceSnsTargetVersion = IDL.Record({
1000
+ 'new_target' : IDL.Opt(SnsVersion),
1001
+ });
958
1002
  const ManageSnsMetadata = IDL.Record({
959
1003
  'url' : IDL.Opt(IDL.Text),
960
1004
  'logo' : IDL.Opt(IDL.Text),
@@ -983,6 +1027,7 @@ export const init = ({ IDL }) => {
983
1027
  'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
984
1028
  'DeregisterDappCanisters' : DeregisterDappCanisters,
985
1029
  'MintSnsTokens' : MintSnsTokens,
1030
+ 'AdvanceSnsTargetVersion' : AdvanceSnsTargetVersion,
986
1031
  'Unspecified' : IDL.Record({}),
987
1032
  'ManageSnsMetadata' : ManageSnsMetadata,
988
1033
  'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/sns/root/canister/root.did' by import-candid
1
+ // Generated from IC repo commit d9fe207 (2024-12-06 tags: release-2024-12-06_03-16-base) 'rs/sns/root/canister/root.did' by import-candid
2
2
  type CanisterCallError = record {
3
3
  code : opt int32;
4
4
  description : text;
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit cb3cb61 (2024-11-14 tags: release-2024-11-14_03-07-base) 'rs/sns/swap/canister/swap.did' by import-candid
1
+ // Generated from IC repo commit d9fe207 (2024-12-06 tags: release-2024-12-06_03-16-base) 'rs/sns/swap/canister/swap.did' by import-candid
2
2
  type BuyerState = record {
3
3
  icp : opt TransferableAmount;
4
4
  has_created_neuron_recipes : opt bool;