@dfinity/sns 4.1.2 → 5.0.0-next-2025-10-20

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 (76) hide show
  1. package/README.md +1 -1
  2. package/dist/candid/sns_governance.certified.idl.d.ts +1 -1
  3. package/dist/candid/sns_governance.certified.idl.js +1003 -1005
  4. package/dist/candid/sns_governance.d.ts +11 -3
  5. package/dist/candid/sns_governance.idl.d.ts +1 -1
  6. package/dist/candid/sns_governance.idl.js +1011 -1021
  7. package/dist/candid/sns_governance_test.certified.idl.d.ts +1 -1
  8. package/dist/candid/sns_governance_test.certified.idl.js +1021 -1023
  9. package/dist/candid/sns_governance_test.d.ts +11 -3
  10. package/dist/candid/sns_governance_test.idl.d.ts +1 -1
  11. package/dist/candid/sns_governance_test.idl.js +1029 -1039
  12. package/dist/candid/sns_root.certified.idl.d.ts +1 -1
  13. package/dist/candid/sns_root.certified.idl.js +183 -177
  14. package/dist/candid/sns_root.d.ts +11 -3
  15. package/dist/candid/sns_root.idl.d.ts +1 -1
  16. package/dist/candid/sns_root.idl.js +183 -177
  17. package/dist/candid/sns_swap.certified.idl.d.ts +1 -1
  18. package/dist/candid/sns_swap.certified.idl.js +359 -355
  19. package/dist/candid/sns_swap.d.ts +11 -3
  20. package/dist/candid/sns_swap.idl.d.ts +1 -1
  21. package/dist/candid/sns_swap.idl.js +367 -363
  22. package/dist/{types/converters → converters}/governance.converters.d.ts +1 -1
  23. package/dist/{types/converters → converters}/swap.converters.d.ts +1 -1
  24. package/dist/{types/errors → errors}/swap.errors.d.ts +1 -1
  25. package/dist/{types/governance.canister.d.ts → governance.canister.d.ts} +1 -1
  26. package/dist/{types/governance_test.canister.d.ts → governance_test.canister.d.ts} +1 -1
  27. package/dist/{types/index.d.ts → index.d.ts} +3 -3
  28. package/dist/index.js +7 -1
  29. package/dist/index.js.map +7 -0
  30. package/dist/index.mjs +9 -0
  31. package/dist/index.mjs.map +7 -0
  32. package/dist/{types/root.canister.d.ts → root.canister.d.ts} +1 -1
  33. package/dist/{types/sns.d.ts → sns.d.ts} +2 -2
  34. package/dist/{types/sns.wrapper.d.ts → sns.wrapper.d.ts} +3 -3
  35. package/dist/{types/swap.canister.d.ts → swap.canister.d.ts} +1 -1
  36. package/dist/types/{types/actions.d.ts → actions.d.ts} +2 -2
  37. package/dist/types/{types/canister.options.d.ts → canister.options.d.ts} +1 -1
  38. package/dist/types/{types/governance.params.d.ts → governance.params.d.ts} +2 -2
  39. package/dist/types/{types/governance_test.params.d.ts → governance_test.params.d.ts} +1 -1
  40. package/dist/{types/utils → utils}/governance.utils.d.ts +1 -1
  41. package/package.json +23 -12
  42. package/dist/cjs/index.cjs.js +0 -7
  43. package/dist/cjs/index.cjs.js.map +0 -7
  44. package/dist/esm/chunk-4E6G4JED.js +0 -2
  45. package/dist/esm/chunk-4E6G4JED.js.map +0 -7
  46. package/dist/esm/chunk-4INNMFYU.js +0 -2
  47. package/dist/esm/chunk-4INNMFYU.js.map +0 -7
  48. package/dist/esm/chunk-4OISOQSJ.js +0 -2
  49. package/dist/esm/chunk-4OISOQSJ.js.map +0 -7
  50. package/dist/esm/chunk-BJBCLIED.js +0 -2
  51. package/dist/esm/chunk-BJBCLIED.js.map +0 -7
  52. package/dist/esm/chunk-EYIWJ4DL.js +0 -2
  53. package/dist/esm/chunk-EYIWJ4DL.js.map +0 -7
  54. package/dist/esm/chunk-Y6XGADSI.js +0 -7
  55. package/dist/esm/chunk-Y6XGADSI.js.map +0 -7
  56. package/dist/esm/governance.canister.js +0 -2
  57. package/dist/esm/governance.canister.js.map +0 -7
  58. package/dist/esm/index.js +0 -2
  59. package/dist/esm/index.js.map +0 -7
  60. package/dist/esm/root.canister.js +0 -2
  61. package/dist/esm/root.canister.js.map +0 -7
  62. package/dist/esm/sns.js +0 -2
  63. package/dist/esm/sns.js.map +0 -7
  64. package/dist/esm/sns.wrapper.js +0 -2
  65. package/dist/esm/sns.wrapper.js.map +0 -7
  66. package/dist/esm/swap.canister.js +0 -2
  67. package/dist/esm/swap.canister.js.map +0 -7
  68. package/dist/index.cjs.js +0 -1
  69. /package/dist/{types/constants → constants}/governance.constants.d.ts +0 -0
  70. /package/dist/{types/enums → enums}/governance.enums.d.ts +0 -0
  71. /package/dist/{types/enums → enums}/swap.enums.d.ts +0 -0
  72. /package/dist/{types/errors → errors}/common.errors.d.ts +0 -0
  73. /package/dist/{types/errors → errors}/governance.errors.d.ts +0 -0
  74. /package/dist/types/{types/common.d.ts → common.d.ts} +0 -0
  75. /package/dist/types/{types/swap.params.d.ts → swap.params.d.ts} +0 -0
  76. /package/dist/{types/utils → utils}/error.utils.d.ts +0 -0
