@dfinity/sns 3.0.2 → 3.0.3-next-2024-05-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 (38) hide show
  1. package/dist/candid/sns_governance.certified.idl.js +62 -10
  2. package/dist/candid/sns_governance.d.ts +34 -0
  3. package/dist/candid/sns_governance.did +41 -15
  4. package/dist/candid/sns_governance.idl.js +62 -10
  5. package/dist/candid/sns_governance_test.certified.idl.js +62 -10
  6. package/dist/candid/sns_governance_test.d.ts +34 -0
  7. package/dist/candid/sns_governance_test.did +41 -15
  8. package/dist/candid/sns_governance_test.idl.js +62 -10
  9. package/dist/candid/sns_root.certified.idl.js +23 -1
  10. package/dist/candid/sns_root.d.ts +25 -1
  11. package/dist/candid/sns_root.did +27 -7
  12. package/dist/candid/sns_root.idl.js +23 -1
  13. package/dist/candid/sns_swap.d.ts +3 -0
  14. package/dist/candid/sns_swap.did +6 -6
  15. package/dist/cjs/index.cjs.js +1 -1
  16. package/dist/cjs/index.cjs.js.map +4 -4
  17. package/dist/esm/chunk-4GE7OJRF.js +2 -0
  18. package/dist/esm/chunk-4GE7OJRF.js.map +7 -0
  19. package/dist/esm/chunk-CQAJ2SZB.js +7 -0
  20. package/dist/esm/chunk-CQAJ2SZB.js.map +7 -0
  21. package/dist/esm/chunk-VUTJEPVF.js +2 -0
  22. package/dist/esm/chunk-VUTJEPVF.js.map +7 -0
  23. package/dist/esm/{chunk-HI3EK7WH.js → chunk-VWOOXKKM.js} +2 -2
  24. package/dist/esm/governance.canister.js +1 -1
  25. package/dist/esm/index.js +1 -1
  26. package/dist/esm/index.js.map +3 -3
  27. package/dist/esm/root.canister.js +1 -1
  28. package/dist/esm/sns.js +1 -1
  29. package/dist/esm/sns.wrapper.js +1 -1
  30. package/dist/types/root.canister.d.ts +1 -1
  31. package/package.json +7 -7
  32. package/dist/esm/chunk-HO3ELWLY.js +0 -2
  33. package/dist/esm/chunk-HO3ELWLY.js.map +0 -7
  34. package/dist/esm/chunk-TT4OPWTE.js +0 -2
  35. package/dist/esm/chunk-TT4OPWTE.js.map +0 -7
  36. package/dist/esm/chunk-WQJQSVHV.js +0 -7
  37. package/dist/esm/chunk-WQJQSVHV.js.map +0 -7
  38. /package/dist/esm/{chunk-HI3EK7WH.js.map → chunk-VWOOXKKM.js.map} +0 -0
@@ -1,4 +1,5 @@
1
1
  import type { ActorMethod } from "@dfinity/agent";
2
+ import type { IDL } from "@dfinity/candid";
2
3
  import type { Principal } from "@dfinity/principal";
3
4
 
