@dfinity/sns 0.0.6-next-2022-10-21 → 0.0.6-next-2022-10-22
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/icrc1_ledger.did +1 -1
- package/dist/candid/sns_governance.certified.idl.js +26 -2
- package/dist/candid/sns_governance.d.ts +22 -1
- package/dist/candid/sns_governance.did +20 -2
- package/dist/candid/sns_governance.idl.js +26 -2
- package/dist/candid/sns_index.certified.idl.d.ts +2 -0
- package/dist/candid/sns_index.certified.idl.js +78 -0
- package/dist/candid/sns_index.d.ts +78 -0
- package/dist/candid/sns_index.did +76 -0
- package/dist/candid/sns_index.idl.d.ts +2 -0
- package/dist/candid/sns_index.idl.js +78 -0
- package/dist/candid/sns_root.certified.idl.js +4 -0
- package/dist/candid/sns_root.d.ts +3 -0
- package/dist/candid/sns_root.did +4 -1
- package/dist/candid/sns_root.idl.js +4 -0
- package/dist/candid/sns_swap.certified.idl.js +17 -0
- package/dist/candid/sns_swap.d.ts +13 -0
- package/dist/candid/sns_swap.did +9 -1
- package/dist/candid/sns_swap.idl.js +17 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/chunk-7HDVOEDZ.js +2 -0
- package/dist/esm/chunk-7HDVOEDZ.js.map +7 -0
- package/dist/esm/chunk-AQTNRH7Z.js +2 -0
- package/dist/esm/chunk-AQTNRH7Z.js.map +7 -0
- package/dist/esm/chunk-IKG6JHXA.js +2 -0
- package/dist/esm/chunk-IKG6JHXA.js.map +7 -0
- package/dist/esm/{chunk-TRSRXIVG.js → chunk-OLNKQFN3.js} +2 -2
- package/dist/esm/{chunk-TRSRXIVG.js.map → chunk-OLNKQFN3.js.map} +0 -0
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- 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 +1 -1
- package/dist/esm/chunk-2TNDJS7H.js +0 -2
- package/dist/esm/chunk-2TNDJS7H.js.map +0 -7
- package/dist/esm/chunk-CPJ3H54N.js +0 -2
- package/dist/esm/chunk-CPJ3H54N.js.map +0 -7
- package/dist/esm/chunk-Z5RIV57P.js +0 -2
- package/dist/esm/chunk-Z5RIV57P.js.map +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit f818cf1eb89bcbc9aecb1fb73de8c8de6c258c42 'rs/rosetta-api/icrc1/ledger/icrc1.did' by import-candid
|
|
2
2
|
type BlockIndex = nat;
|
|
3
3
|
type Subaccount = blob;
|
|
4
4
|
// Number of nanoseconds since the UNIX epoch in UTC timezone.
|
|
@@ -50,7 +50,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
50
50
|
'permissions' : IDL.Vec(IDL.Int32),
|
|
51
51
|
});
|
|
52
52
|
const VotingRewardsParameters = IDL.Record({
|
|
53
|
-
'start_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
54
53
|
'final_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
|
|
55
54
|
'initial_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
|
|
56
55
|
'reward_rate_transition_duration_seconds' : IDL.Opt(IDL.Nat64),
|
|
@@ -59,6 +58,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
59
58
|
const NervousSystemParameters = IDL.Record({
|
|
60
59
|
'default_followees' : IDL.Opt(DefaultFollowees),
|
|
61
60
|
'max_dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
|
|
61
|
+
'max_dissolve_delay_bonus_percentage' : IDL.Opt(IDL.Nat64),
|
|
62
62
|
'max_followees_per_function' : IDL.Opt(IDL.Nat64),
|
|
63
63
|
'neuron_claimer_permissions' : IDL.Opt(NeuronPermissionList),
|
|
64
64
|
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
@@ -71,6 +71,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
71
71
|
'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
|
|
72
72
|
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
73
73
|
'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
|
|
74
|
+
'max_age_bonus_percentage' : IDL.Opt(IDL.Nat64),
|
|
74
75
|
'neuron_grantable_permissions' : IDL.Opt(NeuronPermissionList),
|
|
75
76
|
'voting_rewards_parameters' : IDL.Opt(VotingRewardsParameters),
|
|
76
77
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
@@ -81,6 +82,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
81
82
|
'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
82
83
|
'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
83
84
|
'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
85
|
+
'index_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
84
86
|
});
|
|
85
87
|
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
86
88
|
const RewardEvent = IDL.Record({
|
|
@@ -276,6 +278,21 @@ export const idlFactory = ({ IDL }) => {
|
|
|
276
278
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
|
|
277
279
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
278
280
|
});
|
|
281
|
+
const NeuronParameters = IDL.Record({
|
|
282
|
+
'controller' : IDL.Opt(IDL.Principal),
|
|
283
|
+
'dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
|
|
284
|
+
'memo' : IDL.Opt(IDL.Nat64),
|
|
285
|
+
'stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
286
|
+
'hotkey' : IDL.Opt(IDL.Principal),
|
|
287
|
+
});
|
|
288
|
+
const ClaimSwapNeuronsRequest = IDL.Record({
|
|
289
|
+
'neuron_parameters' : IDL.Vec(NeuronParameters),
|
|
290
|
+
});
|
|
291
|
+
const ClaimSwapNeuronsResponse = IDL.Record({
|
|
292
|
+
'skipped_claims' : IDL.Nat32,
|
|
293
|
+
'successful_claims' : IDL.Nat32,
|
|
294
|
+
'failed_claims' : IDL.Nat32,
|
|
295
|
+
});
|
|
279
296
|
const GetMetadataResponse = IDL.Record({
|
|
280
297
|
'url' : IDL.Opt(IDL.Text),
|
|
281
298
|
'logo' : IDL.Opt(IDL.Text),
|
|
@@ -388,6 +405,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
388
405
|
const ManageNeuronResponse = IDL.Record({ 'command' : IDL.Opt(Command_1) });
|
|
389
406
|
const SetMode = IDL.Record({ 'mode' : IDL.Int32 });
|
|
390
407
|
return IDL.Service({
|
|
408
|
+
'claim_swap_neurons' : IDL.Func(
|
|
409
|
+
[ClaimSwapNeuronsRequest],
|
|
410
|
+
[ClaimSwapNeuronsResponse],
|
|
411
|
+
[],
|
|
412
|
+
),
|
|
391
413
|
'get_build_metadata' : IDL.Func([], [IDL.Text], []),
|
|
392
414
|
'get_metadata' : IDL.Func([IDL.Record({})], [GetMetadataResponse], []),
|
|
393
415
|
'get_nervous_system_parameters' : IDL.Func(
|
|
@@ -474,7 +496,6 @@ export const init = ({ IDL }) => {
|
|
|
474
496
|
'permissions' : IDL.Vec(IDL.Int32),
|
|
475
497
|
});
|
|
476
498
|
const VotingRewardsParameters = IDL.Record({
|
|
477
|
-
'start_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
478
499
|
'final_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
|
|
479
500
|
'initial_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
|
|
480
501
|
'reward_rate_transition_duration_seconds' : IDL.Opt(IDL.Nat64),
|
|
@@ -483,6 +504,7 @@ export const init = ({ IDL }) => {
|
|
|
483
504
|
const NervousSystemParameters = IDL.Record({
|
|
484
505
|
'default_followees' : IDL.Opt(DefaultFollowees),
|
|
485
506
|
'max_dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
|
|
507
|
+
'max_dissolve_delay_bonus_percentage' : IDL.Opt(IDL.Nat64),
|
|
486
508
|
'max_followees_per_function' : IDL.Opt(IDL.Nat64),
|
|
487
509
|
'neuron_claimer_permissions' : IDL.Opt(NeuronPermissionList),
|
|
488
510
|
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
@@ -495,6 +517,7 @@ export const init = ({ IDL }) => {
|
|
|
495
517
|
'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
|
|
496
518
|
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
497
519
|
'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
|
|
520
|
+
'max_age_bonus_percentage' : IDL.Opt(IDL.Nat64),
|
|
498
521
|
'neuron_grantable_permissions' : IDL.Opt(NeuronPermissionList),
|
|
499
522
|
'voting_rewards_parameters' : IDL.Opt(VotingRewardsParameters),
|
|
500
523
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
@@ -505,6 +528,7 @@ export const init = ({ IDL }) => {
|
|
|
505
528
|
'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
506
529
|
'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
507
530
|
'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
531
|
+
'index_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
508
532
|
});
|
|
509
533
|
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
510
534
|
const RewardEvent = IDL.Record({
|
|
@@ -53,6 +53,14 @@ export interface ClaimOrRefresh {
|
|
|
53
53
|
export interface ClaimOrRefreshResponse {
|
|
54
54
|
refreshed_neuron_id: [] | [NeuronId];
|
|
55
55
|
}
|
|
56
|
+
export interface ClaimSwapNeuronsRequest {
|
|
57
|
+
neuron_parameters: Array<NeuronParameters>;
|
|
58
|
+
}
|
|
59
|
+
export interface ClaimSwapNeuronsResponse {
|
|
60
|
+
skipped_claims: number;
|
|
61
|
+
successful_claims: number;
|
|
62
|
+
failed_claims: number;
|
|
63
|
+
}
|
|
56
64
|
export type Command =
|
|
57
65
|
| { Split: Split }
|
|
58
66
|
| { Follow: Follow }
|
|
@@ -266,6 +274,7 @@ export interface NervousSystemFunction {
|
|
|
266
274
|
export interface NervousSystemParameters {
|
|
267
275
|
default_followees: [] | [DefaultFollowees];
|
|
268
276
|
max_dissolve_delay_seconds: [] | [bigint];
|
|
277
|
+
max_dissolve_delay_bonus_percentage: [] | [bigint];
|
|
269
278
|
max_followees_per_function: [] | [bigint];
|
|
270
279
|
neuron_claimer_permissions: [] | [NeuronPermissionList];
|
|
271
280
|
neuron_minimum_stake_e8s: [] | [bigint];
|
|
@@ -278,6 +287,7 @@ export interface NervousSystemParameters {
|
|
|
278
287
|
max_number_of_neurons: [] | [bigint];
|
|
279
288
|
transaction_fee_e8s: [] | [bigint];
|
|
280
289
|
max_number_of_proposals_with_ballots: [] | [bigint];
|
|
290
|
+
max_age_bonus_percentage: [] | [bigint];
|
|
281
291
|
neuron_grantable_permissions: [] | [NeuronPermissionList];
|
|
282
292
|
voting_rewards_parameters: [] | [VotingRewardsParameters];
|
|
283
293
|
max_number_of_principals_per_neuron: [] | [bigint];
|
|
@@ -301,6 +311,13 @@ export interface NeuronInFlightCommand {
|
|
|
301
311
|
command: [] | [Command_2];
|
|
302
312
|
timestamp: bigint;
|
|
303
313
|
}
|
|
314
|
+
export interface NeuronParameters {
|
|
315
|
+
controller: [] | [Principal];
|
|
316
|
+
dissolve_delay_seconds: [] | [bigint];
|
|
317
|
+
memo: [] | [bigint];
|
|
318
|
+
stake_e8s: [] | [bigint];
|
|
319
|
+
hotkey: [] | [Principal];
|
|
320
|
+
}
|
|
304
321
|
export interface NeuronPermission {
|
|
305
322
|
principal: [] | [Principal];
|
|
306
323
|
permission_type: Int32Array;
|
|
@@ -396,9 +413,9 @@ export interface Version {
|
|
|
396
413
|
swap_wasm_hash: Uint8Array;
|
|
397
414
|
ledger_wasm_hash: Uint8Array;
|
|
398
415
|
governance_wasm_hash: Uint8Array;
|
|
416
|
+
index_wasm_hash: Uint8Array;
|
|
399
417
|
}
|
|
400
418
|
export interface VotingRewardsParameters {
|
|
401
|
-
start_timestamp_seconds: [] | [bigint];
|
|
402
419
|
final_reward_rate_basis_points: [] | [bigint];
|
|
403
420
|
initial_reward_rate_basis_points: [] | [bigint];
|
|
404
421
|
reward_rate_transition_duration_seconds: [] | [bigint];
|
|
@@ -408,6 +425,10 @@ export interface WaitForQuietState {
|
|
|
408
425
|
current_deadline_timestamp_seconds: bigint;
|
|
409
426
|
}
|
|
410
427
|
export interface _SERVICE {
|
|
428
|
+
claim_swap_neurons: ActorMethod<
|
|
429
|
+
[ClaimSwapNeuronsRequest],
|
|
430
|
+
ClaimSwapNeuronsResponse
|
|
431
|
+
>;
|
|
411
432
|
get_build_metadata: ActorMethod<[], string>;
|
|
412
433
|
get_metadata: ActorMethod<[{}], GetMetadataResponse>;
|
|
413
434
|
get_nervous_system_parameters: ActorMethod<[null], NervousSystemParameters>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit f818cf1eb89bcbc9aecb1fb73de8c8de6c258c42 'rs/sns/governance/canister/governance.did' by import-candid
|
|
2
2
|
type Account = record { owner : opt principal; subaccount : opt Subaccount };
|
|
3
3
|
type Action = variant {
|
|
4
4
|
ManageNervousSystemParameters : NervousSystemParameters;
|
|
@@ -39,6 +39,14 @@ type CanisterStatusResultV2 = record {
|
|
|
39
39
|
type CanisterStatusType = variant { stopped; stopping; running };
|
|
40
40
|
type ClaimOrRefresh = record { by : opt By };
|
|
41
41
|
type ClaimOrRefreshResponse = record { refreshed_neuron_id : opt NeuronId };
|
|
42
|
+
type ClaimSwapNeuronsRequest = record {
|
|
43
|
+
neuron_parameters : vec NeuronParameters;
|
|
44
|
+
};
|
|
45
|
+
type ClaimSwapNeuronsResponse = record {
|
|
46
|
+
skipped_claims : nat32;
|
|
47
|
+
successful_claims : nat32;
|
|
48
|
+
failed_claims : nat32;
|
|
49
|
+
};
|
|
42
50
|
type Command = variant {
|
|
43
51
|
Split : Split;
|
|
44
52
|
Follow : Follow;
|
|
@@ -216,6 +224,7 @@ type NervousSystemFunction = record {
|
|
|
216
224
|
type NervousSystemParameters = record {
|
|
217
225
|
default_followees : opt DefaultFollowees;
|
|
218
226
|
max_dissolve_delay_seconds : opt nat64;
|
|
227
|
+
max_dissolve_delay_bonus_percentage : opt nat64;
|
|
219
228
|
max_followees_per_function : opt nat64;
|
|
220
229
|
neuron_claimer_permissions : opt NeuronPermissionList;
|
|
221
230
|
neuron_minimum_stake_e8s : opt nat64;
|
|
@@ -228,6 +237,7 @@ type NervousSystemParameters = record {
|
|
|
228
237
|
max_number_of_neurons : opt nat64;
|
|
229
238
|
transaction_fee_e8s : opt nat64;
|
|
230
239
|
max_number_of_proposals_with_ballots : opt nat64;
|
|
240
|
+
max_age_bonus_percentage : opt nat64;
|
|
231
241
|
neuron_grantable_permissions : opt NeuronPermissionList;
|
|
232
242
|
voting_rewards_parameters : opt VotingRewardsParameters;
|
|
233
243
|
max_number_of_principals_per_neuron : opt nat64;
|
|
@@ -249,6 +259,13 @@ type NeuronInFlightCommand = record {
|
|
|
249
259
|
command : opt Command_2;
|
|
250
260
|
timestamp : nat64;
|
|
251
261
|
};
|
|
262
|
+
type NeuronParameters = record {
|
|
263
|
+
controller : opt principal;
|
|
264
|
+
dissolve_delay_seconds : opt nat64;
|
|
265
|
+
memo : opt nat64;
|
|
266
|
+
stake_e8s : opt nat64;
|
|
267
|
+
hotkey : opt principal;
|
|
268
|
+
};
|
|
252
269
|
type NeuronPermission = record {
|
|
253
270
|
"principal" : opt principal;
|
|
254
271
|
permission_type : vec int32;
|
|
@@ -327,9 +344,9 @@ type Version = record {
|
|
|
327
344
|
swap_wasm_hash : vec nat8;
|
|
328
345
|
ledger_wasm_hash : vec nat8;
|
|
329
346
|
governance_wasm_hash : vec nat8;
|
|
347
|
+
index_wasm_hash : vec nat8;
|
|
330
348
|
};
|
|
331
349
|
type VotingRewardsParameters = record {
|
|
332
|
-
start_timestamp_seconds : opt nat64;
|
|
333
350
|
final_reward_rate_basis_points : opt nat64;
|
|
334
351
|
initial_reward_rate_basis_points : opt nat64;
|
|
335
352
|
reward_rate_transition_duration_seconds : opt nat64;
|
|
@@ -337,6 +354,7 @@ type VotingRewardsParameters = record {
|
|
|
337
354
|
};
|
|
338
355
|
type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 };
|
|
339
356
|
service : (Governance) -> {
|
|
357
|
+
claim_swap_neurons : (ClaimSwapNeuronsRequest) -> (ClaimSwapNeuronsResponse);
|
|
340
358
|
get_build_metadata : () -> (text) query;
|
|
341
359
|
get_metadata : (record {}) -> (GetMetadataResponse) query;
|
|
342
360
|
get_nervous_system_parameters : (null) -> (NervousSystemParameters) query;
|
|
@@ -50,7 +50,6 @@ export const idlFactory = ({ IDL }) => {
|
|
|
50
50
|
'permissions' : IDL.Vec(IDL.Int32),
|
|
51
51
|
});
|
|
52
52
|
const VotingRewardsParameters = IDL.Record({
|
|
53
|
-
'start_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
54
53
|
'final_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
|
|
55
54
|
'initial_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
|
|
56
55
|
'reward_rate_transition_duration_seconds' : IDL.Opt(IDL.Nat64),
|
|
@@ -59,6 +58,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
59
58
|
const NervousSystemParameters = IDL.Record({
|
|
60
59
|
'default_followees' : IDL.Opt(DefaultFollowees),
|
|
61
60
|
'max_dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
|
|
61
|
+
'max_dissolve_delay_bonus_percentage' : IDL.Opt(IDL.Nat64),
|
|
62
62
|
'max_followees_per_function' : IDL.Opt(IDL.Nat64),
|
|
63
63
|
'neuron_claimer_permissions' : IDL.Opt(NeuronPermissionList),
|
|
64
64
|
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
@@ -71,6 +71,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
71
71
|
'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
|
|
72
72
|
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
73
73
|
'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
|
|
74
|
+
'max_age_bonus_percentage' : IDL.Opt(IDL.Nat64),
|
|
74
75
|
'neuron_grantable_permissions' : IDL.Opt(NeuronPermissionList),
|
|
75
76
|
'voting_rewards_parameters' : IDL.Opt(VotingRewardsParameters),
|
|
76
77
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
@@ -81,6 +82,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
81
82
|
'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
82
83
|
'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
83
84
|
'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
85
|
+
'index_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
84
86
|
});
|
|
85
87
|
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
86
88
|
const RewardEvent = IDL.Record({
|
|
@@ -276,6 +278,21 @@ export const idlFactory = ({ IDL }) => {
|
|
|
276
278
|
'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
|
|
277
279
|
'genesis_timestamp_seconds' : IDL.Nat64,
|
|
278
280
|
});
|
|
281
|
+
const NeuronParameters = IDL.Record({
|
|
282
|
+
'controller' : IDL.Opt(IDL.Principal),
|
|
283
|
+
'dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
|
|
284
|
+
'memo' : IDL.Opt(IDL.Nat64),
|
|
285
|
+
'stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
286
|
+
'hotkey' : IDL.Opt(IDL.Principal),
|
|
287
|
+
});
|
|
288
|
+
const ClaimSwapNeuronsRequest = IDL.Record({
|
|
289
|
+
'neuron_parameters' : IDL.Vec(NeuronParameters),
|
|
290
|
+
});
|
|
291
|
+
const ClaimSwapNeuronsResponse = IDL.Record({
|
|
292
|
+
'skipped_claims' : IDL.Nat32,
|
|
293
|
+
'successful_claims' : IDL.Nat32,
|
|
294
|
+
'failed_claims' : IDL.Nat32,
|
|
295
|
+
});
|
|
279
296
|
const GetMetadataResponse = IDL.Record({
|
|
280
297
|
'url' : IDL.Opt(IDL.Text),
|
|
281
298
|
'logo' : IDL.Opt(IDL.Text),
|
|
@@ -388,6 +405,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
388
405
|
const ManageNeuronResponse = IDL.Record({ 'command' : IDL.Opt(Command_1) });
|
|
389
406
|
const SetMode = IDL.Record({ 'mode' : IDL.Int32 });
|
|
390
407
|
return IDL.Service({
|
|
408
|
+
'claim_swap_neurons' : IDL.Func(
|
|
409
|
+
[ClaimSwapNeuronsRequest],
|
|
410
|
+
[ClaimSwapNeuronsResponse],
|
|
411
|
+
[],
|
|
412
|
+
),
|
|
391
413
|
'get_build_metadata' : IDL.Func([], [IDL.Text], ['query']),
|
|
392
414
|
'get_metadata' : IDL.Func(
|
|
393
415
|
[IDL.Record({})],
|
|
@@ -482,7 +504,6 @@ export const init = ({ IDL }) => {
|
|
|
482
504
|
'permissions' : IDL.Vec(IDL.Int32),
|
|
483
505
|
});
|
|
484
506
|
const VotingRewardsParameters = IDL.Record({
|
|
485
|
-
'start_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
486
507
|
'final_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
|
|
487
508
|
'initial_reward_rate_basis_points' : IDL.Opt(IDL.Nat64),
|
|
488
509
|
'reward_rate_transition_duration_seconds' : IDL.Opt(IDL.Nat64),
|
|
@@ -491,6 +512,7 @@ export const init = ({ IDL }) => {
|
|
|
491
512
|
const NervousSystemParameters = IDL.Record({
|
|
492
513
|
'default_followees' : IDL.Opt(DefaultFollowees),
|
|
493
514
|
'max_dissolve_delay_seconds' : IDL.Opt(IDL.Nat64),
|
|
515
|
+
'max_dissolve_delay_bonus_percentage' : IDL.Opt(IDL.Nat64),
|
|
494
516
|
'max_followees_per_function' : IDL.Opt(IDL.Nat64),
|
|
495
517
|
'neuron_claimer_permissions' : IDL.Opt(NeuronPermissionList),
|
|
496
518
|
'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),
|
|
@@ -503,6 +525,7 @@ export const init = ({ IDL }) => {
|
|
|
503
525
|
'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
|
|
504
526
|
'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
|
|
505
527
|
'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
|
|
528
|
+
'max_age_bonus_percentage' : IDL.Opt(IDL.Nat64),
|
|
506
529
|
'neuron_grantable_permissions' : IDL.Opt(NeuronPermissionList),
|
|
507
530
|
'voting_rewards_parameters' : IDL.Opt(VotingRewardsParameters),
|
|
508
531
|
'max_number_of_principals_per_neuron' : IDL.Opt(IDL.Nat64),
|
|
@@ -513,6 +536,7 @@ export const init = ({ IDL }) => {
|
|
|
513
536
|
'swap_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
514
537
|
'ledger_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
515
538
|
'governance_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
539
|
+
'index_wasm_hash' : IDL.Vec(IDL.Nat8),
|
|
516
540
|
});
|
|
517
541
|
const ProposalId = IDL.Record({ 'id' : IDL.Nat64 });
|
|
518
542
|
const RewardEvent = IDL.Record({
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_index.did */
|
|
2
|
+
export const idlFactory = ({ IDL }) => {
|
|
3
|
+
const InitArgs = IDL.Record({ 'ledger_id' : IDL.Principal });
|
|
4
|
+
const TxId = IDL.Nat;
|
|
5
|
+
const Account = IDL.Record({
|
|
6
|
+
'owner' : IDL.Principal,
|
|
7
|
+
'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
8
|
+
});
|
|
9
|
+
const GetAccountTransactionsArgs = IDL.Record({
|
|
10
|
+
'max_results' : IDL.Nat,
|
|
11
|
+
'start' : IDL.Opt(TxId),
|
|
12
|
+
'account' : Account,
|
|
13
|
+
});
|
|
14
|
+
const Transaction = IDL.Record({
|
|
15
|
+
'burn' : IDL.Opt(
|
|
16
|
+
IDL.Record({
|
|
17
|
+
'from' : Account,
|
|
18
|
+
'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
19
|
+
'created_at_time' : IDL.Opt(IDL.Nat64),
|
|
20
|
+
'amount' : IDL.Nat,
|
|
21
|
+
})
|
|
22
|
+
),
|
|
23
|
+
'kind' : IDL.Text,
|
|
24
|
+
'mint' : IDL.Opt(
|
|
25
|
+
IDL.Record({
|
|
26
|
+
'to' : Account,
|
|
27
|
+
'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
28
|
+
'created_at_time' : IDL.Opt(IDL.Nat64),
|
|
29
|
+
'amount' : IDL.Nat,
|
|
30
|
+
})
|
|
31
|
+
),
|
|
32
|
+
'timestamp' : IDL.Nat64,
|
|
33
|
+
'transfer' : IDL.Opt(
|
|
34
|
+
IDL.Record({
|
|
35
|
+
'to' : Account,
|
|
36
|
+
'from' : Account,
|
|
37
|
+
'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
38
|
+
'created_at_time' : IDL.Opt(IDL.Nat64),
|
|
39
|
+
'amount' : IDL.Nat,
|
|
40
|
+
})
|
|
41
|
+
),
|
|
42
|
+
});
|
|
43
|
+
const TransactionWithId = IDL.Record({
|
|
44
|
+
'id' : TxId,
|
|
45
|
+
'transaction' : Transaction,
|
|
46
|
+
});
|
|
47
|
+
const GetTransactions = IDL.Record({
|
|
48
|
+
'transactions' : IDL.Vec(TransactionWithId),
|
|
49
|
+
'oldest_tx_id' : IDL.Opt(TxId),
|
|
50
|
+
});
|
|
51
|
+
const GetTransactionsErr = IDL.Record({ 'message' : IDL.Text });
|
|
52
|
+
const GetTransactionsResult = IDL.Variant({
|
|
53
|
+
'Ok' : GetTransactions,
|
|
54
|
+
'Err' : GetTransactionsErr,
|
|
55
|
+
});
|
|
56
|
+
const SubAccount = IDL.Vec(IDL.Nat8);
|
|
57
|
+
const ListSubaccountsArgs = IDL.Record({
|
|
58
|
+
'owner' : IDL.Principal,
|
|
59
|
+
'start' : IDL.Opt(SubAccount),
|
|
60
|
+
});
|
|
61
|
+
return IDL.Service({
|
|
62
|
+
'get_account_transactions' : IDL.Func(
|
|
63
|
+
[GetAccountTransactionsArgs],
|
|
64
|
+
[GetTransactionsResult],
|
|
65
|
+
[],
|
|
66
|
+
),
|
|
67
|
+
'ledger_id' : IDL.Func([], [IDL.Principal], []),
|
|
68
|
+
'list_subaccounts' : IDL.Func(
|
|
69
|
+
[ListSubaccountsArgs],
|
|
70
|
+
[IDL.Vec(SubAccount)],
|
|
71
|
+
[],
|
|
72
|
+
),
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
export const init = ({ IDL }) => {
|
|
76
|
+
const InitArgs = IDL.Record({ 'ledger_id' : IDL.Principal });
|
|
77
|
+
return [InitArgs];
|
|
78
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ActorMethod } from "@dfinity/agent";
|
|
2
|
+
import type { Principal } from "@dfinity/principal";
|
|
3
|
+
|
|
4
|
+
export interface Account {
|
|
5
|
+
owner: Principal;
|
|
6
|
+
subaccount: [] | [Uint8Array];
|
|
7
|
+
}
|
|
8
|
+
export interface GetAccountTransactionsArgs {
|
|
9
|
+
max_results: bigint;
|
|
10
|
+
start: [] | [TxId];
|
|
11
|
+
account: Account;
|
|
12
|
+
}
|
|
13
|
+
export interface GetTransactions {
|
|
14
|
+
transactions: Array<TransactionWithId>;
|
|
15
|
+
oldest_tx_id: [] | [TxId];
|
|
16
|
+
}
|
|
17
|
+
export interface GetTransactionsErr {
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
export type GetTransactionsResult =
|
|
21
|
+
| { Ok: GetTransactions }
|
|
22
|
+
| { Err: GetTransactionsErr };
|
|
23
|
+
export interface InitArgs {
|
|
24
|
+
ledger_id: Principal;
|
|
25
|
+
}
|
|
26
|
+
export interface ListSubaccountsArgs {
|
|
27
|
+
owner: Principal;
|
|
28
|
+
start: [] | [SubAccount];
|
|
29
|
+
}
|
|
30
|
+
export type SubAccount = Uint8Array;
|
|
31
|
+
export interface Transaction {
|
|
32
|
+
burn:
|
|
33
|
+
| []
|
|
34
|
+
| [
|
|
35
|
+
{
|
|
36
|
+
from: Account;
|
|
37
|
+
memo: [] | [Uint8Array];
|
|
38
|
+
created_at_time: [] | [bigint];
|
|
39
|
+
amount: bigint;
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
kind: string;
|
|
43
|
+
mint:
|
|
44
|
+
| []
|
|
45
|
+
| [
|
|
46
|
+
{
|
|
47
|
+
to: Account;
|
|
48
|
+
memo: [] | [Uint8Array];
|
|
49
|
+
created_at_time: [] | [bigint];
|
|
50
|
+
amount: bigint;
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
timestamp: bigint;
|
|
54
|
+
transfer:
|
|
55
|
+
| []
|
|
56
|
+
| [
|
|
57
|
+
{
|
|
58
|
+
to: Account;
|
|
59
|
+
from: Account;
|
|
60
|
+
memo: [] | [Uint8Array];
|
|
61
|
+
created_at_time: [] | [bigint];
|
|
62
|
+
amount: bigint;
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
export interface TransactionWithId {
|
|
67
|
+
id: TxId;
|
|
68
|
+
transaction: Transaction;
|
|
69
|
+
}
|
|
70
|
+
export type TxId = bigint;
|
|
71
|
+
export interface _SERVICE {
|
|
72
|
+
get_account_transactions: ActorMethod<
|
|
73
|
+
[GetAccountTransactionsArgs],
|
|
74
|
+
GetTransactionsResult
|
|
75
|
+
>;
|
|
76
|
+
ledger_id: ActorMethod<[], Principal>;
|
|
77
|
+
list_subaccounts: ActorMethod<[ListSubaccountsArgs], Array<SubAccount>>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Generated from IC repo commit f818cf1eb89bcbc9aecb1fb73de8c8de6c258c42 'rs/rosetta-api/icrc1/index/index.did' by import-candid
|
|
2
|
+
type TxId = nat;
|
|
3
|
+
|
|
4
|
+
type Account = record { owner : principal; subaccount : opt blob };
|
|
5
|
+
|
|
6
|
+
type SubAccount = blob;
|
|
7
|
+
|
|
8
|
+
type Transaction = record {
|
|
9
|
+
kind : text;
|
|
10
|
+
mint : opt record {
|
|
11
|
+
amount : nat;
|
|
12
|
+
to : Account;
|
|
13
|
+
memo : opt blob;
|
|
14
|
+
created_at_time : opt nat64;
|
|
15
|
+
};
|
|
16
|
+
burn : opt record {
|
|
17
|
+
amount : nat;
|
|
18
|
+
from : Account;
|
|
19
|
+
memo : opt blob;
|
|
20
|
+
created_at_time : opt nat64;
|
|
21
|
+
};
|
|
22
|
+
transfer : opt record {
|
|
23
|
+
amount : nat;
|
|
24
|
+
from : Account;
|
|
25
|
+
to : Account;
|
|
26
|
+
memo : opt blob;
|
|
27
|
+
created_at_time : opt nat64;
|
|
28
|
+
};
|
|
29
|
+
timestamp : nat64;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
type GetAccountTransactionsArgs = record {
|
|
33
|
+
account : Account;
|
|
34
|
+
// The txid of the last transaction seen by the client.
|
|
35
|
+
// If None then the results will start from the most recent
|
|
36
|
+
// txid.
|
|
37
|
+
start : opt TxId;
|
|
38
|
+
// Maximum number of transactions to fetch.
|
|
39
|
+
max_results : nat;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type TransactionWithId = record {
|
|
43
|
+
id : TxId;
|
|
44
|
+
transaction : Transaction;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
type GetTransactions = record {
|
|
48
|
+
transactions : vec TransactionWithId;
|
|
49
|
+
// The txid of the oldest transaction the account has
|
|
50
|
+
oldest_tx_id : opt TxId;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
type GetTransactionsErr = record {
|
|
54
|
+
message : text;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
type GetTransactionsResult = variant {
|
|
58
|
+
Ok : GetTransactions;
|
|
59
|
+
Err : GetTransactionsErr;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
type ListSubaccountsArgs = record {
|
|
63
|
+
owner: principal;
|
|
64
|
+
start: opt SubAccount;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// The initialization parameters of the Index canister.
|
|
68
|
+
type InitArgs = record {
|
|
69
|
+
ledger_id : principal;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
service : (InitArgs) -> {
|
|
73
|
+
get_account_transactions : (GetAccountTransactionsArgs) -> (GetTransactionsResult);
|
|
74
|
+
ledger_id : () -> (principal) query;
|
|
75
|
+
list_subaccounts : (ListSubaccountsArgs) -> (vec SubAccount) query;
|
|
76
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_index.did */
|
|
2
|
+
export const idlFactory = ({ IDL }) => {
|
|
3
|
+
const InitArgs = IDL.Record({ 'ledger_id' : IDL.Principal });
|
|
4
|
+
const TxId = IDL.Nat;
|
|
5
|
+
const Account = IDL.Record({
|
|
6
|
+
'owner' : IDL.Principal,
|
|
7
|
+
'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
8
|
+
});
|
|
9
|
+
const GetAccountTransactionsArgs = IDL.Record({
|
|
10
|
+
'max_results' : IDL.Nat,
|
|
11
|
+
'start' : IDL.Opt(TxId),
|
|
12
|
+
'account' : Account,
|
|
13
|
+
});
|
|
14
|
+
const Transaction = IDL.Record({
|
|
15
|
+
'burn' : IDL.Opt(
|
|
16
|
+
IDL.Record({
|
|
17
|
+
'from' : Account,
|
|
18
|
+
'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
19
|
+
'created_at_time' : IDL.Opt(IDL.Nat64),
|
|
20
|
+
'amount' : IDL.Nat,
|
|
21
|
+
})
|
|
22
|
+
),
|
|
23
|
+
'kind' : IDL.Text,
|
|
24
|
+
'mint' : IDL.Opt(
|
|
25
|
+
IDL.Record({
|
|
26
|
+
'to' : Account,
|
|
27
|
+
'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
28
|
+
'created_at_time' : IDL.Opt(IDL.Nat64),
|
|
29
|
+
'amount' : IDL.Nat,
|
|
30
|
+
})
|
|
31
|
+
),
|
|
32
|
+
'timestamp' : IDL.Nat64,
|
|
33
|
+
'transfer' : IDL.Opt(
|
|
34
|
+
IDL.Record({
|
|
35
|
+
'to' : Account,
|
|
36
|
+
'from' : Account,
|
|
37
|
+
'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
38
|
+
'created_at_time' : IDL.Opt(IDL.Nat64),
|
|
39
|
+
'amount' : IDL.Nat,
|
|
40
|
+
})
|
|
41
|
+
),
|
|
42
|
+
});
|
|
43
|
+
const TransactionWithId = IDL.Record({
|
|
44
|
+
'id' : TxId,
|
|
45
|
+
'transaction' : Transaction,
|
|
46
|
+
});
|
|
47
|
+
const GetTransactions = IDL.Record({
|
|
48
|
+
'transactions' : IDL.Vec(TransactionWithId),
|
|
49
|
+
'oldest_tx_id' : IDL.Opt(TxId),
|
|
50
|
+
});
|
|
51
|
+
const GetTransactionsErr = IDL.Record({ 'message' : IDL.Text });
|
|
52
|
+
const GetTransactionsResult = IDL.Variant({
|
|
53
|
+
'Ok' : GetTransactions,
|
|
54
|
+
'Err' : GetTransactionsErr,
|
|
55
|
+
});
|
|
56
|
+
const SubAccount = IDL.Vec(IDL.Nat8);
|
|
57
|
+
const ListSubaccountsArgs = IDL.Record({
|
|
58
|
+
'owner' : IDL.Principal,
|
|
59
|
+
'start' : IDL.Opt(SubAccount),
|
|
60
|
+
});
|
|
61
|
+
return IDL.Service({
|
|
62
|
+
'get_account_transactions' : IDL.Func(
|
|
63
|
+
[GetAccountTransactionsArgs],
|
|
64
|
+
[GetTransactionsResult],
|
|
65
|
+
[],
|
|
66
|
+
),
|
|
67
|
+
'ledger_id' : IDL.Func([], [IDL.Principal], ['query']),
|
|
68
|
+
'list_subaccounts' : IDL.Func(
|
|
69
|
+
[ListSubaccountsArgs],
|
|
70
|
+
[IDL.Vec(SubAccount)],
|
|
71
|
+
['query'],
|
|
72
|
+
),
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
export const init = ({ IDL }) => {
|
|
76
|
+
const InitArgs = IDL.Record({ 'ledger_id' : IDL.Principal });
|
|
77
|
+
return [InitArgs];
|
|
78
|
+
};
|
|
@@ -5,6 +5,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
5
5
|
'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
6
6
|
'archive_canister_ids' : IDL.Vec(IDL.Principal),
|
|
7
7
|
'governance_canister_id' : IDL.Opt(IDL.Principal),
|
|
8
|
+
'index_canister_id' : IDL.Opt(IDL.Principal),
|
|
8
9
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
9
10
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
10
11
|
});
|
|
@@ -54,6 +55,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
54
55
|
'root' : IDL.Opt(CanisterSummary),
|
|
55
56
|
'swap' : IDL.Opt(CanisterSummary),
|
|
56
57
|
'ledger' : IDL.Opt(CanisterSummary),
|
|
58
|
+
'index' : IDL.Opt(CanisterSummary),
|
|
57
59
|
'governance' : IDL.Opt(CanisterSummary),
|
|
58
60
|
'dapps' : IDL.Vec(CanisterSummary),
|
|
59
61
|
'archives' : IDL.Vec(CanisterSummary),
|
|
@@ -62,6 +64,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
62
64
|
'root' : IDL.Opt(IDL.Principal),
|
|
63
65
|
'swap' : IDL.Opt(IDL.Principal),
|
|
64
66
|
'ledger' : IDL.Opt(IDL.Principal),
|
|
67
|
+
'index' : IDL.Opt(IDL.Principal),
|
|
65
68
|
'governance' : IDL.Opt(IDL.Principal),
|
|
66
69
|
'dapps' : IDL.Vec(IDL.Principal),
|
|
67
70
|
'archives' : IDL.Vec(IDL.Principal),
|
|
@@ -118,6 +121,7 @@ export const init = ({ IDL }) => {
|
|
|
118
121
|
'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),
|
|
119
122
|
'archive_canister_ids' : IDL.Vec(IDL.Principal),
|
|
120
123
|
'governance_canister_id' : IDL.Opt(IDL.Principal),
|
|
124
|
+
'index_canister_id' : IDL.Opt(IDL.Principal),
|
|
121
125
|
'swap_canister_id' : IDL.Opt(IDL.Principal),
|
|
122
126
|
'ledger_canister_id' : IDL.Opt(IDL.Principal),
|
|
123
127
|
});
|