@@ -1,495 +1,499 @@
1
- /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_swap.did */
1
+ /* eslint-disable */
2
+
3
+ // @ts-nocheck
4
+
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
6
+ // You should NOT make any changes in this file as it will be overwritten.
7
+ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
+
2
9
  export const idlFactory = ({ IDL }) => {
3
10
  const NeuronBasketConstructionParameters = IDL.Record({
4
- 'dissolve_delay_interval_seconds' : IDL.Nat64,
5
- 'count' : IDL.Nat64,
11
+ dissolve_delay_interval_seconds: IDL.Nat64,
12
+ count: IDL.Nat64,
6
13
  });
7
14
  const LinearScalingCoefficient = IDL.Record({
8
- 'slope_numerator' : IDL.Opt(IDL.Nat64),
9
- 'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),
10
- 'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
11
- 'slope_denominator' : IDL.Opt(IDL.Nat64),
12
- 'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
15
+ slope_numerator: IDL.Opt(IDL.Nat64),
16
+ intercept_icp_e8s: IDL.Opt(IDL.Nat64),
17
+ from_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
18
+ slope_denominator: IDL.Opt(IDL.Nat64),
19
+ to_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
13
20
  });
14
21
  const IdealMatchedParticipationFunction = IDL.Record({
15
- 'serialized_representation' : IDL.Opt(IDL.Text),
22
+ serialized_representation: IDL.Opt(IDL.Text),
16
23
  });
17
24
  const NeuronsFundParticipationConstraints = IDL.Record({
18
- 'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
19
- 'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
20
- 'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
21
- 'ideal_matched_participation_function' : IDL.Opt(
22
- IdealMatchedParticipationFunction
25
+ coefficient_intervals: IDL.Vec(LinearScalingCoefficient),
26
+ max_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
27
+ min_direct_participation_threshold_icp_e8s: IDL.Opt(IDL.Nat64),
28
+ ideal_matched_participation_function: IDL.Opt(
29
+ IdealMatchedParticipationFunction,
23
30
  ),
24
31
  });
25
- const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });
32
+ const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
26
33
  const Init = IDL.Record({
27
- 'nns_proposal_id' : IDL.Opt(IDL.Nat64),
28
- 'sns_root_canister_id' : IDL.Text,
29
- 'neurons_fund_participation' : IDL.Opt(IDL.Bool),
30
- 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
31
- 'neuron_basket_construction_parameters' : IDL.Opt(
32
- NeuronBasketConstructionParameters
34
+ nns_proposal_id: IDL.Opt(IDL.Nat64),
35
+ sns_root_canister_id: IDL.Text,
36
+ neurons_fund_participation: IDL.Opt(IDL.Bool),
37
+ min_participant_icp_e8s: IDL.Opt(IDL.Nat64),
38
+ neuron_basket_construction_parameters: IDL.Opt(
39
+ NeuronBasketConstructionParameters,
33
40
  ),
34
- 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),
35
- 'max_icp_e8s' : IDL.Opt(IDL.Nat64),
36
- 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
37
- 'confirmation_text' : IDL.Opt(IDL.Text),
38
- 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),
39
- 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),
40
- 'min_participants' : IDL.Opt(IDL.Nat32),
41
- 'sns_token_e8s' : IDL.Opt(IDL.Nat64),
42
- 'nns_governance_canister_id' : IDL.Text,
43
- 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
44
- 'icp_ledger_canister_id' : IDL.Text,
45
- 'sns_ledger_canister_id' : IDL.Text,
46
- 'neurons_fund_participation_constraints' : IDL.Opt(
47
- NeuronsFundParticipationConstraints
41
+ fallback_controller_principal_ids: IDL.Vec(IDL.Text),
42
+ max_icp_e8s: IDL.Opt(IDL.Nat64),
43
+ neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
44
+ confirmation_text: IDL.Opt(IDL.Text),
45
+ swap_start_timestamp_seconds: IDL.Opt(IDL.Nat64),
46
+ swap_due_timestamp_seconds: IDL.Opt(IDL.Nat64),
47
+ min_participants: IDL.Opt(IDL.Nat32),
48
+ sns_token_e8s: IDL.Opt(IDL.Nat64),
49
+ nns_governance_canister_id: IDL.Text,
50
+ transaction_fee_e8s: IDL.Opt(IDL.Nat64),
51
+ icp_ledger_canister_id: IDL.Text,
52
+ sns_ledger_canister_id: IDL.Text,
53
+ neurons_fund_participation_constraints: IDL.Opt(
54
+ NeuronsFundParticipationConstraints,
48
55
  ),
49
- 'should_auto_finalize' : IDL.Opt(IDL.Bool),
50
- 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
51
- 'sns_governance_canister_id' : IDL.Text,
52
- 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
53
- 'restricted_countries' : IDL.Opt(Countries),
54
- 'min_icp_e8s' : IDL.Opt(IDL.Nat64),
55
- 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
56
+ should_auto_finalize: IDL.Opt(IDL.Bool),
57
+ max_participant_icp_e8s: IDL.Opt(IDL.Nat64),
58
+ sns_governance_canister_id: IDL.Text,
59
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
60
+ restricted_countries: IDL.Opt(Countries),
61
+ min_icp_e8s: IDL.Opt(IDL.Nat64),
62
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
56
63
  });
57
64
  const ErrorRefundIcpRequest = IDL.Record({
58
- 'source_principal_id' : IDL.Opt(IDL.Principal),
65
+ source_principal_id: IDL.Opt(IDL.Principal),
59
66
  });
60
- const Ok = IDL.Record({ 'block_height' : IDL.Opt(IDL.Nat64) });
67
+ const Ok = IDL.Record({ block_height: IDL.Opt(IDL.Nat64) });
61
68
  const Err = IDL.Record({
62
- 'description' : IDL.Opt(IDL.Text),
63
- 'error_type' : IDL.Opt(IDL.Int32),
69
+ description: IDL.Opt(IDL.Text),
70
+ error_type: IDL.Opt(IDL.Int32),
64
71
  });
65
- const Result = IDL.Variant({ 'Ok' : Ok, 'Err' : Err });
66
- const ErrorRefundIcpResponse = IDL.Record({ 'result' : IDL.Opt(Result) });
72
+ const Result = IDL.Variant({ Ok: Ok, Err: Err });
73
+ const ErrorRefundIcpResponse = IDL.Record({ result: IDL.Opt(Result) });
67
74
  const CanisterCallError = IDL.Record({
68
- 'code' : IDL.Opt(IDL.Int32),
69
- 'description' : IDL.Text,
75
+ code: IDL.Opt(IDL.Int32),
76
+ description: IDL.Text,
70
77
  });
71
78
  const FailedUpdate = IDL.Record({
72
- 'err' : IDL.Opt(CanisterCallError),
73
- 'dapp_canister_id' : IDL.Opt(IDL.Principal),
79
+ err: IDL.Opt(CanisterCallError),
80
+ dapp_canister_id: IDL.Opt(IDL.Principal),
74
81
  });
75
82
  const SetDappControllersResponse = IDL.Record({
76
- 'failed_updates' : IDL.Vec(FailedUpdate),
83
+ failed_updates: IDL.Vec(FailedUpdate),
77
84
  });