4
5
  export interface CanisterCallError {
@@ -17,7 +18,9 @@ export interface CanisterStatusResult {
17
18
  memory_size: bigint;
18
19
  cycles: bigint;
19
20
  settings: DefiniteCanisterSettings;
21
+ idle_cycles_burned_per_day: [] | [bigint];
20
22
  module_hash: [] | [Uint8Array | number[]];
23
+ reserved_cycles: [] | [bigint];
21
24
  }
22
25
  export interface CanisterStatusResultV2 {
23
26
  status: CanisterStatusType;
@@ -41,12 +44,15 @@ export interface ChangeCanisterRequest {
41
44
  stop_before_installing: boolean;
42
45
  mode: CanisterInstallMode;
43
46
  canister_id: Principal;
44
- query_allocation: [] | [bigint];
45
47
  memory_allocation: [] | [bigint];
46
48
  compute_allocation: [] | [bigint];
47
49
  }
48
50
  export interface DefiniteCanisterSettings {
51
+ freezing_threshold: [] | [bigint];
49
52
  controllers: Array<Principal>;
53
+ reserved_cycles_limit: [] | [bigint];
54
+ memory_allocation: [] | [bigint];
55
+ compute_allocation: [] | [bigint];
50
56
  }
51
57
  export interface DefiniteCanisterSettingsArgs {
52
58
  freezing_threshold: bigint;
@@ -79,6 +85,18 @@ export interface ListSnsCanistersResponse {
79
85
  dapps: Array<Principal>;
80
86
  archives: Array<Principal>;
81
87
  }
88
+ export interface ManageDappCanisterSettingsRequest {
89
+ freezing_threshold: [] | [bigint];
90
+ canister_ids: Array<Principal>;
91
+ reserved_cycles_limit: [] | [bigint];
92
+ log_visibility: [] | [number];
93
+ wasm_memory_limit: [] | [bigint];
94
+ memory_allocation: [] | [bigint];
95
+ compute_allocation: [] | [bigint];
96
+ }
97
+ export interface ManageDappCanisterSettingsResponse {
98
+ failure_reason: [] | [string];
99
+ }
82
100
  export interface RegisterDappCanisterRequest {
83
101
  canister_id: [] | [Principal];
84
102
  }
@@ -111,6 +129,10 @@ export interface _SERVICE {
111
129
  GetSnsCanistersSummaryResponse
112
130
  >;
113
131
  list_sns_canisters: ActorMethod<[{}], ListSnsCanistersResponse>;
132
+ manage_dapp_canister_settings: ActorMethod<
133
+ [ManageDappCanisterSettingsRequest],
134
+ ManageDappCanisterSettingsResponse
135
+ >;
114
136
  register_dapp_canister: ActorMethod<[RegisterDappCanisterRequest], {}>;
115
137
  register_dapp_canisters: ActorMethod<[RegisterDappCanistersRequest], {}>;
116
138
  set_dapp_controllers: ActorMethod<
@@ -118,3 +140,5 @@ export interface _SERVICE {
118
140
  SetDappControllersResponse
119
141
  >;
120
142
  }
143
+ export declare const idlFactory: IDL.InterfaceFactory;
144
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 044cfd5 (2024-01-25 tags: release-2024-01-25_14-09+p2p-con) 'rs/sns/root/canister/root.did' by import-candid
1
+ // Generated from IC repo commit f58424c (2024-04-24 tags: release-2024-05-01_23-01-storage-layer) 'rs/sns/root/canister/root.did' by import-candid
2
2
  type CanisterCallError = record { code : opt int32; description : text };
3
3
  type CanisterIdRecord = record { canister_id : principal };
4
4
  type CanisterInstallMode = variant { reinstall; upgrade; install };
@@ -7,7 +7,9 @@ type CanisterStatusResult = record {
7
7
  memory_size : nat;
8
8
  cycles : nat;
9
9
  settings : DefiniteCanisterSettings;
10
- module_hash : opt vec nat8;
10
+ idle_cycles_burned_per_day : opt nat;
11
+ module_hash : opt blob;
12
+ reserved_cycles : opt nat;
11
13
  };
12
14
  type CanisterStatusResultV2 = record {
13
15
  status : CanisterStatusType;
@@ -15,7 +17,7 @@ type CanisterStatusResultV2 = record {
15
17
  cycles : nat;
16
18
  settings : DefiniteCanisterSettingsArgs;
17
19
  idle_cycles_burned_per_day : nat;
18
- module_hash : opt vec nat8;
20
+ module_hash : opt blob;
19
21
  };
20
22
  type CanisterStatusType = variant { stopped; stopping; running };
21
23
  type CanisterSummary = record {
@@ -23,16 +25,21 @@ type CanisterSummary = record {
23
25
  canister_id : opt principal;
24
26
  };
25
27
  type ChangeCanisterRequest = record {
26
- arg : vec nat8;
27
- wasm_module : vec nat8;
28
+ arg : blob;
29
+ wasm_module : blob;
28
30
  stop_before_installing : bool;
29
31
  mode : CanisterInstallMode;
30
32
  canister_id : principal;
31
- query_allocation : opt nat;
32
33
  memory_allocation : opt nat;
33
34
  compute_allocation : opt nat;
34
35
  };
35
- type DefiniteCanisterSettings = record { controllers : vec principal };
36
+ type DefiniteCanisterSettings = record {
37
+ freezing_threshold : opt nat;
38
+ controllers : vec principal;
39
+ reserved_cycles_limit : opt nat;
40
+ memory_allocation : opt nat;
41
+ compute_allocation : opt nat;
42
+ };
36
43
  type DefiniteCanisterSettingsArgs = record {
37
44
  freezing_threshold : nat;
38
45
  controllers : vec principal;
@@ -62,6 +69,16 @@ type ListSnsCanistersResponse = record {
62
69
  dapps : vec principal;
63
70
  archives : vec principal;
64
71
  };
72
+ type ManageDappCanisterSettingsRequest = record {
73
+ freezing_threshold : opt nat64;
74
+ canister_ids : vec principal;
75
+ reserved_cycles_limit : opt nat64;
76
+ log_visibility : opt int32;
77
+ wasm_memory_limit : opt nat64;
78
+ memory_allocation : opt nat64;
79
+ compute_allocation : opt nat64;
80
+ };
81
+ type ManageDappCanisterSettingsResponse = record { failure_reason : opt text };
65
82
  type RegisterDappCanisterRequest = record { canister_id : opt principal };
66
83
  type RegisterDappCanistersRequest = record { canister_ids : vec principal };
67
84
  type SetDappControllersRequest = record {
@@ -87,6 +104,9 @@ service : (SnsRootCanister) -> {
87
104
  GetSnsCanistersSummaryResponse,
88
105
  );
89
106
  list_sns_canisters : (record {}) -> (ListSnsCanistersResponse) query;
107
+ manage_dapp_canister_settings : (ManageDappCanisterSettingsRequest) -> (
108
+ ManageDappCanisterSettingsResponse,
109
+ );
90
110
  register_dapp_canister : (RegisterDappCanisterRequest) -> (record {});
91
111
  register_dapp_canisters : (RegisterDappCanistersRequest) -> (record {});
92
112
  set_dapp_controllers : (SetDappControllersRequest) -> (
@@ -17,14 +17,20 @@ export const idlFactory = ({ IDL }) => {
17
17
  'running' : IDL.Null,
18
18
  });
19
19
  const DefiniteCanisterSettings = IDL.Record({
20
+ 'freezing_threshold' : IDL.Opt(IDL.Nat),
20
21
  'controllers' : IDL.Vec(IDL.Principal),
22
+ 'reserved_cycles_limit' : IDL.Opt(IDL.Nat),
23
+ 'memory_allocation' : IDL.Opt(IDL.Nat),
24
+ 'compute_allocation' : IDL.Opt(IDL.Nat),
21
25
  });
22
26
  const CanisterStatusResult = IDL.Record({
23
27
  'status' : CanisterStatusType,
24
28
  'memory_size' : IDL.Nat,
25
29
  'cycles' : IDL.Nat,
26
30
  'settings' : DefiniteCanisterSettings,
31
+ 'idle_cycles_burned_per_day' : IDL.Opt(IDL.Nat),
27
32
  'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
33
+ 'reserved_cycles' : IDL.Opt(IDL.Nat),
28
34
  });
29
35
  const CanisterInstallMode = IDL.Variant({
30
36
  'reinstall' : IDL.Null,
@@ -37,7 +43,6 @@ export const idlFactory = ({ IDL }) => {
37
43
  'stop_before_installing' : IDL.Bool,
38
44
  'mode' : CanisterInstallMode,
39
45
  'canister_id' : IDL.Principal,
40
- 'query_allocation' : IDL.Opt(IDL.Nat),
41
46
  'memory_allocation' : IDL.Opt(IDL.Nat),
42
47
  'compute_allocation' : IDL.Opt(IDL.Nat),
43
48
  });
@@ -80,6 +85,18 @@ export const idlFactory = ({ IDL }) => {
80
85
  'dapps' : IDL.Vec(IDL.Principal),
81
86
  'archives' : IDL.Vec(IDL.Principal),
82
87
  });
88
+ const ManageDappCanisterSettingsRequest = IDL.Record({
89
+ 'freezing_threshold' : IDL.Opt(IDL.Nat64),
90
+ 'canister_ids' : IDL.Vec(IDL.Principal),
91
+ 'reserved_cycles_limit' : IDL.Opt(IDL.Nat64),
92
+ 'log_visibility' : IDL.Opt(IDL.Int32),
93
+ 'wasm_memory_limit' : IDL.Opt(IDL.Nat64),
94
+ 'memory_allocation' : IDL.Opt(IDL.Nat64),
95
+ 'compute_allocation' : IDL.Opt(IDL.Nat64),
96
+ });
97
+ const ManageDappCanisterSettingsResponse = IDL.Record({
98
+ 'failure_reason' : IDL.Opt(IDL.Text),
99
+ });
83
100
  const RegisterDappCanisterRequest = IDL.Record({
84
101
  'canister_id' : IDL.Opt(IDL.Principal),
85
102
  });
@@ -119,6 +136,11 @@ export const idlFactory = ({ IDL }) => {
119
136
  [ListSnsCanistersResponse],
120
137
  ['query'],
121
138
  ),
139
+ 'manage_dapp_canister_settings' : IDL.Func(
140
+ [ManageDappCanisterSettingsRequest],
141
+ [ManageDappCanisterSettingsResponse],
142
+ [],
143
+ ),
122
144
  'register_dapp_canister' : IDL.Func(
123
145
  [RegisterDappCanisterRequest],
124
146
  [IDL.Record({})],
@@ -1,4 +1,5 @@
1
1
  import type { ActorMethod } from "@dfinity/agent";
2
+ import type { IDL } from "@dfinity/candid";
2
3
  import type { Principal } from "@dfinity/principal";
3
4
 
4
5
  export interface BuyerState {
@@ -395,3 +396,5 @@ export interface _SERVICE {
395
396
  >;
396
397
  restore_dapp_controllers: ActorMethod<[{}], SetDappControllersCallResult>;
397
398
  }
399
+ export declare const idlFactory: IDL.InterfaceFactory;
400
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 044cfd5 (2024-01-25 tags: release-2024-01-25_14-09+p2p-con) 'rs/sns/swap/canister/swap.did' by import-candid
1
+ // Generated from IC repo commit f58424c (2024-04-24 tags: release-2024-05-01_23-01-storage-layer) '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;
@@ -10,7 +10,7 @@ type CanisterStatusResultV2 = record {
10
10
  cycles : nat;
11
11
  settings : DefiniteCanisterSettingsArgs;
12
12
  idle_cycles_burned_per_day : nat;
13
- module_hash : opt vec nat8;
13
+ module_hash : opt blob;
14
14
  };
15
15
  type CanisterStatusType = variant { stopped; stopping; running };
16
16
  type CfInvestment = record { hotkey_principal : text; nns_neuron_id : nat64 };
@@ -92,7 +92,7 @@ type GetOpenTicketResponse = record { result : opt Result_1 };
92
92
  type GetSaleParametersResponse = record { params : opt Params };
93
93
  type GetStateResponse = record { swap : opt Swap; derived : opt DerivedState };
94
94
  type GovernanceError = record { error_message : text; error_type : int32 };
95
- type Icrc1Account = record { owner : opt principal; subaccount : opt vec nat8 };
95
+ type Icrc1Account = record { owner : opt principal; subaccount : opt blob };
96
96
  type IdealMatchedParticipationFunction = record {
97
97
  serialized_representation : opt text;
98
98
  };
@@ -164,7 +164,7 @@ type NeuronBasketConstructionParameters = record {
164
164
  dissolve_delay_interval_seconds : nat64;
165
165
  count : nat64;
166
166
  };
167
- type NeuronId = record { id : vec nat8 };
167
+ type NeuronId = record { id : blob };
168
168
  type NeuronsFundParticipants = record { cf_participants : vec CfParticipant };
169
169
  type NeuronsFundParticipationConstraints = record {
170
170
  coefficient_intervals : vec LinearScalingCoefficient;
@@ -173,7 +173,7 @@ type NeuronsFundParticipationConstraints = record {
173
173
  ideal_matched_participation_function : opt IdealMatchedParticipationFunction;
174
174
  };
175
175
  type NewSaleTicketRequest = record {
176
- subaccount : opt vec nat8;
176
+ subaccount : opt blob;
177
177
  amount_icp_e8s : nat64;
178
178
  };
179
179
  type NewSaleTicketResponse = record { result : opt Result_2 };
@@ -252,7 +252,7 @@ type Swap = record {
252
252
  purge_old_tickets_last_completion_timestamp_nanoseconds : opt nat64;
253
253
  direct_participation_icp_e8s : opt nat64;
254
254
  lifecycle : int32;
255
- purge_old_tickets_next_principal : opt vec nat8;
255
+ purge_old_tickets_next_principal : opt blob;
256
256
  decentralization_swap_termination_timestamp_seconds : opt nat64;
257
257
  buyers : vec record { text; BuyerState };
258
258
  params : opt Params;