@dfinity/sns 2.1.0 → 2.1.1-next-2024-01-30
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.
- package/dist/candid/sns_governance.certified.idl.js +24 -2
- package/dist/candid/sns_governance.d.ts +12 -1
- package/dist/candid/sns_governance.did +11 -2
- package/dist/candid/sns_governance.idl.js +24 -2
- package/dist/candid/sns_governance_test.certified.idl.js +24 -2
- package/dist/candid/sns_governance_test.d.ts +12 -1
- package/dist/candid/sns_governance_test.did +11 -2
- package/dist/candid/sns_governance_test.idl.js +24 -2
- package/dist/candid/sns_root.certified.idl.js +3 -14
- package/dist/candid/sns_root.d.ts +2 -12
- package/dist/candid/sns_root.did +3 -14
- package/dist/candid/sns_root.idl.js +2 -13
- package/dist/candid/sns_swap.certified.idl.js +40 -13
- package/dist/candid/sns_swap.d.ts +28 -5
- package/dist/candid/sns_swap.did +24 -7
- package/dist/candid/sns_swap.idl.js +40 -13
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/{chunk-V6OGOPZC.js → chunk-CENX7NFF.js} +2 -2
- package/dist/esm/chunk-OW7ISXHP.js +2 -0
- package/dist/esm/chunk-OW7ISXHP.js.map +7 -0
- package/dist/esm/chunk-TT4OPWTE.js +2 -0
- package/dist/esm/chunk-TT4OPWTE.js.map +7 -0
- package/dist/esm/chunk-VULQZFHD.js +2 -0
- package/dist/esm/chunk-VULQZFHD.js.map +7 -0
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/root.canister.js +1 -1
- package/dist/esm/sns.js +1 -1
- package/dist/esm/swap.canister.js +1 -1
- package/package.json +7 -7
- package/dist/esm/chunk-ONZVK7WV.js +0 -2
- package/dist/esm/chunk-ONZVK7WV.js.map +0 -7
- package/dist/esm/chunk-Q2SQYFV4.js +0 -2
- package/dist/esm/chunk-Q2SQYFV4.js.map +0 -7
- package/dist/esm/chunk-ZF2AGKNK.js +0 -2
- package/dist/esm/chunk-ZF2AGKNK.js.map +0 -7
- /package/dist/esm/{chunk-V6OGOPZC.js.map → chunk-CENX7NFF.js.map} +0 -0
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { ActorMethod } from "@dfinity/agent";
|
|
2
2
|
import type { Principal } from "@dfinity/principal";
|
|
3
3
|
|
|
4
|
-
export type AuthzChangeOp =
|
|
5
|
-
| { Authorize: { add_self: boolean } }
|
|
6
|
-
| { Deauthorize: null };
|
|
7
4
|
export interface CanisterCallError {
|
|
8
5
|
code: [] | [number];
|
|
9
6
|
description: string;
|
|
@@ -38,14 +35,13 @@ export interface CanisterSummary {
|
|
|
38
35
|
status: [] | [CanisterStatusResultV2];
|
|
39
36
|
canister_id: [] | [Principal];
|
|
40
37
|
}
|
|
41
|
-
export interface
|
|
38
|
+
export interface ChangeCanisterRequest {
|
|
42
39
|
arg: Uint8Array | number[];
|
|
43
40
|
wasm_module: Uint8Array | number[];
|
|
44
41
|
stop_before_installing: boolean;
|
|
45
42
|
mode: CanisterInstallMode;
|
|
46
43
|
canister_id: Principal;
|
|
47
44
|
query_allocation: [] | [bigint];
|
|
48
|
-
authz_changes: Array<MethodAuthzChange>;
|
|
49
45
|
memory_allocation: [] | [bigint];
|
|
50
46
|
compute_allocation: [] | [bigint];
|
|
51
47
|
}
|
|
@@ -83,12 +79,6 @@ export interface ListSnsCanistersResponse {
|
|
|
83
79
|
dapps: Array<Principal>;
|
|
84
80
|
archives: Array<Principal>;
|
|
85
81
|
}
|
|
86
|
-
export interface MethodAuthzChange {
|
|
87
|
-
principal: [] | [Principal];
|
|
88
|
-
method_name: string;
|
|
89
|
-
canister: Principal;
|
|
90
|
-
operation: AuthzChangeOp;
|
|
91
|
-
}
|
|
92
82
|
export interface RegisterDappCanisterRequest {
|
|
93
83
|
canister_id: [] | [Principal];
|
|
94
84
|
}
|
|
@@ -114,7 +104,7 @@ export interface SnsRootCanister {
|
|
|
114
104
|
}
|
|
115
105
|
export interface _SERVICE {
|
|
116
106
|
canister_status: ActorMethod<[CanisterIdRecord], CanisterStatusResult>;
|
|
117
|
-
change_canister: ActorMethod<[
|
|
107
|
+
change_canister: ActorMethod<[ChangeCanisterRequest], undefined>;
|
|
118
108
|
get_build_metadata: ActorMethod<[], string>;
|
|
119
109
|
get_sns_canisters_summary: ActorMethod<
|
|
120
110
|
[GetSnsCanistersSummaryRequest],
|
package/dist/candid/sns_root.did
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
2
|
-
type AuthzChangeOp = variant {
|
|
3
|
-
Authorize : record { add_self : bool };
|
|
4
|
-
Deauthorize;
|
|
5
|
-
};
|
|
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
|
|
6
2
|
type CanisterCallError = record { code : opt int32; description : text };
|
|
7
3
|
type CanisterIdRecord = record { canister_id : principal };
|
|
8
4
|
type CanisterInstallMode = variant { reinstall; upgrade; install };
|
|
@@ -26,14 +22,13 @@ type CanisterSummary = record {
|
|
|
26
22
|
status : opt CanisterStatusResultV2;
|
|
27
23
|
canister_id : opt principal;
|
|
28
24
|
};
|
|
29
|
-
type
|
|
25
|
+
type ChangeCanisterRequest = record {
|
|
30
26
|
arg : vec nat8;
|
|
31
27
|
wasm_module : vec nat8;
|
|
32
28
|
stop_before_installing : bool;
|
|
33
29
|
mode : CanisterInstallMode;
|
|
34
30
|
canister_id : principal;
|
|
35
31
|
query_allocation : opt nat;
|
|
36
|
-
authz_changes : vec MethodAuthzChange;
|
|
37
32
|
memory_allocation : opt nat;
|
|
38
33
|
compute_allocation : opt nat;
|
|
39
34
|
};
|
|
@@ -67,12 +62,6 @@ type ListSnsCanistersResponse = record {
|
|
|
67
62
|
dapps : vec principal;
|
|
68
63
|
archives : vec principal;
|
|
69
64
|
};
|
|
70
|
-
type MethodAuthzChange = record {
|
|
71
|
-
"principal" : opt principal;
|
|
72
|
-
method_name : text;
|
|
73
|
-
canister : principal;
|
|
74
|
-
operation : AuthzChangeOp;
|
|
75
|
-
};
|
|
76
65
|
type RegisterDappCanisterRequest = record { canister_id : opt principal };
|
|
77
66
|
type RegisterDappCanistersRequest = record { canister_ids : vec principal };
|
|
78
67
|
type SetDappControllersRequest = record {
|
|
@@ -92,7 +81,7 @@ type SnsRootCanister = record {
|
|
|
92
81
|
};
|
|
93
82
|
service : (SnsRootCanister) -> {
|
|
94
83
|
canister_status : (CanisterIdRecord) -> (CanisterStatusResult);
|
|
95
|
-
change_canister : (
|
|
84
|
+
change_canister : (ChangeCanisterRequest) -> ();
|
|
96
85
|
get_build_metadata : () -> (text) query;
|
|
97
86
|
get_sns_canisters_summary : (GetSnsCanistersSummaryRequest) -> (
|
|
98
87
|
GetSnsCanistersSummaryResponse,
|
|
@@ -31,24 +31,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
31
31
|
'upgrade' : IDL.Null,
|
|
32
32
|
'install' : IDL.Null,
|
|
33
33
|
});
|
|
34
|
-
const
|
|
35
|
-
'Authorize' : IDL.Record({ 'add_self' : IDL.Bool }),
|
|
36
|
-
'Deauthorize' : IDL.Null,
|
|
37
|
-
});
|
|
38
|
-
const MethodAuthzChange = IDL.Record({
|
|
39
|
-
'principal' : IDL.Opt(IDL.Principal),
|
|
40
|
-
'method_name' : IDL.Text,
|
|
41
|
-
'canister' : IDL.Principal,
|
|
42
|
-
'operation' : AuthzChangeOp,
|
|
43
|
-
});
|
|
44
|
-
const ChangeCanisterProposal = IDL.Record({
|
|
34
|
+
const ChangeCanisterRequest = IDL.Record({
|
|
45
35
|
'arg' : IDL.Vec(IDL.Nat8),
|
|
46
36
|
'wasm_module' : IDL.Vec(IDL.Nat8),
|
|
47
37
|
'stop_before_installing' : IDL.Bool,
|
|
48
38
|
'mode' : CanisterInstallMode,
|
|
49
39
|
'canister_id' : IDL.Principal,
|
|
50
40
|
'query_allocation' : IDL.Opt(IDL.Nat),
|
|
51
|
-
'authz_changes' : IDL.Vec(MethodAuthzChange),
|
|
52
41
|
'memory_allocation' : IDL.Opt(IDL.Nat),
|
|
53
42
|
'compute_allocation' : IDL.Opt(IDL.Nat),
|
|
54
43
|
});
|
|
@@ -118,7 +107,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
118
107
|
[CanisterStatusResult],
|
|
119
108
|
[],
|
|
120
109
|
),
|
|
121
|
-
'change_canister' : IDL.Func([
|
|
110
|
+
'change_canister' : IDL.Func([ChangeCanisterRequest], [], []),
|
|
122
111
|
'get_build_metadata' : IDL.Func([], [IDL.Text], ['query']),
|
|
123
112
|
'get_sns_canisters_summary' : IDL.Func(
|
|
124
113
|
[GetSnsCanistersSummaryRequest],
|
|
@@ -11,10 +11,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
11
11
|
'slope_denominator' : IDL.Opt(IDL.Nat64),
|
|
12
12
|
'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
13
13
|
});
|
|
14
|
+
const IdealMatchedParticipationFunction = IDL.Record({
|
|
15
|
+
'serialized_representation' : IDL.Opt(IDL.Text),
|
|
16
|
+
});
|
|
14
17
|
const NeuronsFundParticipationConstraints = IDL.Record({
|
|
15
18
|
'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
|
|
16
19
|
'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
17
20
|
'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
21
|
+
'ideal_matched_participation_function' : IDL.Opt(
|
|
22
|
+
IdealMatchedParticipationFunction
|
|
23
|
+
),
|
|
18
24
|
});
|
|
19
25
|
const CfNeuron = IDL.Record({
|
|
20
26
|
'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
|
|
@@ -89,6 +95,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
89
95
|
const SetDappControllersCallResult = IDL.Record({
|
|
90
96
|
'possibility' : IDL.Opt(Possibility),
|
|
91
97
|
});
|
|
98
|
+
const SweepResult = IDL.Record({
|
|
99
|
+
'failure' : IDL.Nat32,
|
|
100
|
+
'skipped' : IDL.Nat32,
|
|
101
|
+
'invalid' : IDL.Nat32,
|
|
102
|
+
'success' : IDL.Nat32,
|
|
103
|
+
'global_failures' : IDL.Nat32,
|
|
104
|
+
});
|
|
92
105
|
const GovernanceError = IDL.Record({
|
|
93
106
|
'error_message' : IDL.Text,
|
|
94
107
|
'error_type' : IDL.Int32,
|
|
@@ -103,26 +116,32 @@ export const idlFactory = ({ IDL }) => {
|
|
|
103
116
|
const SettleCommunityFundParticipationResult = IDL.Record({
|
|
104
117
|
'possibility' : IDL.Opt(Possibility_1),
|
|
105
118
|
});
|
|
106
|
-
const
|
|
119
|
+
const Ok_1 = IDL.Record({
|
|
120
|
+
'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
121
|
+
'neurons_fund_neurons_count' : IDL.Opt(IDL.Nat64),
|
|
122
|
+
});
|
|
123
|
+
const Error = IDL.Record({ 'message' : IDL.Opt(IDL.Text) });
|
|
124
|
+
const Possibility_2 = IDL.Variant({ 'Ok' : Ok_1, 'Err' : Error });
|
|
125
|
+
const SettleNeuronsFundParticipationResult = IDL.Record({
|
|
126
|
+
'possibility' : IDL.Opt(Possibility_2),
|
|
127
|
+
});
|
|
128
|
+
const Possibility_3 = IDL.Variant({
|
|
107
129
|
'Ok' : IDL.Record({}),
|
|
108
130
|
'Err' : CanisterCallError,
|
|
109
131
|
});
|
|
110
132
|
const SetModeCallResult = IDL.Record({
|
|
111
|
-
'possibility' : IDL.Opt(
|
|
112
|
-
});
|
|
113
|
-
const SweepResult = IDL.Record({
|
|
114
|
-
'failure' : IDL.Nat32,
|
|
115
|
-
'skipped' : IDL.Nat32,
|
|
116
|
-
'invalid' : IDL.Nat32,
|
|
117
|
-
'success' : IDL.Nat32,
|
|
118
|
-
'global_failures' : IDL.Nat32,
|
|
133
|
+
'possibility' : IDL.Opt(Possibility_3),
|
|
119
134
|
});
|
|
120
135
|
const FinalizeSwapResponse = IDL.Record({
|
|
121
136
|
'set_dapp_controllers_call_result' : IDL.Opt(SetDappControllersCallResult),
|
|
137
|
+
'create_sns_neuron_recipes_result' : IDL.Opt(SweepResult),
|
|
122
138
|
'settle_community_fund_participation_result' : IDL.Opt(
|
|
123
139
|
SettleCommunityFundParticipationResult
|
|
124
140
|
),
|
|
125
141
|
'error_message' : IDL.Opt(IDL.Text),
|
|
142
|
+
'settle_neurons_fund_participation_result' : IDL.Opt(
|
|
143
|
+
SettleNeuronsFundParticipationResult
|
|
144
|
+
),
|
|
126
145
|
'set_mode_call_result' : IDL.Opt(SetModeCallResult),
|
|
127
146
|
'sweep_icp_result' : IDL.Opt(SweepResult),
|
|
128
147
|
'claim_neuron_result' : IDL.Opt(SweepResult),
|
|
@@ -183,6 +202,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
183
202
|
const GetLifecycleResponse = IDL.Record({
|
|
184
203
|
'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
185
204
|
'lifecycle' : IDL.Opt(IDL.Int32),
|
|
205
|
+
'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
186
206
|
});
|
|
187
207
|
const Icrc1Account = IDL.Record({
|
|
188
208
|
'owner' : IDL.Opt(IDL.Principal),
|
|
@@ -194,9 +214,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
194
214
|
'account' : IDL.Opt(Icrc1Account),
|
|
195
215
|
'amount_icp_e8s' : IDL.Nat64,
|
|
196
216
|
});
|
|
197
|
-
const
|
|
217
|
+
const Ok_2 = IDL.Record({ 'ticket' : IDL.Opt(Ticket) });
|
|
198
218
|
const Err_1 = IDL.Record({ 'error_type' : IDL.Opt(IDL.Int32) });
|
|
199
|
-
const Result_1 = IDL.Variant({ 'Ok' :
|
|
219
|
+
const Result_1 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_1 });
|
|
200
220
|
const GetOpenTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });
|
|
201
221
|
const Params = IDL.Record({
|
|
202
222
|
'min_participant_icp_e8s' : IDL.Nat64,
|
|
@@ -251,6 +271,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
251
271
|
'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
252
272
|
'lifecycle' : IDL.Int32,
|
|
253
273
|
'purge_old_tickets_next_principal' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
274
|
+
'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
254
275
|
'buyers' : IDL.Vec(IDL.Tuple(IDL.Text, BuyerState)),
|
|
255
276
|
'params' : IDL.Opt(Params),
|
|
256
277
|
'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),
|
|
@@ -303,7 +324,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
303
324
|
'existing_ticket' : IDL.Opt(Ticket),
|
|
304
325
|
'error_type' : IDL.Int32,
|
|
305
326
|
});
|
|
306
|
-
const Result_2 = IDL.Variant({ 'Ok' :
|
|
327
|
+
const Result_2 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_2 });
|
|
307
328
|
const NewSaleTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_2) });
|
|
308
329
|
const OpenRequest = IDL.Record({
|
|
309
330
|
'cf_participants' : IDL.Vec(CfParticipant),
|
|
@@ -379,7 +400,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
379
400
|
[NewSaleTicketResponse],
|
|
380
401
|
[],
|
|
381
402
|
),
|
|
382
|
-
'notify_payment_failure' : IDL.Func([IDL.Record({})], [
|
|
403
|
+
'notify_payment_failure' : IDL.Func([IDL.Record({})], [Ok_2], []),
|
|
383
404
|
'open' : IDL.Func([OpenRequest], [IDL.Record({})], []),
|
|
384
405
|
'refresh_buyer_tokens' : IDL.Func(
|
|
385
406
|
[RefreshBuyerTokensRequest],
|
|
@@ -405,10 +426,16 @@ export const init = ({ IDL }) => {
|
|
|
405
426
|
'slope_denominator' : IDL.Opt(IDL.Nat64),
|
|
406
427
|
'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
407
428
|
});
|
|
429
|
+
const IdealMatchedParticipationFunction = IDL.Record({
|
|
430
|
+
'serialized_representation' : IDL.Opt(IDL.Text),
|
|
431
|
+
});
|
|
408
432
|
const NeuronsFundParticipationConstraints = IDL.Record({
|
|
409
433
|
'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
|
|
410
434
|
'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
411
435
|
'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
436
|
+
'ideal_matched_participation_function' : IDL.Opt(
|
|
437
|
+
IdealMatchedParticipationFunction
|
|
438
|
+
),
|
|
412
439
|
});
|
|
413
440
|
const CfNeuron = IDL.Record({
|
|
414
441
|
'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
|
|
@@ -67,6 +67,9 @@ export interface Err_2 {
|
|
|
67
67
|
existing_ticket: [] | [Ticket];
|
|
68
68
|
error_type: number;
|
|
69
69
|
}
|
|
70
|
+
export interface Error {
|
|
71
|
+
message: [] | [string];
|
|
72
|
+
}
|
|
70
73
|
export interface ErrorRefundIcpRequest {
|
|
71
74
|
source_principal_id: [] | [Principal];
|
|
72
75
|
}
|
|
@@ -79,10 +82,14 @@ export interface FailedUpdate {
|
|
|
79
82
|
}
|
|
80
83
|
export interface FinalizeSwapResponse {
|
|
81
84
|
set_dapp_controllers_call_result: [] | [SetDappControllersCallResult];
|
|
85
|
+
create_sns_neuron_recipes_result: [] | [SweepResult];
|
|
82
86
|
settle_community_fund_participation_result:
|
|
83
87
|
| []
|
|
84
88
|
| [SettleCommunityFundParticipationResult];
|
|
85
89
|
error_message: [] | [string];
|
|
90
|
+
settle_neurons_fund_participation_result:
|
|
91
|
+
| []
|
|
92
|
+
| [SettleNeuronsFundParticipationResult];
|
|
86
93
|
set_mode_call_result: [] | [SetModeCallResult];
|
|
87
94
|
sweep_icp_result: [] | [SweepResult];
|
|
88
95
|
claim_neuron_result: [] | [SweepResult];
|
|
@@ -117,6 +124,7 @@ export interface GetInitResponse {
|
|
|
117
124
|
export interface GetLifecycleResponse {
|
|
118
125
|
decentralization_sale_open_timestamp_seconds: [] | [bigint];
|
|
119
126
|
lifecycle: [] | [number];
|
|
127
|
+
decentralization_swap_termination_timestamp_seconds: [] | [bigint];
|
|
120
128
|
}
|
|
121
129
|
export interface GetOpenTicketResponse {
|
|
122
130
|
result: [] | [Result_1];
|
|
@@ -136,6 +144,9 @@ export interface Icrc1Account {
|
|
|
136
144
|
owner: [] | [Principal];
|
|
137
145
|
subaccount: [] | [Uint8Array | number[]];
|
|
138
146
|
}
|
|
147
|
+
export interface IdealMatchedParticipationFunction {
|
|
148
|
+
serialized_representation: [] | [string];
|
|
149
|
+
}
|
|
139
150
|
export interface Init {
|
|
140
151
|
nns_proposal_id: [] | [bigint];
|
|
141
152
|
sns_root_canister_id: string;
|
|
@@ -219,6 +230,9 @@ export interface NeuronsFundParticipationConstraints {
|
|
|
219
230
|
coefficient_intervals: Array<LinearScalingCoefficient>;
|
|
220
231
|
max_neurons_fund_participation_icp_e8s: [] | [bigint];
|
|
221
232
|
min_direct_participation_threshold_icp_e8s: [] | [bigint];
|
|
233
|
+
ideal_matched_participation_function:
|
|
234
|
+
| []
|
|
235
|
+
| [IdealMatchedParticipationFunction];
|
|
222
236
|
}
|
|
223
237
|
export interface NewSaleTicketRequest {
|
|
224
238
|
subaccount: [] | [Uint8Array | number[]];
|
|
@@ -231,6 +245,10 @@ export interface Ok {
|
|
|
231
245
|
block_height: [] | [bigint];
|
|
232
246
|
}
|
|
233
247
|
export interface Ok_1 {
|
|
248
|
+
neurons_fund_participation_icp_e8s: [] | [bigint];
|
|
249
|
+
neurons_fund_neurons_count: [] | [bigint];
|
|
250
|
+
}
|
|
251
|
+
export interface Ok_2 {
|
|
234
252
|
ticket: [] | [Ticket];
|
|
235
253
|
}
|
|
236
254
|
export interface OpenRequest {
|
|
@@ -261,7 +279,8 @@ export type Possibility =
|
|
|
261
279
|
| { Ok: SetDappControllersResponse }
|
|
262
280
|
| { Err: CanisterCallError };
|
|
263
281
|
export type Possibility_1 = { Ok: Response } | { Err: CanisterCallError };
|
|
264
|
-
export type Possibility_2 = { Ok:
|
|
282
|
+
export type Possibility_2 = { Ok: Ok_1 } | { Err: Error };
|
|
283
|
+
export type Possibility_3 = { Ok: {} } | { Err: CanisterCallError };
|
|
265
284
|
export interface RefreshBuyerTokensRequest {
|
|
266
285
|
confirmation_text: [] | [string];
|
|
267
286
|
buyer: string;
|
|
@@ -274,8 +293,8 @@ export interface Response {
|
|
|
274
293
|
governance_error: [] | [GovernanceError];
|
|
275
294
|
}
|
|
276
295
|
export type Result = { Ok: Ok } | { Err: Err };
|
|
277
|
-
export type Result_1 = { Ok:
|
|
278
|
-
export type Result_2 = { Ok:
|
|
296
|
+
export type Result_1 = { Ok: Ok_2 } | { Err: Err_1 };
|
|
297
|
+
export type Result_2 = { Ok: Ok_2 } | { Err: Err_2 };
|
|
279
298
|
export interface SetDappControllersCallResult {
|
|
280
299
|
possibility: [] | [Possibility];
|
|
281
300
|
}
|
|
@@ -283,11 +302,14 @@ export interface SetDappControllersResponse {
|
|
|
283
302
|
failed_updates: Array<FailedUpdate>;
|
|
284
303
|
}
|
|
285
304
|
export interface SetModeCallResult {
|
|
286
|
-
possibility: [] | [
|
|
305
|
+
possibility: [] | [Possibility_3];
|
|
287
306
|
}
|
|
288
307
|
export interface SettleCommunityFundParticipationResult {
|
|
289
308
|
possibility: [] | [Possibility_1];
|
|
290
309
|
}
|
|
310
|
+
export interface SettleNeuronsFundParticipationResult {
|
|
311
|
+
possibility: [] | [Possibility_2];
|
|
312
|
+
}
|
|
291
313
|
export interface SnsNeuronRecipe {
|
|
292
314
|
sns: [] | [TransferableAmount];
|
|
293
315
|
claimed_status: [] | [number];
|
|
@@ -308,6 +330,7 @@ export interface Swap {
|
|
|
308
330
|
direct_participation_icp_e8s: [] | [bigint];
|
|
309
331
|
lifecycle: number;
|
|
310
332
|
purge_old_tickets_next_principal: [] | [Uint8Array | number[]];
|
|
333
|
+
decentralization_swap_termination_timestamp_seconds: [] | [bigint];
|
|
311
334
|
buyers: Array<[string, BuyerState]>;
|
|
312
335
|
params: [] | [Params];
|
|
313
336
|
open_sns_token_swap_proposal_id: [] | [bigint];
|
|
@@ -364,7 +387,7 @@ export interface _SERVICE {
|
|
|
364
387
|
ListSnsNeuronRecipesResponse
|
|
365
388
|
>;
|
|
366
389
|
new_sale_ticket: ActorMethod<[NewSaleTicketRequest], NewSaleTicketResponse>;
|
|
367
|
-
notify_payment_failure: ActorMethod<[{}],
|
|
390
|
+
notify_payment_failure: ActorMethod<[{}], Ok_2>;
|
|
368
391
|
open: ActorMethod<[OpenRequest], {}>;
|
|
369
392
|
refresh_buyer_tokens: ActorMethod<
|
|
370
393
|
[RefreshBuyerTokensRequest],
|
package/dist/candid/sns_swap.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
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
|
|
2
2
|
type BuyerState = record {
|
|
3
3
|
icp : opt TransferableAmount;
|
|
4
4
|
has_created_neuron_recipes : opt bool;
|
|
@@ -47,6 +47,7 @@ type Err_2 = record {
|
|
|
47
47
|
existing_ticket : opt Ticket;
|
|
48
48
|
error_type : int32;
|
|
49
49
|
};
|
|
50
|
+
type Error = record { message : opt text };
|
|
50
51
|
type ErrorRefundIcpRequest = record { source_principal_id : opt principal };
|
|
51
52
|
type ErrorRefundIcpResponse = record { result : opt Result };
|
|
52
53
|
type FailedUpdate = record {
|
|
@@ -55,8 +56,10 @@ type FailedUpdate = record {
|
|
|
55
56
|
};
|
|
56
57
|
type FinalizeSwapResponse = record {
|
|
57
58
|
set_dapp_controllers_call_result : opt SetDappControllersCallResult;
|
|
59
|
+
create_sns_neuron_recipes_result : opt SweepResult;
|
|
58
60
|
settle_community_fund_participation_result : opt SettleCommunityFundParticipationResult;
|
|
59
61
|
error_message : opt text;
|
|
62
|
+
settle_neurons_fund_participation_result : opt SettleNeuronsFundParticipationResult;
|
|
60
63
|
set_mode_call_result : opt SetModeCallResult;
|
|
61
64
|
sweep_icp_result : opt SweepResult;
|
|
62
65
|
claim_neuron_result : opt SweepResult;
|
|
@@ -83,12 +86,16 @@ type GetInitResponse = record { init : opt Init };
|
|
|
83
86
|
type GetLifecycleResponse = record {
|
|
84
87
|
decentralization_sale_open_timestamp_seconds : opt nat64;
|
|
85
88
|
lifecycle : opt int32;
|
|
89
|
+
decentralization_swap_termination_timestamp_seconds : opt nat64;
|
|
86
90
|
};
|
|
87
91
|
type GetOpenTicketResponse = record { result : opt Result_1 };
|
|
88
92
|
type GetSaleParametersResponse = record { params : opt Params };
|
|
89
93
|
type GetStateResponse = record { swap : opt Swap; derived : opt DerivedState };
|
|
90
94
|
type GovernanceError = record { error_message : text; error_type : int32 };
|
|
91
95
|
type Icrc1Account = record { owner : opt principal; subaccount : opt vec nat8 };
|
|
96
|
+
type IdealMatchedParticipationFunction = record {
|
|
97
|
+
serialized_representation : opt text;
|
|
98
|
+
};
|
|
92
99
|
type Init = record {
|
|
93
100
|
nns_proposal_id : opt nat64;
|
|
94
101
|
sns_root_canister_id : text;
|
|
@@ -163,6 +170,7 @@ type NeuronsFundParticipationConstraints = record {
|
|
|
163
170
|
coefficient_intervals : vec LinearScalingCoefficient;
|
|
164
171
|
max_neurons_fund_participation_icp_e8s : opt nat64;
|
|
165
172
|
min_direct_participation_threshold_icp_e8s : opt nat64;
|
|
173
|
+
ideal_matched_participation_function : opt IdealMatchedParticipationFunction;
|
|
166
174
|
};
|
|
167
175
|
type NewSaleTicketRequest = record {
|
|
168
176
|
subaccount : opt vec nat8;
|
|
@@ -170,7 +178,11 @@ type NewSaleTicketRequest = record {
|
|
|
170
178
|
};
|
|
171
179
|
type NewSaleTicketResponse = record { result : opt Result_2 };
|
|
172
180
|
type Ok = record { block_height : opt nat64 };
|
|
173
|
-
type Ok_1 = record {
|
|
181
|
+
type Ok_1 = record {
|
|
182
|
+
neurons_fund_participation_icp_e8s : opt nat64;
|
|
183
|
+
neurons_fund_neurons_count : opt nat64;
|
|
184
|
+
};
|
|
185
|
+
type Ok_2 = record { ticket : opt Ticket };
|
|
174
186
|
type OpenRequest = record {
|
|
175
187
|
cf_participants : vec CfParticipant;
|
|
176
188
|
params : opt Params;
|
|
@@ -198,7 +210,8 @@ type Possibility = variant {
|
|
|
198
210
|
Err : CanisterCallError;
|
|
199
211
|
};
|
|
200
212
|
type Possibility_1 = variant { Ok : Response; Err : CanisterCallError };
|
|
201
|
-
type Possibility_2 = variant { Ok :
|
|
213
|
+
type Possibility_2 = variant { Ok : Ok_1; Err : Error };
|
|
214
|
+
type Possibility_3 = variant { Ok : record {}; Err : CanisterCallError };
|
|
202
215
|
type RefreshBuyerTokensRequest = record {
|
|
203
216
|
confirmation_text : opt text;
|
|
204
217
|
buyer : text;
|
|
@@ -209,14 +222,17 @@ type RefreshBuyerTokensResponse = record {
|
|
|
209
222
|
};
|
|
210
223
|
type Response = record { governance_error : opt GovernanceError };
|
|
211
224
|
type Result = variant { Ok : Ok; Err : Err };
|
|
212
|
-
type Result_1 = variant { Ok :
|
|
213
|
-
type Result_2 = variant { Ok :
|
|
225
|
+
type Result_1 = variant { Ok : Ok_2; Err : Err_1 };
|
|
226
|
+
type Result_2 = variant { Ok : Ok_2; Err : Err_2 };
|
|
214
227
|
type SetDappControllersCallResult = record { possibility : opt Possibility };
|
|
215
228
|
type SetDappControllersResponse = record { failed_updates : vec FailedUpdate };
|
|
216
|
-
type SetModeCallResult = record { possibility : opt
|
|
229
|
+
type SetModeCallResult = record { possibility : opt Possibility_3 };
|
|
217
230
|
type SettleCommunityFundParticipationResult = record {
|
|
218
231
|
possibility : opt Possibility_1;
|
|
219
232
|
};
|
|
233
|
+
type SettleNeuronsFundParticipationResult = record {
|
|
234
|
+
possibility : opt Possibility_2;
|
|
235
|
+
};
|
|
220
236
|
type SnsNeuronRecipe = record {
|
|
221
237
|
sns : opt TransferableAmount;
|
|
222
238
|
claimed_status : opt int32;
|
|
@@ -237,6 +253,7 @@ type Swap = record {
|
|
|
237
253
|
direct_participation_icp_e8s : opt nat64;
|
|
238
254
|
lifecycle : int32;
|
|
239
255
|
purge_old_tickets_next_principal : opt vec nat8;
|
|
256
|
+
decentralization_swap_termination_timestamp_seconds : opt nat64;
|
|
240
257
|
buyers : vec record { text; BuyerState };
|
|
241
258
|
params : opt Params;
|
|
242
259
|
open_sns_token_swap_proposal_id : opt nat64;
|
|
@@ -286,7 +303,7 @@ service : (Init) -> {
|
|
|
286
303
|
ListSnsNeuronRecipesResponse,
|
|
287
304
|
) query;
|
|
288
305
|
new_sale_ticket : (NewSaleTicketRequest) -> (NewSaleTicketResponse);
|
|
289
|
-
notify_payment_failure : (record {}) -> (
|
|
306
|
+
notify_payment_failure : (record {}) -> (Ok_2);
|
|
290
307
|
open : (OpenRequest) -> (record {});
|
|
291
308
|
refresh_buyer_tokens : (RefreshBuyerTokensRequest) -> (
|
|
292
309
|
RefreshBuyerTokensResponse,
|
|
@@ -11,10 +11,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
11
11
|
'slope_denominator' : IDL.Opt(IDL.Nat64),
|
|
12
12
|
'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
13
13
|
});
|
|
14
|
+
const IdealMatchedParticipationFunction = IDL.Record({
|
|
15
|
+
'serialized_representation' : IDL.Opt(IDL.Text),
|
|
16
|
+
});
|
|
14
17
|
const NeuronsFundParticipationConstraints = IDL.Record({
|
|
15
18
|
'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
|
|
16
19
|
'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
17
20
|
'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
21
|
+
'ideal_matched_participation_function' : IDL.Opt(
|
|
22
|
+
IdealMatchedParticipationFunction
|
|
23
|
+
),
|
|
18
24
|
});
|
|
19
25
|
const CfNeuron = IDL.Record({
|
|
20
26
|
'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
|
|
@@ -89,6 +95,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
89
95
|
const SetDappControllersCallResult = IDL.Record({
|
|
90
96
|
'possibility' : IDL.Opt(Possibility),
|
|
91
97
|
});
|
|
98
|
+
const SweepResult = IDL.Record({
|
|
99
|
+
'failure' : IDL.Nat32,
|
|
100
|
+
'skipped' : IDL.Nat32,
|
|
101
|
+
'invalid' : IDL.Nat32,
|
|
102
|
+
'success' : IDL.Nat32,
|
|
103
|
+
'global_failures' : IDL.Nat32,
|
|
104
|
+
});
|
|
92
105
|
const GovernanceError = IDL.Record({
|
|
93
106
|
'error_message' : IDL.Text,
|
|
94
107
|
'error_type' : IDL.Int32,
|
|
@@ -103,26 +116,32 @@ export const idlFactory = ({ IDL }) => {
|
|
|
103
116
|
const SettleCommunityFundParticipationResult = IDL.Record({
|
|
104
117
|
'possibility' : IDL.Opt(Possibility_1),
|
|
105
118
|
});
|
|
106
|
-
const
|
|
119
|
+
const Ok_1 = IDL.Record({
|
|
120
|
+
'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
121
|
+
'neurons_fund_neurons_count' : IDL.Opt(IDL.Nat64),
|
|
122
|
+
});
|
|
123
|
+
const Error = IDL.Record({ 'message' : IDL.Opt(IDL.Text) });
|
|
124
|
+
const Possibility_2 = IDL.Variant({ 'Ok' : Ok_1, 'Err' : Error });
|
|
125
|
+
const SettleNeuronsFundParticipationResult = IDL.Record({
|
|
126
|
+
'possibility' : IDL.Opt(Possibility_2),
|
|
127
|
+
});
|
|
128
|
+
const Possibility_3 = IDL.Variant({
|
|
107
129
|
'Ok' : IDL.Record({}),
|
|
108
130
|
'Err' : CanisterCallError,
|
|
109
131
|
});
|
|
110
132
|
const SetModeCallResult = IDL.Record({
|
|
111
|
-
'possibility' : IDL.Opt(
|
|
112
|
-
});
|
|
113
|
-
const SweepResult = IDL.Record({
|
|
114
|
-
'failure' : IDL.Nat32,
|
|
115
|
-
'skipped' : IDL.Nat32,
|
|
116
|
-
'invalid' : IDL.Nat32,
|
|
117
|
-
'success' : IDL.Nat32,
|
|
118
|
-
'global_failures' : IDL.Nat32,
|
|
133
|
+
'possibility' : IDL.Opt(Possibility_3),
|
|
119
134
|
});
|
|
120
135
|
const FinalizeSwapResponse = IDL.Record({
|
|
121
136
|
'set_dapp_controllers_call_result' : IDL.Opt(SetDappControllersCallResult),
|
|
137
|
+
'create_sns_neuron_recipes_result' : IDL.Opt(SweepResult),
|
|
122
138
|
'settle_community_fund_participation_result' : IDL.Opt(
|
|
123
139
|
SettleCommunityFundParticipationResult
|
|
124
140
|
),
|
|
125
141
|
'error_message' : IDL.Opt(IDL.Text),
|
|
142
|
+
'settle_neurons_fund_participation_result' : IDL.Opt(
|
|
143
|
+
SettleNeuronsFundParticipationResult
|
|
144
|
+
),
|
|
126
145
|
'set_mode_call_result' : IDL.Opt(SetModeCallResult),
|
|
127
146
|
'sweep_icp_result' : IDL.Opt(SweepResult),
|
|
128
147
|
'claim_neuron_result' : IDL.Opt(SweepResult),
|
|
@@ -183,6 +202,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
183
202
|
const GetLifecycleResponse = IDL.Record({
|
|
184
203
|
'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
185
204
|
'lifecycle' : IDL.Opt(IDL.Int32),
|
|
205
|
+
'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
186
206
|
});
|
|
187
207
|
const Icrc1Account = IDL.Record({
|
|
188
208
|
'owner' : IDL.Opt(IDL.Principal),
|
|
@@ -194,9 +214,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
194
214
|
'account' : IDL.Opt(Icrc1Account),
|
|
195
215
|
'amount_icp_e8s' : IDL.Nat64,
|
|
196
216
|
});
|
|
197
|
-
const
|
|
217
|
+
const Ok_2 = IDL.Record({ 'ticket' : IDL.Opt(Ticket) });
|
|
198
218
|
const Err_1 = IDL.Record({ 'error_type' : IDL.Opt(IDL.Int32) });
|
|
199
|
-
const Result_1 = IDL.Variant({ 'Ok' :
|
|
219
|
+
const Result_1 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_1 });
|
|
200
220
|
const GetOpenTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });
|
|
201
221
|
const Params = IDL.Record({
|
|
202
222
|
'min_participant_icp_e8s' : IDL.Nat64,
|
|
@@ -251,6 +271,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
251
271
|
'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
252
272
|
'lifecycle' : IDL.Int32,
|
|
253
273
|
'purge_old_tickets_next_principal' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
274
|
+
'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
254
275
|
'buyers' : IDL.Vec(IDL.Tuple(IDL.Text, BuyerState)),
|
|
255
276
|
'params' : IDL.Opt(Params),
|
|
256
277
|
'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),
|
|
@@ -303,7 +324,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
303
324
|
'existing_ticket' : IDL.Opt(Ticket),
|
|
304
325
|
'error_type' : IDL.Int32,
|
|
305
326
|
});
|
|
306
|
-
const Result_2 = IDL.Variant({ 'Ok' :
|
|
327
|
+
const Result_2 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_2 });
|
|
307
328
|
const NewSaleTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_2) });
|
|
308
329
|
const OpenRequest = IDL.Record({
|
|
309
330
|
'cf_participants' : IDL.Vec(CfParticipant),
|
|
@@ -387,7 +408,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
387
408
|
[NewSaleTicketResponse],
|
|
388
409
|
[],
|
|
389
410
|
),
|
|
390
|
-
'notify_payment_failure' : IDL.Func([IDL.Record({})], [
|
|
411
|
+
'notify_payment_failure' : IDL.Func([IDL.Record({})], [Ok_2], []),
|
|
391
412
|
'open' : IDL.Func([OpenRequest], [IDL.Record({})], []),
|
|
392
413
|
'refresh_buyer_tokens' : IDL.Func(
|
|
393
414
|
[RefreshBuyerTokensRequest],
|
|
@@ -413,10 +434,16 @@ export const init = ({ IDL }) => {
|
|
|
413
434
|
'slope_denominator' : IDL.Opt(IDL.Nat64),
|
|
414
435
|
'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
415
436
|
});
|
|
437
|
+
const IdealMatchedParticipationFunction = IDL.Record({
|
|
438
|
+
'serialized_representation' : IDL.Opt(IDL.Text),
|
|
439
|
+
});
|
|
416
440
|
const NeuronsFundParticipationConstraints = IDL.Record({
|
|
417
441
|
'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),
|
|
418
442
|
'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
419
443
|
'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),
|
|
444
|
+
'ideal_matched_participation_function' : IDL.Opt(
|
|
445
|
+
IdealMatchedParticipationFunction
|
|
446
|
+
),
|
|
420
447
|
});
|
|
421
448
|
const CfNeuron = IDL.Record({
|
|
422
449
|
'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),
|