78
85
  const Possibility = IDL.Variant({
79
- 'Ok' : SetDappControllersResponse,
80
- 'Err' : CanisterCallError,
86
+ Ok: SetDappControllersResponse,
87
+ Err: CanisterCallError,
81
88
  });
82
89
  const SetDappControllersCallResult = IDL.Record({
83
- 'possibility' : IDL.Opt(Possibility),
90
+ possibility: IDL.Opt(Possibility),
84
91
  });
85
92
  const SweepResult = IDL.Record({
86
- 'failure' : IDL.Nat32,
87
- 'skipped' : IDL.Nat32,
88
- 'invalid' : IDL.Nat32,
89
- 'success' : IDL.Nat32,
90
- 'global_failures' : IDL.Nat32,
93
+ failure: IDL.Nat32,
94
+ skipped: IDL.Nat32,
95
+ invalid: IDL.Nat32,
96
+ success: IDL.Nat32,
97
+ global_failures: IDL.Nat32,
91
98
  });
92
99
  const GovernanceError = IDL.Record({
93
- 'error_message' : IDL.Text,
94
- 'error_type' : IDL.Int32,
100
+ error_message: IDL.Text,
101
+ error_type: IDL.Int32,
95
102
  });
96
103
  const Response = IDL.Record({
97
- 'governance_error' : IDL.Opt(GovernanceError),
104
+ governance_error: IDL.Opt(GovernanceError),
98
105
  });
99
106
  const Possibility_1 = IDL.Variant({
100
- 'Ok' : Response,
101
- 'Err' : CanisterCallError,
107
+ Ok: Response,
108
+ Err: CanisterCallError,
102
109
  });
103
110
  const SettleCommunityFundParticipationResult = IDL.Record({
104
- 'possibility' : IDL.Opt(Possibility_1),
111
+ possibility: IDL.Opt(Possibility_1),
105
112
  });
106
113
  const Ok_1 = IDL.Record({
107
- 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
108
- 'neurons_fund_neurons_count' : IDL.Opt(IDL.Nat64),
114
+ neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
115
+ neurons_fund_neurons_count: IDL.Opt(IDL.Nat64),
109
116
  });
110
- const Error = IDL.Record({ 'message' : IDL.Opt(IDL.Text) });
111
- const Possibility_2 = IDL.Variant({ 'Ok' : Ok_1, 'Err' : Error });
117
+ const Error = IDL.Record({ message: IDL.Opt(IDL.Text) });
118
+ const Possibility_2 = IDL.Variant({ Ok: Ok_1, Err: Error });
112
119
  const SettleNeuronsFundParticipationResult = IDL.Record({
113
- 'possibility' : IDL.Opt(Possibility_2),
120
+ possibility: IDL.Opt(Possibility_2),
114
121
  });
115
122
  const Possibility_3 = IDL.Variant({
116
- 'Ok' : IDL.Record({}),
117
- 'Err' : CanisterCallError,
123
+ Ok: IDL.Record({}),
124
+ Err: CanisterCallError,
118
125
  });
119
126
  const SetModeCallResult = IDL.Record({
120
- 'possibility' : IDL.Opt(Possibility_3),
127
+ possibility: IDL.Opt(Possibility_3),
121
128
  });
