@dfinity/sns 3.4.0 → 3.5.0
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/README.md +126 -97
- package/dist/candid/sns_governance.certified.idl.js +42 -0
- package/dist/candid/sns_governance.d.ts +18 -9
- package/dist/candid/sns_governance.did +23 -12
- package/dist/candid/sns_governance.idl.js +42 -0
- package/dist/candid/sns_governance_test.certified.idl.js +42 -0
- package/dist/candid/sns_governance_test.d.ts +18 -9
- package/dist/candid/sns_governance_test.did +23 -12
- package/dist/candid/sns_governance_test.idl.js +42 -0
- package/dist/candid/sns_root.did +1 -1
- package/dist/candid/sns_swap.did +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/{chunk-CMVA2R27.js → chunk-63KCLBLM.js} +2 -2
- package/dist/esm/chunk-ERFZ4WF4.js +2 -0
- package/dist/esm/chunk-ERFZ4WF4.js.map +7 -0
- package/dist/esm/{chunk-Q55ZUKOX.js → chunk-TJDVNGQZ.js} +2 -2
- package/dist/esm/chunk-TJDVNGQZ.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/sns.js +1 -1
- package/dist/esm/sns.wrapper.js +1 -1
- package/dist/types/converters/governance.converters.d.ts +2 -1
- package/dist/types/governance.canister.d.ts +7 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/sns.wrapper.d.ts +2 -1
- package/dist/types/types/governance.params.d.ts +14 -2
- package/package.json +3 -3
- package/dist/esm/chunk-IVTJXPAO.js +0 -2
- package/dist/esm/chunk-IVTJXPAO.js.map +0 -7
- package/dist/esm/chunk-Q55ZUKOX.js.map +0 -7
- /package/dist/esm/{chunk-CMVA2R27.js.map → chunk-63KCLBLM.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit 10e1480992 (2025-04-01) 'rs/sns/governance/canister/governance_test.did' by import-candid
|
|
2
2
|
type Account = record {
|
|
3
3
|
owner : opt principal;
|
|
4
4
|
subaccount : opt Subaccount;
|
|
@@ -107,6 +107,7 @@ type ClaimedSwapNeurons = record {
|
|
|
107
107
|
type Command = variant {
|
|
108
108
|
Split : Split;
|
|
109
109
|
Follow : Follow;
|
|
110
|
+
SetFollowing : SetFollowing;
|
|
110
111
|
DisburseMaturity : DisburseMaturity;
|
|
111
112
|
ClaimOrRefresh : ClaimOrRefresh;
|
|
112
113
|
Configure : Configure;
|
|
@@ -123,6 +124,7 @@ type Command_1 = variant {
|
|
|
123
124
|
Error : GovernanceError;
|
|
124
125
|
Split : SplitResponse;
|
|
125
126
|
Follow : record {};
|
|
127
|
+
SetFollowing : record {};
|
|
126
128
|
DisburseMaturity : DisburseMaturityResponse;
|
|
127
129
|
ClaimOrRefresh : ClaimOrRefreshResponse;
|
|
128
130
|
Configure : record {};
|
|
@@ -138,6 +140,7 @@ type Command_1 = variant {
|
|
|
138
140
|
type Command_2 = variant {
|
|
139
141
|
Split : Split;
|
|
140
142
|
Follow : Follow;
|
|
143
|
+
SetFollowing : SetFollowing;
|
|
141
144
|
DisburseMaturity : DisburseMaturity;
|
|
142
145
|
Configure : Configure;
|
|
143
146
|
RegisterVote : RegisterVote;
|
|
@@ -223,6 +226,10 @@ type Follow = record {
|
|
|
223
226
|
followees : vec NeuronId;
|
|
224
227
|
};
|
|
225
228
|
|
|
229
|
+
type SetFollowing = record {
|
|
230
|
+
topic_following : vec FolloweesForTopic;
|
|
231
|
+
};
|
|
232
|
+
|
|
226
233
|
type Followees = record {
|
|
227
234
|
followees : vec NeuronId;
|
|
228
235
|
};
|
|
@@ -237,7 +244,7 @@ type GenericNervousSystemFunction = record {
|
|
|
237
244
|
target_canister_id : opt principal;
|
|
238
245
|
validator_method_name : opt text;
|
|
239
246
|
target_method_name : opt text;
|
|
240
|
-
topic: opt Topic;
|
|
247
|
+
topic : opt Topic;
|
|
241
248
|
};
|
|
242
249
|
|
|
243
250
|
type GetMaturityModulationResponse = record {
|
|
@@ -506,6 +513,11 @@ type NervousSystemParameters = record {
|
|
|
506
513
|
automatically_advance_target_version : opt bool;
|
|
507
514
|
};
|
|
508
515
|
|
|
516
|
+
type FolloweesForTopic = record {
|
|
517
|
+
followees : vec Followee;
|
|
518
|
+
topic : opt Topic;
|
|
519
|
+
};
|
|
520
|
+
|
|
509
521
|
type Neuron = record {
|
|
510
522
|
id : opt NeuronId;
|
|
511
523
|
staked_maturity_e8s_equivalent : opt nat64;
|
|
@@ -521,6 +533,9 @@ type Neuron = record {
|
|
|
521
533
|
vesting_period_seconds : opt nat64;
|
|
522
534
|
disburse_maturity_in_progress : vec DisburseMaturityInProgress;
|
|
523
535
|
followees : vec record { nat64; Followees };
|
|
536
|
+
topic_followees : opt record {
|
|
537
|
+
topic_id_to_followees : vec record { int32; FolloweesForTopic };
|
|
538
|
+
};
|
|
524
539
|
neuron_fees_e8s : nat64;
|
|
525
540
|
};
|
|
526
541
|
|
|
@@ -528,6 +543,11 @@ type NeuronId = record {
|
|
|
528
543
|
id : blob;
|
|
529
544
|
};
|
|
530
545
|
|
|
546
|
+
type Followee = record {
|
|
547
|
+
neuron_id : opt NeuronId;
|
|
548
|
+
alias : opt text;
|
|
549
|
+
};
|
|
550
|
+
|
|
531
551
|
type NeuronIds = record {
|
|
532
552
|
neuron_ids : vec NeuronId;
|
|
533
553
|
};
|
|
@@ -537,16 +557,6 @@ type NeuronInFlightCommand = record {
|
|
|
537
557
|
timestamp : nat64;
|
|
538
558
|
};
|
|
539
559
|
|
|
540
|
-
type NeuronParameters = record {
|
|
541
|
-
controller : opt principal;
|
|
542
|
-
dissolve_delay_seconds : opt nat64;
|
|
543
|
-
source_nns_neuron_id : opt nat64;
|
|
544
|
-
stake_e8s : opt nat64;
|
|
545
|
-
followees : vec NeuronId;
|
|
546
|
-
hotkey : opt principal;
|
|
547
|
-
neuron_id : opt NeuronId;
|
|
548
|
-
};
|
|
549
|
-
|
|
550
560
|
type NeuronPermission = record {
|
|
551
561
|
"principal" : opt principal;
|
|
552
562
|
permission_type : vec int32;
|
|
@@ -626,6 +636,7 @@ type ProposalData = record {
|
|
|
626
636
|
minimum_yes_proportion_of_exercised : opt Percentage;
|
|
627
637
|
is_eligible_for_rewards : bool;
|
|
628
638
|
executed_timestamp_seconds : nat64;
|
|
639
|
+
topic : opt Topic;
|
|
629
640
|
};
|
|
630
641
|
|
|
631
642
|
type ProposalId = record {
|
|
@@ -330,6 +330,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
330
330
|
const ProposalData = IDL.Record({
|
|
331
331
|
'id' : IDL.Opt(ProposalId),
|
|
332
332
|
'payload_text_rendering' : IDL.Opt(IDL.Text),
|
|
333
|
+
'topic' : IDL.Opt(Topic),
|
|
333
334
|
'action' : IDL.Nat64,
|
|
334
335
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
335
336
|
'action_auxiliary' : IDL.Opt(ActionAuxiliary),
|
|
@@ -381,6 +382,17 @@ export const idlFactory = ({ IDL }) => {
|
|
|
381
382
|
'vote' : IDL.Int32,
|
|
382
383
|
'proposal' : IDL.Opt(ProposalId),
|
|
383
384
|
});
|
|
385
|
+
const Followee = IDL.Record({
|
|
386
|
+
'alias' : IDL.Opt(IDL.Text),
|
|
387
|
+
'neuron_id' : IDL.Opt(NeuronId),
|
|
388
|
+
});
|
|
389
|
+
const FolloweesForTopic = IDL.Record({
|
|
390
|
+
'topic' : IDL.Opt(Topic),
|
|
391
|
+
'followees' : IDL.Vec(Followee),
|
|
392
|
+
});
|
|
393
|
+
const SetFollowing = IDL.Record({
|
|
394
|
+
'topic_following' : IDL.Vec(FolloweesForTopic),
|
|
395
|
+
});
|
|
384
396
|
const FinalizeDisburseMaturity = IDL.Record({
|
|
385
397
|
'amount_to_be_disbursed_e8s' : IDL.Nat64,
|
|
386
398
|
'to_account' : IDL.Opt(Account),
|
|
@@ -414,6 +426,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
414
426
|
'DisburseMaturity' : DisburseMaturity,
|
|
415
427
|
'Configure' : Configure,
|
|
416
428
|
'RegisterVote' : RegisterVote,
|
|
429
|
+
'SetFollowing' : SetFollowing,
|
|
417
430
|
'SyncCommand' : IDL.Record({}),
|
|
418
431
|
'MakeProposal' : Proposal,
|
|
419
432
|
'FinalizeDisburseMaturity' : FinalizeDisburseMaturity,
|
|
@@ -448,6 +461,13 @@ export const idlFactory = ({ IDL }) => {
|
|
|
448
461
|
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
449
462
|
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
450
463
|
'created_timestamp_seconds' : IDL.Nat64,
|
|
464
|
+
'topic_followees' : IDL.Opt(
|
|
465
|
+
IDL.Record({
|
|
466
|
+
'topic_id_to_followees' : IDL.Vec(
|
|
467
|
+
IDL.Tuple(IDL.Int32, FolloweesForTopic)
|
|
468
|
+
),
|
|
469
|
+
})
|
|
470
|
+
),
|
|
451
471
|
'source_nns_neuron_id' : IDL.Opt(IDL.Nat64),
|
|
452
472
|
'auto_stake_maturity' : IDL.Opt(IDL.Bool),
|
|
453
473
|
'aging_since_timestamp_seconds' : IDL.Nat64,
|
|
@@ -652,6 +672,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
652
672
|
'ClaimOrRefresh' : ClaimOrRefresh,
|
|
653
673
|
'Configure' : Configure,
|
|
654
674
|
'RegisterVote' : RegisterVote,
|
|
675
|
+
'SetFollowing' : SetFollowing,
|
|
655
676
|
'MakeProposal' : Proposal,
|
|
656
677
|
'StakeMaturity' : StakeMaturity,
|
|
657
678
|
'RemoveNeuronPermissions' : RemoveNeuronPermissions,
|
|
@@ -688,6 +709,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
688
709
|
'ClaimOrRefresh' : ClaimOrRefreshResponse,
|
|
689
710
|
'Configure' : IDL.Record({}),
|
|
690
711
|
'RegisterVote' : IDL.Record({}),
|
|
712
|
+
'SetFollowing' : IDL.Record({}),
|
|
691
713
|
'MakeProposal' : GetProposal,
|
|
692
714
|
'RemoveNeuronPermission' : IDL.Record({}),
|
|
693
715
|
'StakeMaturity' : StakeMaturityResponse,
|
|
@@ -1118,6 +1140,7 @@ export const init = ({ IDL }) => {
|
|
|
1118
1140
|
const ProposalData = IDL.Record({
|
|
1119
1141
|
'id' : IDL.Opt(ProposalId),
|
|
1120
1142
|
'payload_text_rendering' : IDL.Opt(IDL.Text),
|
|
1143
|
+
'topic' : IDL.Opt(Topic),
|
|
1121
1144
|
'action' : IDL.Nat64,
|
|
1122
1145
|
'failure_reason' : IDL.Opt(GovernanceError),
|
|
1123
1146
|
'action_auxiliary' : IDL.Opt(ActionAuxiliary),
|
|
@@ -1169,6 +1192,17 @@ export const init = ({ IDL }) => {
|
|
|
1169
1192
|
'vote' : IDL.Int32,
|
|
1170
1193
|
'proposal' : IDL.Opt(ProposalId),
|
|
1171
1194
|
});
|
|
1195
|
+
const Followee = IDL.Record({
|
|
1196
|
+
'alias' : IDL.Opt(IDL.Text),
|
|
1197
|
+
'neuron_id' : IDL.Opt(NeuronId),
|
|
1198
|
+
});
|
|
1199
|
+
const FolloweesForTopic = IDL.Record({
|
|
1200
|
+
'topic' : IDL.Opt(Topic),
|
|
1201
|
+
'followees' : IDL.Vec(Followee),
|
|
1202
|
+
});
|
|
1203
|
+
const SetFollowing = IDL.Record({
|
|
1204
|
+
'topic_following' : IDL.Vec(FolloweesForTopic),
|
|
1205
|
+
});
|
|
1172
1206
|
const FinalizeDisburseMaturity = IDL.Record({
|
|
1173
1207
|
'amount_to_be_disbursed_e8s' : IDL.Nat64,
|
|
1174
1208
|
'to_account' : IDL.Opt(Account),
|
|
@@ -1202,6 +1236,7 @@ export const init = ({ IDL }) => {
|
|
|
1202
1236
|
'DisburseMaturity' : DisburseMaturity,
|
|
1203
1237
|
'Configure' : Configure,
|
|
1204
1238
|
'RegisterVote' : RegisterVote,
|
|
1239
|
+
'SetFollowing' : SetFollowing,
|
|
1205
1240
|
'SyncCommand' : IDL.Record({}),
|
|
1206
1241
|
'MakeProposal' : Proposal,
|
|
1207
1242
|
'FinalizeDisburseMaturity' : FinalizeDisburseMaturity,
|
|
@@ -1236,6 +1271,13 @@ export const init = ({ IDL }) => {
|
|
|
1236
1271
|
'maturity_e8s_equivalent' : IDL.Nat64,
|
|
1237
1272
|
'cached_neuron_stake_e8s' : IDL.Nat64,
|
|
1238
1273
|
'created_timestamp_seconds' : IDL.Nat64,
|
|
1274
|
+
'topic_followees' : IDL.Opt(
|
|
1275
|
+
IDL.Record({
|
|
1276
|
+
'topic_id_to_followees' : IDL.Vec(
|
|
1277
|
+
IDL.Tuple(IDL.Int32, FolloweesForTopic)
|
|
1278
|
+
),
|
|
1279
|
+
})
|
|
1280
|
+
),
|
|
1239
1281
|
'source_nns_neuron_id' : IDL.Opt(IDL.Nat64),
|
|
1240
1282
|
'auto_stake_maturity' : IDL.Opt(IDL.Bool),
|
|
1241
1283
|
'aging_since_timestamp_seconds' : IDL.Nat64,
|
package/dist/candid/sns_root.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit 10e1480992 (2025-04-01) 'rs/sns/root/canister/root.did' by import-candid
|
|
2
2
|
type CanisterCallError = record {
|
|
3
3
|
code : opt int32;
|
|
4
4
|
description : text;
|
package/dist/candid/sns_swap.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit 10e1480992 (2025-04-01) '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;
|