122
129
  const FinalizeSwapResponse = IDL.Record({
123
- 'set_dapp_controllers_call_result' : IDL.Opt(SetDappControllersCallResult),
124
- 'create_sns_neuron_recipes_result' : IDL.Opt(SweepResult),
125
- 'settle_community_fund_participation_result' : IDL.Opt(
126
- SettleCommunityFundParticipationResult
130
+ set_dapp_controllers_call_result: IDL.Opt(SetDappControllersCallResult),
131
+ create_sns_neuron_recipes_result: IDL.Opt(SweepResult),
132
+ settle_community_fund_participation_result: IDL.Opt(
133
+ SettleCommunityFundParticipationResult,
127
134
  ),
128
- 'error_message' : IDL.Opt(IDL.Text),
129
- 'settle_neurons_fund_participation_result' : IDL.Opt(
130
- SettleNeuronsFundParticipationResult
135
+ error_message: IDL.Opt(IDL.Text),
136
+ settle_neurons_fund_participation_result: IDL.Opt(
137
+ SettleNeuronsFundParticipationResult,
131
138
  ),
132
- 'set_mode_call_result' : IDL.Opt(SetModeCallResult),
133
- 'sweep_icp_result' : IDL.Opt(SweepResult),
134
- 'claim_neuron_result' : IDL.Opt(SweepResult),
135
- 'sweep_sns_result' : IDL.Opt(SweepResult),
139
+ set_mode_call_result: IDL.Opt(SetModeCallResult),
140
+ sweep_icp_result: IDL.Opt(SweepResult),
141
+ claim_neuron_result: IDL.Opt(SweepResult),
142
+ sweep_sns_result: IDL.Opt(SweepResult),
136
143
  });
137
144
  const GetAutoFinalizationStatusResponse = IDL.Record({
138
- 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),
139
- 'has_auto_finalize_been_attempted' : IDL.Opt(IDL.Bool),
140
- 'is_auto_finalize_enabled' : IDL.Opt(IDL.Bool),
145
+ auto_finalize_swap_response: IDL.Opt(FinalizeSwapResponse),
146
+ has_auto_finalize_been_attempted: IDL.Opt(IDL.Bool),
147
+ is_auto_finalize_enabled: IDL.Opt(IDL.Bool),
141
148
  });
142
149
  const GetBuyerStateRequest = IDL.Record({
143
- 'principal_id' : IDL.Opt(IDL.Principal),
150
+ principal_id: IDL.Opt(IDL.Principal),
144
151
  });
145
152
  const TransferableAmount = IDL.Record({
146
- 'transfer_fee_paid_e8s' : IDL.Opt(IDL.Nat64),
147
- 'transfer_start_timestamp_seconds' : IDL.Nat64,
148
- 'amount_e8s' : IDL.Nat64,
149
- 'amount_transferred_e8s' : IDL.Opt(IDL.Nat64),
150
- 'transfer_success_timestamp_seconds' : IDL.Nat64,
153
+ transfer_fee_paid_e8s: IDL.Opt(IDL.Nat64),
154
+ transfer_start_timestamp_seconds: IDL.Nat64,
155
+ amount_e8s: IDL.Nat64,
156
+ amount_transferred_e8s: IDL.Opt(IDL.Nat64),
157
+ transfer_success_timestamp_seconds: IDL.Nat64,
151
158
  });
152
159
  const BuyerState = IDL.Record({
153
- 'icp' : IDL.Opt(TransferableAmount),
154
- 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
160
+ icp: IDL.Opt(TransferableAmount),
161
+ has_created_neuron_recipes: IDL.Opt(IDL.Bool),
155
162
  });
156
163
  const GetBuyerStateResponse = IDL.Record({
157
- 'buyer_state' : IDL.Opt(BuyerState),
164
+ buyer_state: IDL.Opt(BuyerState),
158
165
  });
159
- const GetBuyersTotalResponse = IDL.Record({ 'buyers_total' : IDL.Nat64 });
166
+ const GetBuyersTotalResponse = IDL.Record({ buyers_total: IDL.Nat64 });
160
167
  const MemoryMetrics = IDL.Record({
161
- 'wasm_binary_size' : IDL.Opt(IDL.Nat),
162
- 'wasm_chunk_store_size' : IDL.Opt(IDL.Nat),
163
- 'canister_history_size' : IDL.Opt(IDL.Nat),
164
- 'stable_memory_size' : IDL.Opt(IDL.Nat),
165
- 'snapshots_size' : IDL.Opt(IDL.Nat),
166
- 'wasm_memory_size' : IDL.Opt(IDL.Nat),
167
- 'global_memory_size' : IDL.Opt(IDL.Nat),
168
- 'custom_sections_size' : IDL.Opt(IDL.Nat),
168
+ wasm_binary_size: IDL.Opt(IDL.Nat),
169
+ wasm_chunk_store_size: IDL.Opt(IDL.Nat),
170
+ canister_history_size: IDL.Opt(IDL.Nat),
171
+ stable_memory_size: IDL.Opt(IDL.Nat),
172
+ snapshots_size: IDL.Opt(IDL.Nat),
173
+ wasm_memory_size: IDL.Opt(IDL.Nat),
174
+ global_memory_size: IDL.Opt(IDL.Nat),
175
+ custom_sections_size: IDL.Opt(IDL.Nat),
169
176
  });
170
177
  const CanisterStatusType = IDL.Variant({
171
- 'stopped' : IDL.Null,
172
- 'stopping' : IDL.Null,
173
- 'running' : IDL.Null,
178
+ stopped: IDL.Null,
179
+ stopping: IDL.Null,
180
+ running: IDL.Null,
174
181
  });
175
182
  const DefiniteCanisterSettingsArgs = IDL.Record({
176
- 'freezing_threshold' : IDL.Nat,
177
- 'wasm_memory_threshold' : IDL.Opt(IDL.Nat),
178
- 'controllers' : IDL.Vec(IDL.Principal),
179
- 'wasm_memory_limit' : IDL.Opt(IDL.Nat),
180
- 'memory_allocation' : IDL.Nat,
181
- 'compute_allocation' : IDL.Nat,
183
+ freezing_threshold: IDL.Nat,
184
+ wasm_memory_threshold: IDL.Opt(IDL.Nat),
185
+ controllers: IDL.Vec(IDL.Principal),
186
+ wasm_memory_limit: IDL.Opt(IDL.Nat),
187
+ memory_allocation: IDL.Nat,
188
+ compute_allocation: IDL.Nat,
182
189
  });
183
190
  const QueryStats = IDL.Record({
184
- 'response_payload_bytes_total' : IDL.Opt(IDL.Nat),
185
- 'num_instructions_total' : IDL.Opt(IDL.Nat),
186
- 'num_calls_total' : IDL.Opt(IDL.Nat),
187
- 'request_payload_bytes_total' : IDL.Opt(IDL.Nat),
191
+ response_payload_bytes_total: IDL.Opt(IDL.Nat),
192
+ num_instructions_total: IDL.Opt(IDL.Nat),
193
+ num_calls_total: IDL.Opt(IDL.Nat),
194
+ request_payload_bytes_total: IDL.Opt(IDL.Nat),
188
195
  });
189
196
  const CanisterStatusResultV2 = IDL.Record({
190
- 'memory_metrics' : IDL.Opt(MemoryMetrics),
191
- 'status' : CanisterStatusType,
192
- 'memory_size' : IDL.Nat,
193
- 'cycles' : IDL.Nat,
194
- 'settings' : DefiniteCanisterSettingsArgs,
195
- 'query_stats' : IDL.Opt(QueryStats),
196
- 'idle_cycles_burned_per_day' : IDL.Nat,
197
- 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
197
+ memory_metrics: IDL.Opt(MemoryMetrics),
198
+ status: CanisterStatusType,
199
+ memory_size: IDL.Nat,
200
+ cycles: IDL.Nat,
201
+ settings: DefiniteCanisterSettingsArgs,
202
+ query_stats: IDL.Opt(QueryStats),
203
+ idle_cycles_burned_per_day: IDL.Nat,
204
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
198
205
  });
199
206
  const GetDerivedStateResponse = IDL.Record({
200
- 'sns_tokens_per_icp' : IDL.Opt(IDL.Float64),
201
- 'buyer_total_icp_e8s' : IDL.Opt(IDL.Nat64),
202
- 'cf_participant_count' : IDL.Opt(IDL.Nat64),
203
- 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
204
- 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
205
- 'direct_participant_count' : IDL.Opt(IDL.Nat64),
206
- 'cf_neuron_count' : IDL.Opt(IDL.Nat64),
207
- });
208
- const GetInitResponse = IDL.Record({ 'init' : IDL.Opt(Init) });
207
+ sns_tokens_per_icp: IDL.Opt(IDL.Float64),
208
+ buyer_total_icp_e8s: IDL.Opt(IDL.Nat64),
209
+ cf_participant_count: IDL.Opt(IDL.Nat64),
210
+ neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
211
+ direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
212
+ direct_participant_count: IDL.Opt(IDL.Nat64),
213
+ cf_neuron_count: IDL.Opt(IDL.Nat64),
214
+ });
215
+ const GetInitResponse = IDL.Record({ init: IDL.Opt(Init) });
209
216
  const GetLifecycleResponse = IDL.Record({
210
- 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),
211
- 'lifecycle' : IDL.Opt(IDL.Int32),
212
- 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),
217
+ decentralization_sale_open_timestamp_seconds: IDL.Opt(IDL.Nat64),
218
+ lifecycle: IDL.Opt(IDL.Int32),
219
+ decentralization_swap_termination_timestamp_seconds: IDL.Opt(IDL.Nat64),
213
220
  });
214
221
  const Icrc1Account = IDL.Record({
215
- 'owner' : IDL.Opt(IDL.Principal),
216
- 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
222
+ owner: IDL.Opt(IDL.Principal),
223
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
217
224
  });
218
225
  const Ticket = IDL.Record({
219
- 'creation_time' : IDL.Nat64,
220
- 'ticket_id' : IDL.Nat64,
221
- 'account' : IDL.Opt(Icrc1Account),
222
- 'amount_icp_e8s' : IDL.Nat64,
223
- });
224
- const Ok_2 = IDL.Record({ 'ticket' : IDL.Opt(Ticket) });
225
- const Err_1 = IDL.Record({ 'error_type' : IDL.Opt(IDL.Int32) });
226
- const Result_1 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_1 });
227
- const GetOpenTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });
226
+ creation_time: IDL.Nat64,
227
+ ticket_id: IDL.Nat64,
228
+ account: IDL.Opt(Icrc1Account),
229
+ amount_icp_e8s: IDL.Nat64,
230
+ });
231
+ const Ok_2 = IDL.Record({ ticket: IDL.Opt(Ticket) });
232
+ const Err_1 = IDL.Record({ error_type: IDL.Opt(IDL.Int32) });
233
+ const Result_1 = IDL.Variant({ Ok: Ok_2, Err: Err_1 });
234
+ const GetOpenTicketResponse = IDL.Record({ result: IDL.Opt(Result_1) });
228
235
  const Params = IDL.Record({
229
- 'min_participant_icp_e8s' : IDL.Nat64,
230
- 'neuron_basket_construction_parameters' : IDL.Opt(
231
- NeuronBasketConstructionParameters
236
+ min_participant_icp_e8s: IDL.Nat64,
237
+ neuron_basket_construction_parameters: IDL.Opt(
238
+ NeuronBasketConstructionParameters,
232
239
  ),
233
- 'max_icp_e8s' : IDL.Nat64,
234
- 'swap_due_timestamp_seconds' : IDL.Nat64,
235
- 'min_participants' : IDL.Nat32,
236
- 'sns_token_e8s' : IDL.Nat64,
237
- 'sale_delay_seconds' : IDL.Opt(IDL.Nat64),
238
- 'max_participant_icp_e8s' : IDL.Nat64,
239
- 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
240
- 'min_icp_e8s' : IDL.Nat64,
241
- 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
242
- });
243
- const GetSaleParametersResponse = IDL.Record({ 'params' : IDL.Opt(Params) });
244
- const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });
240
+ max_icp_e8s: IDL.Nat64,
241
+ swap_due_timestamp_seconds: IDL.Nat64,
242
+ min_participants: IDL.Nat32,
243
+ sns_token_e8s: IDL.Nat64,
244
+ sale_delay_seconds: IDL.Opt(IDL.Nat64),
245
+ max_participant_icp_e8s: IDL.Nat64,
246
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
247
+ min_icp_e8s: IDL.Nat64,
248
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
249
+ });
250
+ const GetSaleParametersResponse = IDL.Record({ params: IDL.Opt(Params) });
251
+ const NeuronId = IDL.Record({ id: IDL.Vec(IDL.Nat8) });
245
252
  const NeuronAttributes = IDL.Record({
246
- 'dissolve_delay_seconds' : IDL.Nat64,
247
- 'memo' : IDL.Nat64,
248
- 'followees' : IDL.Vec(NeuronId),
253
+ dissolve_delay_seconds: IDL.Nat64,
254
+ memo: IDL.Nat64,
255
+ followees: IDL.Vec(NeuronId),
249
256
  });
250
- const Principals = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });
257
+ const Principals = IDL.Record({ principals: IDL.Vec(IDL.Principal) });
251
258
  const CfInvestment = IDL.Record({
252
- 'controller' : IDL.Opt(IDL.Principal),
253
- 'hotkey_principal' : IDL.Text,
254
- 'hotkeys' : IDL.Opt(Principals),
255
- 'nns_neuron_id' : IDL.Nat64,
259
+ controller: IDL.Opt(IDL.Principal),
260
+ hotkey_principal: IDL.Text,
261
+ hotkeys: IDL.Opt(Principals),
262
+ nns_neuron_id: IDL.Nat64,
256
263
  });
257
- const DirectInvestment = IDL.Record({ 'buyer_principal' : IDL.Text });
264
+ const DirectInvestment = IDL.Record({ buyer_principal: IDL.Text });
258
265
  const Investor = IDL.Variant({
259
- 'CommunityFund' : CfInvestment,
260
- 'Direct' : DirectInvestment,
266
+ CommunityFund: CfInvestment,
267
+ Direct: DirectInvestment,
261
268
  });
262
269
  const SnsNeuronRecipe = IDL.Record({
263
- 'sns' : IDL.Opt(TransferableAmount),
264
- 'claimed_status' : IDL.Opt(IDL.Int32),
265
- 'neuron_attributes' : IDL.Opt(NeuronAttributes),
266
- 'investor' : IDL.Opt(Investor),
270
+ sns: IDL.Opt(TransferableAmount),
271
+ claimed_status: IDL.Opt(IDL.Int32),
272
+ neuron_attributes: IDL.Opt(NeuronAttributes),
273
+ investor: IDL.Opt(Investor),
267
274
  });
268
275
  const Timers = IDL.Record({
269
- 'last_spawned_timestamp_seconds' : IDL.Opt(IDL.Nat64),
270
- 'last_reset_timestamp_seconds' : IDL.Opt(IDL.Nat64),
271
- 'requires_periodic_tasks' : IDL.Opt(IDL.Bool),
276
+ last_spawned_timestamp_seconds: IDL.Opt(IDL.Nat64),
277
+ last_reset_timestamp_seconds: IDL.Opt(IDL.Nat64),
278
+ requires_periodic_tasks: IDL.Opt(IDL.Bool),
272
279
  });
273
280
  const CfNeuron = IDL.Record({
274
- 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
275
- 'hotkeys' : IDL.Opt(Principals),
276
- 'nns_neuron_id' : IDL.Nat64,
277
- 'amount_icp_e8s' : IDL.Nat64,
281
+ has_created_neuron_recipes: IDL.Opt(IDL.Bool),
282
+ hotkeys: IDL.Opt(Principals),
283
+ nns_neuron_id: IDL.Nat64,
284
+ amount_icp_e8s: IDL.Nat64,
278
285
  });
279
286
  const CfParticipant = IDL.Record({
280
- 'controller' : IDL.Opt(IDL.Principal),
281
- 'hotkey_principal' : IDL.Text,
282
- 'cf_neurons' : IDL.Vec(CfNeuron),
287
+ controller: IDL.Opt(IDL.Principal),
288
+ hotkey_principal: IDL.Text,
289
+ cf_neurons: IDL.Vec(CfNeuron),
283
290
  });
284
291
  const Swap = IDL.Record({
285
- 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),
286
- 'neuron_recipes' : IDL.Vec(SnsNeuronRecipe),
287
- 'next_ticket_id' : IDL.Opt(IDL.Nat64),
288
- 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),
289
- 'finalize_swap_in_progress' : IDL.Opt(IDL.Bool),
290
- 'timers' : IDL.Opt(Timers),
291
- 'cf_participants' : IDL.Vec(CfParticipant),
292
- 'init' : IDL.Opt(Init),
293
- 'already_tried_to_auto_finalize' : IDL.Opt(IDL.Bool),
294
- 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
295
- 'purge_old_tickets_last_completion_timestamp_nanoseconds' : IDL.Opt(
296
- IDL.Nat64
297
- ),
298
- 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
299
- 'lifecycle' : IDL.Int32,
300
- 'purge_old_tickets_next_principal' : IDL.Opt(IDL.Vec(IDL.Nat8)),
301
- 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),
302
- 'buyers' : IDL.Vec(IDL.Tuple(IDL.Text, BuyerState)),
303
- 'params' : IDL.Opt(Params),
304
- 'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),
292
+ auto_finalize_swap_response: IDL.Opt(FinalizeSwapResponse),
293
+ neuron_recipes: IDL.Vec(SnsNeuronRecipe),
294
+ next_ticket_id: IDL.Opt(IDL.Nat64),
295
+ decentralization_sale_open_timestamp_seconds: IDL.Opt(IDL.Nat64),
296
+ finalize_swap_in_progress: IDL.Opt(IDL.Bool),
297
+ timers: IDL.Opt(Timers),
298
+ cf_participants: IDL.Vec(CfParticipant),
299
+ init: IDL.Opt(Init),
300
+ already_tried_to_auto_finalize: IDL.Opt(IDL.Bool),
301
+ neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
302
+ purge_old_tickets_last_completion_timestamp_nanoseconds: IDL.Opt(IDL.Nat64),
303
+ direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
304
+ lifecycle: IDL.Int32,
305
+ purge_old_tickets_next_principal: IDL.Opt(IDL.Vec(IDL.Nat8)),
306
+ decentralization_swap_termination_timestamp_seconds: IDL.Opt(IDL.Nat64),
307
+ buyers: IDL.Vec(IDL.Tuple(IDL.Text, BuyerState)),
308
+ params: IDL.Opt(Params),
309
+ open_sns_token_swap_proposal_id: IDL.Opt(IDL.Nat64),
305
310
  });
306
311
  const DerivedState = IDL.Record({
307
- 'sns_tokens_per_icp' : IDL.Float32,
308
- 'buyer_total_icp_e8s' : IDL.Nat64,
309
- 'cf_participant_count' : IDL.Opt(IDL.Nat64),
310
- 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
311
- 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
312
- 'direct_participant_count' : IDL.Opt(IDL.Nat64),
313
- 'cf_neuron_count' : IDL.Opt(IDL.Nat64),
312
+ sns_tokens_per_icp: IDL.Float32,
313
+ buyer_total_icp_e8s: IDL.Nat64,
314
+ cf_participant_count: IDL.Opt(IDL.Nat64),
315
+ neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
316
+ direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
317
+ direct_participant_count: IDL.Opt(IDL.Nat64),
318
+ cf_neuron_count: IDL.Opt(IDL.Nat64),
314
319
  });
315
320
  const GetStateResponse = IDL.Record({
316
- 'swap' : IDL.Opt(Swap),
317
- 'derived' : IDL.Opt(DerivedState),
321
+ swap: IDL.Opt(Swap),
322
+ derived: IDL.Opt(DerivedState),
318
323
  });
319
- const GetTimersResponse = IDL.Record({ 'timers' : IDL.Opt(Timers) });
324
+ const GetTimersResponse = IDL.Record({ timers: IDL.Opt(Timers) });
320
325
  const ListCommunityFundParticipantsRequest = IDL.Record({
321
- 'offset' : IDL.Opt(IDL.Nat64),
322
- 'limit' : IDL.Opt(IDL.Nat32),
326
+ offset: IDL.Opt(IDL.Nat64),
327
+ limit: IDL.Opt(IDL.Nat32),
323
328
  });
324
329
  const ListCommunityFundParticipantsResponse = IDL.Record({
325
- 'cf_participants' : IDL.Vec(CfParticipant),
330
+ cf_participants: IDL.Vec(CfParticipant),
326
331
  });
327
332
  const ListDirectParticipantsRequest = IDL.Record({
328
- 'offset' : IDL.Opt(IDL.Nat32),
329
- 'limit' : IDL.Opt(IDL.Nat32),
333
+ offset: IDL.Opt(IDL.Nat32),
334
+ limit: IDL.Opt(IDL.Nat32),
330
335
  });
331
336
  const Participant = IDL.Record({
332
- 'participation' : IDL.Opt(BuyerState),
333
- 'participant_id' : IDL.Opt(IDL.Principal),
337
+ participation: IDL.Opt(BuyerState),
338
+ participant_id: IDL.Opt(IDL.Principal),
334
339
  });
335
340
  const ListDirectParticipantsResponse = IDL.Record({
336
- 'participants' : IDL.Vec(Participant),
341
+ participants: IDL.Vec(Participant),
337
342
  });
338
343
  const ListSnsNeuronRecipesRequest = IDL.Record({
339
- 'offset' : IDL.Opt(IDL.Nat64),
340
- 'limit' : IDL.Opt(IDL.Nat32),
344
+ offset: IDL.Opt(IDL.Nat64),
345
+ limit: IDL.Opt(IDL.Nat32),
341
346
  });
342
347
  const ListSnsNeuronRecipesResponse = IDL.Record({
343
- 'sns_neuron_recipes' : IDL.Vec(SnsNeuronRecipe),
348
+ sns_neuron_recipes: IDL.Vec(SnsNeuronRecipe),
344
349
  });
345
350
  const NewSaleTicketRequest = IDL.Record({
346
- 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
347
- 'amount_icp_e8s' : IDL.Nat64,
351
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
352
+ amount_icp_e8s: IDL.Nat64,
348
353
  });
349
354
  const InvalidUserAmount = IDL.Record({
350
- 'min_amount_icp_e8s_included' : IDL.Nat64,
351
- 'max_amount_icp_e8s_included' : IDL.Nat64,
355
+ min_amount_icp_e8s_included: IDL.Nat64,
356
+ max_amount_icp_e8s_included: IDL.Nat64,
352
357
  });
353
358
  const Err_2 = IDL.Record({
354
- 'invalid_user_amount' : IDL.Opt(InvalidUserAmount),
355
- 'existing_ticket' : IDL.Opt(Ticket),
356
- 'error_type' : IDL.Int32,
359
+ invalid_user_amount: IDL.Opt(InvalidUserAmount),
360
+ existing_ticket: IDL.Opt(Ticket),
361
+ error_type: IDL.Int32,
357
362
  });
358
- const Result_2 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_2 });
359
- const NewSaleTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_2) });
363
+ const Result_2 = IDL.Variant({ Ok: Ok_2, Err: Err_2 });
364
+ const NewSaleTicketResponse = IDL.Record({ result: IDL.Opt(Result_2) });
360
365
  const RefreshBuyerTokensRequest = IDL.Record({
361
- 'confirmation_text' : IDL.Opt(IDL.Text),
362
- 'buyer' : IDL.Text,
366
+ confirmation_text: IDL.Opt(IDL.Text),
367
+ buyer: IDL.Text,
363
368
  });
364
369
  const RefreshBuyerTokensResponse = IDL.Record({
365
- 'icp_accepted_participation_e8s' : IDL.Nat64,
366
- 'icp_ledger_account_balance_e8s' : IDL.Nat64,
370
+ icp_accepted_participation_e8s: IDL.Nat64,
371
+ icp_ledger_account_balance_e8s: IDL.Nat64,
367
372
  });
373
+
368
374
  return IDL.Service({
369
- 'error_refund_icp' : IDL.Func(
370
- [ErrorRefundIcpRequest],
371
- [ErrorRefundIcpResponse],
372
- [],
373
- ),
374
- 'finalize_swap' : IDL.Func([IDL.Record({})], [FinalizeSwapResponse], []),
375
- 'get_auto_finalization_status' : IDL.Func(
376
- [IDL.Record({})],
377
- [GetAutoFinalizationStatusResponse],
378
- [],
379
- ),
380
- 'get_buyer_state' : IDL.Func(
381
- [GetBuyerStateRequest],
382
- [GetBuyerStateResponse],
383
- [],
384
- ),
385
- 'get_buyers_total' : IDL.Func(
386
- [IDL.Record({})],
387
- [GetBuyersTotalResponse],
388
- [],
389
- ),
390
- 'get_canister_status' : IDL.Func(
391
- [IDL.Record({})],
392
- [CanisterStatusResultV2],
393
- [],
394
- ),
395
- 'get_derived_state' : IDL.Func(
396
- [IDL.Record({})],
397
- [GetDerivedStateResponse],
398
- [],
399
- ),
400
- 'get_init' : IDL.Func([IDL.Record({})], [GetInitResponse], []),
401
- 'get_lifecycle' : IDL.Func([IDL.Record({})], [GetLifecycleResponse], []),
402
- 'get_open_ticket' : IDL.Func([IDL.Record({})], [GetOpenTicketResponse], []),
403
- 'get_sale_parameters' : IDL.Func(
404
- [IDL.Record({})],
405
- [GetSaleParametersResponse],
406
- [],
407
- ),
408
- 'get_state' : IDL.Func([IDL.Record({})], [GetStateResponse], []),
409
- 'get_timers' : IDL.Func([IDL.Record({})], [GetTimersResponse], []),
410
- 'list_community_fund_participants' : IDL.Func(
411
- [ListCommunityFundParticipantsRequest],
412
- [ListCommunityFundParticipantsResponse],
413
- [],
414
- ),
415
- 'list_direct_participants' : IDL.Func(
416
- [ListDirectParticipantsRequest],
417
- [ListDirectParticipantsResponse],
418
- [],
419
- ),
420
- 'list_sns_neuron_recipes' : IDL.Func(
421
- [ListSnsNeuronRecipesRequest],
422
- [ListSnsNeuronRecipesResponse],
423
- [],
424
- ),
425
- 'new_sale_ticket' : IDL.Func(
426
- [NewSaleTicketRequest],
427
- [NewSaleTicketResponse],
428
- [],
429
- ),
430
- 'notify_payment_failure' : IDL.Func([IDL.Record({})], [Ok_2], []),
431
- 'refresh_buyer_tokens' : IDL.Func(
432
- [RefreshBuyerTokensRequest],
433
- [RefreshBuyerTokensResponse],
434
- [],
435
- ),
436
- 'reset_timers' : IDL.Func([IDL.Record({})], [IDL.Record({})], []),
375
+ error_refund_icp: IDL.Func(
376
+ [ErrorRefundIcpRequest],
377
+ [ErrorRefundIcpResponse],
378
+ [],
379
+ ),
380
+ finalize_swap: IDL.Func([IDL.Record({})], [FinalizeSwapResponse], []),
381
+ get_auto_finalization_status: IDL.Func(
382
+ [IDL.Record({})],
383
+ [GetAutoFinalizationStatusResponse],
384
+ [],
385
+ ),
386
+ get_buyer_state: IDL.Func(
387
+ [GetBuyerStateRequest],
388
+ [GetBuyerStateResponse],
389
+ [],
390
+ ),
391
+ get_buyers_total: IDL.Func([IDL.Record({})], [GetBuyersTotalResponse], []),
392
+ get_canister_status: IDL.Func(
393
+ [IDL.Record({})],
394
+ [CanisterStatusResultV2],
395
+ [],
396
+ ),
397
+ get_derived_state: IDL.Func(
398
+ [IDL.Record({})],
399
+ [GetDerivedStateResponse],
400
+ [],
401
+ ),
402
+ get_init: IDL.Func([IDL.Record({})], [GetInitResponse], []),
403
+ get_lifecycle: IDL.Func([IDL.Record({})], [GetLifecycleResponse], []),
404
+ get_open_ticket: IDL.Func([IDL.Record({})], [GetOpenTicketResponse], []),
405
+ get_sale_parameters: IDL.Func(
406
+ [IDL.Record({})],
407
+ [GetSaleParametersResponse],
408
+ [],
409
+ ),
410
+ get_state: IDL.Func([IDL.Record({})], [GetStateResponse], []),
411
+ get_timers: IDL.Func([IDL.Record({})], [GetTimersResponse], []),
412
+ list_community_fund_participants: IDL.Func(
413
+ [ListCommunityFundParticipantsRequest],
414
+ [ListCommunityFundParticipantsResponse],
415
+ [],
416
+ ),
417
+ list_direct_participants: IDL.Func(
418
+ [ListDirectParticipantsRequest],
419
+ [ListDirectParticipantsResponse],
420
+ [],
421
+ ),
422
+ list_sns_neuron_recipes: IDL.Func(
423
+ [ListSnsNeuronRecipesRequest],
424
+ [ListSnsNeuronRecipesResponse],
425
+ [],
426
+ ),
427
+ new_sale_ticket: IDL.Func(
428
+ [NewSaleTicketRequest],
429
+ [NewSaleTicketResponse],
430
+ [],
431
+ ),
432
+ notify_payment_failure: IDL.Func([IDL.Record({})], [Ok_2], []),
433
+ refresh_buyer_tokens: IDL.Func(
434
+ [RefreshBuyerTokensRequest],
435
+ [RefreshBuyerTokensResponse],
436
+ [],
437
+ ),
438
+ reset_timers: IDL.Func([IDL.Record({})], [IDL.Record({})], []),
437
439
  });
438
440
  };
441
+
439
442
  export const init = ({ IDL }) => {
440
443
  const NeuronBasketConstructionParameters = IDL.Record({
441
- 'dissolve_delay_interval_seconds' : IDL.Nat64,
442
- 'count' : IDL.Nat64,
444
+ dissolve_delay_interval_seconds: IDL.Nat64,
445
+ count: IDL.Nat64,
443
446
  });
444
447
  const LinearScalingCoefficient = IDL.Record({
445
- 'slope_numerator' : IDL.Opt(IDL.Nat64),
446
- 'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),
447
- 'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
448
- 'slope_denominator' : IDL.Opt(IDL.Nat64),
449
- 'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
448
+ slope_numerator: IDL.Opt(IDL.Nat64),
449
+ intercept_icp_e8s: IDL.Opt(IDL.Nat64),
450
+ from_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
451
+ slope_denominator: IDL.Opt(IDL.Nat64),
452
+ to_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
450
453
  });
451
454
  const IdealMatchedParticipationFunction = IDL.Record({
452
- 'serialized_representation' : IDL.Opt(IDL.Text),
455
+ serialized_representation: IDL.Opt(IDL.Text),
453
456
  });
454
457
  const NeuronsFundParticipationConstraints = IDL.Record({
455
- 'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
456
- 'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
457
- 'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
458
- 'ideal_matched_participation_function' : IDL.Opt(
459
- IdealMatchedParticipationFunction
458
+ coefficient_intervals: IDL.Vec(LinearScalingCoefficient),
459
+ max_neurons_fund_participation_icp_e8s: IDL.Opt(IDL.Nat64),
460
+ min_direct_participation_threshold_icp_e8s: IDL.Opt(IDL.Nat64),
461
+ ideal_matched_participation_function: IDL.Opt(
462
+ IdealMatchedParticipationFunction,
460
463
  ),
461
464
  });
462
- const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });
465
+ const Countries = IDL.Record({ iso_codes: IDL.Vec(IDL.Text) });
463
466
  const Init = IDL.Record({
464
- 'nns_proposal_id' : IDL.Opt(IDL.Nat64),
465
- 'sns_root_canister_id' : IDL.Text,
466
- 'neurons_fund_participation' : IDL.Opt(IDL.Bool),
467
- 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
468
- 'neuron_basket_construction_parameters' : IDL.Opt(
469
- NeuronBasketConstructionParameters
467
+ nns_proposal_id: IDL.Opt(IDL.Nat64),
468
+ sns_root_canister_id: IDL.Text,
469
+ neurons_fund_participation: IDL.Opt(IDL.Bool),
470
+ min_participant_icp_e8s: IDL.Opt(IDL.Nat64),
471
+ neuron_basket_construction_parameters: IDL.Opt(
472
+ NeuronBasketConstructionParameters,
470
473
  ),
471
- 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),
472
- 'max_icp_e8s' : IDL.Opt(IDL.Nat64),
473
- 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
474
- 'confirmation_text' : IDL.Opt(IDL.Text),
475
- 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),
476
- 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),
477
- 'min_participants' : IDL.Opt(IDL.Nat32),
478
- 'sns_token_e8s' : IDL.Opt(IDL.Nat64),
479
- 'nns_governance_canister_id' : IDL.Text,
480
- 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
481
- 'icp_ledger_canister_id' : IDL.Text,
482
- 'sns_ledger_canister_id' : IDL.Text,
483
- 'neurons_fund_participation_constraints' : IDL.Opt(
484
- NeuronsFundParticipationConstraints
474
+ fallback_controller_principal_ids: IDL.Vec(IDL.Text),
475
+ max_icp_e8s: IDL.Opt(IDL.Nat64),
476
+ neuron_minimum_stake_e8s: IDL.Opt(IDL.Nat64),
477
+ confirmation_text: IDL.Opt(IDL.Text),
478
+ swap_start_timestamp_seconds: IDL.Opt(IDL.Nat64),
479
+ swap_due_timestamp_seconds: IDL.Opt(IDL.Nat64),
480
+ min_participants: IDL.Opt(IDL.Nat32),
481
+ sns_token_e8s: IDL.Opt(IDL.Nat64),
482
+ nns_governance_canister_id: IDL.Text,
483
+ transaction_fee_e8s: IDL.Opt(IDL.Nat64),
484
+ icp_ledger_canister_id: IDL.Text,
485
+ sns_ledger_canister_id: IDL.Text,
486
+ neurons_fund_participation_constraints: IDL.Opt(
487
+ NeuronsFundParticipationConstraints,
485
488
  ),
486
- 'should_auto_finalize' : IDL.Opt(IDL.Bool),
487
- 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),
488
- 'sns_governance_canister_id' : IDL.Text,
489
- 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
490
- 'restricted_countries' : IDL.Opt(Countries),
491
- 'min_icp_e8s' : IDL.Opt(IDL.Nat64),
492
- 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
493
- });
489
+ should_auto_finalize: IDL.Opt(IDL.Bool),
490
+ max_participant_icp_e8s: IDL.Opt(IDL.Nat64),
491
+ sns_governance_canister_id: IDL.Text,
492
+ min_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
493
+ restricted_countries: IDL.Opt(Countries),
494
+ min_icp_e8s: IDL.Opt(IDL.Nat64),
495
+ max_direct_participation_icp_e8s: IDL.Opt(IDL.Nat64),
496
+ });
497
+
494
498
  return [Init];
495
499
  };