@dfinity/sns 0.0.2 → 0.0.3-next-2022-08-10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/candid/{ledger.certified.idl.d.ts → icrc1_ledger.certified.idl.d.ts} +0 -0
  2. package/dist/candid/icrc1_ledger.certified.idl.js +104 -0
  3. package/dist/candid/icrc1_ledger.d.ts +64 -0
  4. package/dist/candid/icrc1_ledger.did +77 -0
  5. package/dist/candid/{ledger.idl.d.ts → icrc1_ledger.idl.d.ts} +0 -0
  6. package/dist/candid/icrc1_ledger.idl.js +108 -0
  7. package/dist/candid/sns_governance.certified.idl.js +21 -0
  8. package/dist/candid/sns_governance.d.ts +11 -0
  9. package/dist/candid/sns_governance.did +12 -1
  10. package/dist/candid/sns_governance.idl.js +25 -0
  11. package/dist/candid/sns_root.certified.idl.js +10 -4
  12. package/dist/candid/sns_root.d.ts +8 -4
  13. package/dist/candid/sns_root.did +9 -5
  14. package/dist/candid/sns_root.idl.js +10 -4
  15. package/dist/candid/sns_swap.certified.idl.js +43 -12
  16. package/dist/candid/sns_swap.d.ts +30 -5
  17. package/dist/candid/sns_swap.did +21 -5
  18. package/dist/candid/sns_swap.idl.js +43 -12
  19. package/dist/cjs/index.cjs.js +1 -852
  20. package/dist/cjs/index.cjs.js.map +3 -3
  21. package/dist/esm/chunk-BW5FNCFQ.js +2 -0
  22. package/dist/esm/chunk-BW5FNCFQ.js.map +7 -0
  23. package/dist/esm/chunk-C7NIDDRE.js +2 -0
  24. package/dist/esm/chunk-C7NIDDRE.js.map +7 -0
  25. package/dist/esm/chunk-ETZUMPBI.js +2 -0
  26. package/dist/esm/chunk-ETZUMPBI.js.map +7 -0
  27. package/dist/esm/chunk-OZ3QVZ6V.js +2 -0
  28. package/dist/esm/chunk-OZ3QVZ6V.js.map +7 -0
  29. package/dist/esm/chunk-UTRXOFS6.js +2 -0
  30. package/dist/esm/chunk-UTRXOFS6.js.map +7 -0
  31. package/dist/esm/chunk-WP45ZSPX.js +2 -0
  32. package/dist/esm/chunk-WP45ZSPX.js.map +7 -0
  33. package/dist/esm/chunk-YFZBYWX4.js +2 -0
  34. package/dist/esm/chunk-YFZBYWX4.js.map +7 -0
  35. package/dist/esm/governance.canister.js +1 -1
  36. package/dist/esm/index.js +1 -1
  37. package/dist/esm/index.js.map +3 -3
  38. package/dist/esm/ledger.canister.js +1 -1
  39. package/dist/esm/root.canister.js +1 -1
  40. package/dist/esm/sns.js +1 -1
  41. package/dist/esm/sns.wrapper.js +1 -1
  42. package/dist/esm/swap.canister.js +1 -1
  43. package/dist/types/converters/governance.converters.d.ts +4 -0
  44. package/dist/types/enums/governance.enums.d.ts +11 -0
  45. package/dist/types/errors/governance.errors.d.ts +2 -0
  46. package/dist/types/governance.canister.d.ts +32 -7
  47. package/dist/types/index.d.ts +11 -8
  48. package/dist/types/ledger.canister.d.ts +10 -4
  49. package/dist/types/root.canister.d.ts +4 -4
  50. package/dist/types/sns.d.ts +3 -3
  51. package/dist/types/sns.wrapper.d.ts +20 -13
  52. package/dist/types/swap.canister.d.ts +12 -4
  53. package/dist/types/types/canister.options.d.ts +2 -5
  54. package/dist/types/types/governance.params.d.ts +16 -1
  55. package/dist/types/types/ledger.responses.d.ts +11 -0
  56. package/package.json +6 -4
  57. package/dist/candid/ledger.certified.idl.js +0 -97
  58. package/dist/candid/ledger.d.ts +0 -106
  59. package/dist/candid/ledger.did +0 -250
  60. package/dist/candid/ledger.idl.js +0 -109
  61. package/dist/esm/chunk-5EFW5NLJ.js +0 -2
  62. package/dist/esm/chunk-5EFW5NLJ.js.map +0 -7
  63. package/dist/esm/chunk-A576P2ZR.js +0 -2
  64. package/dist/esm/chunk-A576P2ZR.js.map +0 -7
  65. package/dist/esm/chunk-NJ4DNYU7.js +0 -2
  66. package/dist/esm/chunk-NJ4DNYU7.js.map +0 -7
  67. package/dist/esm/chunk-QOHSQFP6.js +0 -2
  68. package/dist/esm/chunk-QOHSQFP6.js.map +0 -7
  69. package/dist/esm/chunk-S7OOQWQZ.js +0 -2
  70. package/dist/esm/chunk-S7OOQWQZ.js.map +0 -7
  71. package/dist/esm/chunk-TGR2FDNH.js +0 -2
  72. package/dist/esm/chunk-TGR2FDNH.js.map +0 -7
  73. package/dist/esm/chunk-VMVMYL6O.js +0 -840
  74. package/dist/esm/chunk-VMVMYL6O.js.map +0 -7
  75. package/dist/esm/chunk-Y5V5O772.js +0 -2
  76. package/dist/esm/chunk-Y5V5O772.js.map +0 -7
  77. package/dist/types/utils/actor.utils.d.ts +0 -14
  78. package/dist/types/utils/agent.utils.d.ts +0 -5
  79. package/dist/types/utils/asserts.utils.d.ts +0 -3
  80. package/dist/types/utils/did.utils.d.ts +0 -2
@@ -0,0 +1,104 @@
1
+ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/icrc1_ledger.did */
2
+ export const idlFactory = ({ IDL }) => {
3
+ const Value = IDL.Variant({
4
+ 'Int' : IDL.Int,
5
+ 'Nat' : IDL.Nat,
6
+ 'Blob' : IDL.Vec(IDL.Nat8),
7
+ 'Text' : IDL.Text,
8
+ });
9
+ const Subaccount = IDL.Vec(IDL.Nat8);
10
+ const Account = IDL.Record({
11
+ 'of' : IDL.Principal,
12
+ 'subaccount' : IDL.Opt(Subaccount),
13
+ });
14
+ const InitArgs = IDL.Record({
15
+ 'token_symbol' : IDL.Text,
16
+ 'transfer_fee' : IDL.Nat64,
17
+ 'metadata' : IDL.Vec(IDL.Tuple(IDL.Text, Value)),
18
+ 'minting_account' : Account,
19
+ 'initial_balances' : IDL.Vec(IDL.Tuple(Account, IDL.Nat64)),
20
+ 'archive_options' : IDL.Record({
21
+ 'num_blocks_to_archive' : IDL.Nat64,
22
+ 'trigger_threshold' : IDL.Nat64,
23
+ 'max_message_size_bytes' : IDL.Opt(IDL.Nat64),
24
+ 'cycles_for_archive_creation' : IDL.Opt(IDL.Nat64),
25
+ 'node_max_memory_size_bytes' : IDL.Opt(IDL.Nat64),
26
+ 'controller_id' : IDL.Principal,
27
+ }),
28
+ 'token_name' : IDL.Text,
29
+ });
30
+ const Tokens = IDL.Nat;
31
+ const Timestamp = IDL.Nat64;
32
+ const TransferArg = IDL.Record({
33
+ 'fee' : IDL.Opt(Tokens),
34
+ 'to_principal' : IDL.Principal,
35
+ 'to_subaccount' : IDL.Opt(Subaccount),
36
+ 'memo' : IDL.Opt(IDL.Nat64),
37
+ 'from_subaccount' : IDL.Opt(Subaccount),
38
+ 'created_at_time' : IDL.Opt(Timestamp),
39
+ 'amount' : Tokens,
40
+ });
41
+ const BlockIndex = IDL.Nat;
42
+ const Duration = IDL.Nat64;
43
+ const TransferError = IDL.Variant({
44
+ 'GenericError' : IDL.Record({
45
+ 'message' : IDL.Text,
46
+ 'error_code' : IDL.Nat,
47
+ }),
48
+ 'BadBurn' : IDL.Record({ 'min_burn_amount' : Tokens }),
49
+ 'Duplicate' : IDL.Record({ 'duplicate_of' : BlockIndex }),
50
+ 'Throttled' : IDL.Null,
51
+ 'BadFee' : IDL.Record({ 'expected_fee' : Tokens }),
52
+ 'CreatedInFuture' : IDL.Null,
53
+ 'TooOld' : IDL.Record({ 'allowed_window_nanos' : Duration }),
54
+ 'InsufficientFunds' : IDL.Record({ 'balance' : Tokens }),
55
+ });
56
+ const TransferResult = IDL.Variant({
57
+ 'Ok' : BlockIndex,
58
+ 'Err' : TransferError,
59
+ });
60
+ return IDL.Service({
61
+ 'icrc1_balance_of' : IDL.Func([Account], [Tokens], []),
62
+ 'icrc1_decimals' : IDL.Func([], [IDL.Nat8], []),
63
+ 'icrc1_metadata' : IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, Value))], []),
64
+ 'icrc1_name' : IDL.Func([], [IDL.Text], []),
65
+ 'icrc1_supported_standards' : IDL.Func(
66
+ [],
67
+ [IDL.Vec(IDL.Record({ 'url' : IDL.Text, 'name' : IDL.Text }))],
68
+ [],
69
+ ),
70
+ 'icrc1_symbol' : IDL.Func([], [IDL.Text], []),
71
+ 'icrc1_total_supply' : IDL.Func([], [Tokens], []),
72
+ 'icrc1_transfer' : IDL.Func([TransferArg], [TransferResult], []),
73
+ });
74
+ };
75
+ export const init = ({ IDL }) => {
76
+ const Value = IDL.Variant({
77
+ 'Int' : IDL.Int,
78
+ 'Nat' : IDL.Nat,
79
+ 'Blob' : IDL.Vec(IDL.Nat8),
80
+ 'Text' : IDL.Text,
81
+ });
82
+ const Subaccount = IDL.Vec(IDL.Nat8);
83
+ const Account = IDL.Record({
84
+ 'of' : IDL.Principal,
85
+ 'subaccount' : IDL.Opt(Subaccount),
86
+ });
87
+ const InitArgs = IDL.Record({
88
+ 'token_symbol' : IDL.Text,
89
+ 'transfer_fee' : IDL.Nat64,
90
+ 'metadata' : IDL.Vec(IDL.Tuple(IDL.Text, Value)),
91
+ 'minting_account' : Account,
92
+ 'initial_balances' : IDL.Vec(IDL.Tuple(Account, IDL.Nat64)),
93
+ 'archive_options' : IDL.Record({
94
+ 'num_blocks_to_archive' : IDL.Nat64,
95
+ 'trigger_threshold' : IDL.Nat64,
96
+ 'max_message_size_bytes' : IDL.Opt(IDL.Nat64),
97
+ 'cycles_for_archive_creation' : IDL.Opt(IDL.Nat64),
98
+ 'node_max_memory_size_bytes' : IDL.Opt(IDL.Nat64),
99
+ 'controller_id' : IDL.Principal,
100
+ }),
101
+ 'token_name' : IDL.Text,
102
+ });
103
+ return [InitArgs];
104
+ };
@@ -0,0 +1,64 @@
1
+ import type { Principal } from "@dfinity/principal";
2
+ export interface Account {
3
+ of: Principal;
4
+ subaccount: [] | [Subaccount];
5
+ }
6
+ export type BlockIndex = bigint;
7
+ export type Duration = bigint;
8
+ export interface InitArgs {
9
+ token_symbol: string;
10
+ transfer_fee: bigint;
11
+ metadata: Array<[string, Value]>;
12
+ minting_account: Account;
13
+ initial_balances: Array<[Account, bigint]>;
14
+ archive_options: {
15
+ num_blocks_to_archive: bigint;
16
+ trigger_threshold: bigint;
17
+ max_message_size_bytes: [] | [bigint];
18
+ cycles_for_archive_creation: [] | [bigint];
19
+ node_max_memory_size_bytes: [] | [bigint];
20
+ controller_id: Principal;
21
+ };
22
+ token_name: string;
23
+ }
24
+ export type Subaccount = Array<number>;
25
+ export type Timestamp = bigint;
26
+ export type Tokens = bigint;
27
+ export interface TransferArg {
28
+ fee: [] | [Tokens];
29
+ to_principal: Principal;
30
+ to_subaccount: [] | [Subaccount];
31
+ memo: [] | [bigint];
32
+ from_subaccount: [] | [Subaccount];
33
+ created_at_time: [] | [Timestamp];
34
+ amount: Tokens;
35
+ }
36
+ export type TransferError =
37
+ | {
38
+ GenericError: { message: string; error_code: bigint };
39
+ }
40
+ | { BadBurn: { min_burn_amount: Tokens } }
41
+ | { Duplicate: { duplicate_of: BlockIndex } }
42
+ | { Throttled: null }
43
+ | { BadFee: { expected_fee: Tokens } }
44
+ | { CreatedInFuture: null }
45
+ | { TooOld: { allowed_window_nanos: Duration } }
46
+ | { InsufficientFunds: { balance: Tokens } };
47
+ export type TransferResult = { Ok: BlockIndex } | { Err: TransferError };
48
+ export type Value =
49
+ | { Int: bigint }
50
+ | { Nat: bigint }
51
+ | { Blob: Array<number> }
52
+ | { Text: string };
53
+ export interface _SERVICE {
54
+ icrc1_balance_of: (arg_0: Account) => Promise<Tokens>;
55
+ icrc1_decimals: () => Promise<number>;
56
+ icrc1_metadata: () => Promise<Array<[string, Value]>>;
57
+ icrc1_name: () => Promise<string>;
58
+ icrc1_supported_standards: () => Promise<
59
+ Array<{ url: string; name: string }>
60
+ >;
61
+ icrc1_symbol: () => Promise<string>;
62
+ icrc1_total_supply: () => Promise<Tokens>;
63
+ icrc1_transfer: (arg_0: TransferArg) => Promise<TransferResult>;
64
+ }
@@ -0,0 +1,77 @@
1
+ // Generated from IC repo commit fdc887649ec7af9669be61f94c0074bf81977a08 'rs/rosetta-api/icrc1/ledger/icrc1.did' by import-candid
2
+ type BlockIndex = nat;
3
+ type Subaccount = blob;
4
+ // Number of nanoseconds since the UNIX epoch in UTC timezone.
5
+ type Timestamp = nat64;
6
+ // Number of nanoseconds between two [Timestamp]s.
7
+ type Duration = nat64;
8
+ type Tokens = nat;
9
+
10
+ type Account = record {
11
+ of : principal;
12
+ subaccount : opt Subaccount;
13
+ };
14
+
15
+ type TransferArg = record {
16
+ from_subaccount : opt Subaccount;
17
+ to_principal : principal;
18
+ to_subaccount : opt Subaccount;
19
+ amount : Tokens;
20
+ fee : opt Tokens;
21
+ memo : opt nat64;
22
+ created_at_time: opt Timestamp;
23
+ };
24
+
25
+ type TransferError = variant {
26
+ BadFee : record { expected_fee : Tokens };
27
+ BadBurn : record { min_burn_amount : Tokens };
28
+ InsufficientFunds : record { balance : Tokens };
29
+ TooOld : record { allowed_window_nanos : Duration };
30
+ CreatedInFuture;
31
+ Throttled;
32
+ Duplicate : record { duplicate_of : BlockIndex };
33
+ GenericError : record { error_code : nat; message : text };
34
+ };
35
+
36
+ type TransferResult = variant {
37
+ Ok : BlockIndex;
38
+ Err : TransferError;
39
+ };
40
+
41
+ // The value returned from the [icrc1_metadata] endpoint.
42
+ type Value = variant {
43
+ Nat : nat;
44
+ Int : int;
45
+ Text : text;
46
+ Blob : blob;
47
+ };
48
+
49
+ // The initialization parameters of the Ledger
50
+ type InitArgs = record {
51
+ minting_account : Account;
52
+ transfer_fee : nat64;
53
+ token_symbol : text;
54
+ token_name : text;
55
+ metadata : vec record { text; Value };
56
+ initial_balances : vec record { Account; nat64 };
57
+ archive_options : record {
58
+ num_blocks_to_archive : nat64;
59
+ trigger_threshold : nat64;
60
+ max_message_size_bytes : opt nat64;
61
+ cycles_for_archive_creation : opt nat64;
62
+ node_max_memory_size_bytes : opt nat64;
63
+ controller_id : principal;
64
+ };
65
+ };
66
+
67
+ service : (InitArgs) -> {
68
+ icrc1_name : () -> (text) query;
69
+ icrc1_symbol : () -> (text) query;
70
+ icrc1_decimals : () -> (nat8) query;
71
+ icrc1_metadata : () -> (vec record { text; Value }) query;
72
+ icrc1_total_supply : () -> (Tokens) query;
73
+
74
+ icrc1_balance_of : (Account) -> (Tokens) query;
75
+ icrc1_transfer : (TransferArg) -> (TransferResult);
76
+ icrc1_supported_standards : () -> (vec record { name : text; url : text }) query;
77
+ }
@@ -0,0 +1,108 @@
1
+ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/icrc1_ledger.did */
2
+ export const idlFactory = ({ IDL }) => {
3
+ const Value = IDL.Variant({
4
+ 'Int' : IDL.Int,
5
+ 'Nat' : IDL.Nat,
6
+ 'Blob' : IDL.Vec(IDL.Nat8),
7
+ 'Text' : IDL.Text,
8
+ });
9
+ const Subaccount = IDL.Vec(IDL.Nat8);
10
+ const Account = IDL.Record({
11
+ 'of' : IDL.Principal,
12
+ 'subaccount' : IDL.Opt(Subaccount),
13
+ });
14
+ const InitArgs = IDL.Record({
15
+ 'token_symbol' : IDL.Text,
16
+ 'transfer_fee' : IDL.Nat64,
17
+ 'metadata' : IDL.Vec(IDL.Tuple(IDL.Text, Value)),
18
+ 'minting_account' : Account,
19
+ 'initial_balances' : IDL.Vec(IDL.Tuple(Account, IDL.Nat64)),
20
+ 'archive_options' : IDL.Record({
21
+ 'num_blocks_to_archive' : IDL.Nat64,
22
+ 'trigger_threshold' : IDL.Nat64,
23
+ 'max_message_size_bytes' : IDL.Opt(IDL.Nat64),
24
+ 'cycles_for_archive_creation' : IDL.Opt(IDL.Nat64),
25
+ 'node_max_memory_size_bytes' : IDL.Opt(IDL.Nat64),
26
+ 'controller_id' : IDL.Principal,
27
+ }),
28
+ 'token_name' : IDL.Text,
29
+ });
30
+ const Tokens = IDL.Nat;
31
+ const Timestamp = IDL.Nat64;
32
+ const TransferArg = IDL.Record({
33
+ 'fee' : IDL.Opt(Tokens),
34
+ 'to_principal' : IDL.Principal,
35
+ 'to_subaccount' : IDL.Opt(Subaccount),
36
+ 'memo' : IDL.Opt(IDL.Nat64),
37
+ 'from_subaccount' : IDL.Opt(Subaccount),
38
+ 'created_at_time' : IDL.Opt(Timestamp),
39
+ 'amount' : Tokens,
40
+ });
41
+ const BlockIndex = IDL.Nat;
42
+ const Duration = IDL.Nat64;
43
+ const TransferError = IDL.Variant({
44
+ 'GenericError' : IDL.Record({
45
+ 'message' : IDL.Text,
46
+ 'error_code' : IDL.Nat,
47
+ }),
48
+ 'BadBurn' : IDL.Record({ 'min_burn_amount' : Tokens }),
49
+ 'Duplicate' : IDL.Record({ 'duplicate_of' : BlockIndex }),
50
+ 'Throttled' : IDL.Null,
51
+ 'BadFee' : IDL.Record({ 'expected_fee' : Tokens }),
52
+ 'CreatedInFuture' : IDL.Null,
53
+ 'TooOld' : IDL.Record({ 'allowed_window_nanos' : Duration }),
54
+ 'InsufficientFunds' : IDL.Record({ 'balance' : Tokens }),
55
+ });
56
+ const TransferResult = IDL.Variant({
57
+ 'Ok' : BlockIndex,
58
+ 'Err' : TransferError,
59
+ });
60
+ return IDL.Service({
61
+ 'icrc1_balance_of' : IDL.Func([Account], [Tokens], ['query']),
62
+ 'icrc1_decimals' : IDL.Func([], [IDL.Nat8], ['query']),
63
+ 'icrc1_metadata' : IDL.Func(
64
+ [],
65
+ [IDL.Vec(IDL.Tuple(IDL.Text, Value))],
66
+ ['query'],
67
+ ),
68
+ 'icrc1_name' : IDL.Func([], [IDL.Text], ['query']),
69
+ 'icrc1_supported_standards' : IDL.Func(
70
+ [],
71
+ [IDL.Vec(IDL.Record({ 'url' : IDL.Text, 'name' : IDL.Text }))],
72
+ ['query'],
73
+ ),
74
+ 'icrc1_symbol' : IDL.Func([], [IDL.Text], ['query']),
75
+ 'icrc1_total_supply' : IDL.Func([], [Tokens], ['query']),
76
+ 'icrc1_transfer' : IDL.Func([TransferArg], [TransferResult], []),
77
+ });
78
+ };
79
+ export const init = ({ IDL }) => {
80
+ const Value = IDL.Variant({
81
+ 'Int' : IDL.Int,
82
+ 'Nat' : IDL.Nat,
83
+ 'Blob' : IDL.Vec(IDL.Nat8),
84
+ 'Text' : IDL.Text,
85
+ });
86
+ const Subaccount = IDL.Vec(IDL.Nat8);
87
+ const Account = IDL.Record({
88
+ 'of' : IDL.Principal,
89
+ 'subaccount' : IDL.Opt(Subaccount),
90
+ });
91
+ const InitArgs = IDL.Record({
92
+ 'token_symbol' : IDL.Text,
93
+ 'transfer_fee' : IDL.Nat64,
94
+ 'metadata' : IDL.Vec(IDL.Tuple(IDL.Text, Value)),
95
+ 'minting_account' : Account,
96
+ 'initial_balances' : IDL.Vec(IDL.Tuple(Account, IDL.Nat64)),
97
+ 'archive_options' : IDL.Record({
98
+ 'num_blocks_to_archive' : IDL.Nat64,
99
+ 'trigger_threshold' : IDL.Nat64,
100
+ 'max_message_size_bytes' : IDL.Opt(IDL.Nat64),
101
+ 'cycles_for_archive_creation' : IDL.Opt(IDL.Nat64),
102
+ 'node_max_memory_size_bytes' : IDL.Opt(IDL.Nat64),
103
+ 'controller_id' : IDL.Principal,
104
+ }),
105
+ 'token_name' : IDL.Text,
106
+ });
107
+ return [InitArgs];
108
+ };
@@ -60,6 +60,7 @@ export const idlFactory = ({ IDL }) => {
60
60
  'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),
61
61
  'reject_cost_e8s' : IDL.Opt(IDL.Nat64),
62
62
  'max_proposals_to_keep_per_action' : IDL.Opt(IDL.Nat32),
63
+ 'wait_for_quiet_deadline_increase_seconds' : IDL.Opt(IDL.Nat64),
63
64
  'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
64
65
  'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
65
66
  'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
@@ -102,6 +103,7 @@ export const idlFactory = ({ IDL }) => {
102
103
  'ManageNervousSystemParameters' : NervousSystemParameters,
103
104
  'AddGenericNervousSystemFunction' : NervousSystemFunction,
104
105
  'RemoveGenericNervousSystemFunction' : IDL.Nat64,
106
+ 'UpgradeSnsToNextVersion' : IDL.Record({}),
105
107
  'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
106
108
  'Unspecified' : IDL.Record({}),
107
109
  'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
@@ -204,6 +206,12 @@ export const idlFactory = ({ IDL }) => {
204
206
  'command' : IDL.Opt(Command_2),
205
207
  'timestamp' : IDL.Nat64,
206
208
  });
209
+ const GetMetadataResponse = IDL.Record({
210
+ 'url' : IDL.Opt(IDL.Text),
211
+ 'logo' : IDL.Opt(IDL.Text),
212
+ 'name' : IDL.Opt(IDL.Text),
213
+ 'description' : IDL.Opt(IDL.Text),
214
+ });
207
215
  const NeuronPermission = IDL.Record({
208
216
  'principal' : IDL.Opt(IDL.Principal),
209
217
  'permission_type' : IDL.Vec(IDL.Int32),
@@ -232,9 +240,11 @@ export const idlFactory = ({ IDL }) => {
232
240
  'mode' : IDL.Int32,
233
241
  'parameters' : IDL.Opt(NervousSystemParameters),
234
242
  'latest_reward_event' : IDL.Opt(RewardEvent),
243
+ 'swap_canister_id' : IDL.Opt(IDL.Principal),
235
244
  'ledger_canister_id' : IDL.Opt(IDL.Principal),
236
245
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
237
246
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
247
+ 'sns_metadata' : IDL.Opt(GetMetadataResponse),
238
248
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
239
249
  'genesis_timestamp_seconds' : IDL.Nat64,
240
250
  });
@@ -338,6 +348,7 @@ export const idlFactory = ({ IDL }) => {
338
348
  const SetMode = IDL.Record({ 'mode' : IDL.Int32 });
339
349
  return IDL.Service({
340
350
  'get_build_metadata' : IDL.Func([], [IDL.Text], []),
351
+ 'get_metadata' : IDL.Func([IDL.Record({})], [GetMetadataResponse], []),
341
352
  'get_nervous_system_parameters' : IDL.Func(
342
353
  [IDL.Null],
343
354
  [NervousSystemParameters],
@@ -422,6 +433,7 @@ export const init = ({ IDL }) => {
422
433
  'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),
423
434
  'reject_cost_e8s' : IDL.Opt(IDL.Nat64),
424
435
  'max_proposals_to_keep_per_action' : IDL.Opt(IDL.Nat32),
436
+ 'wait_for_quiet_deadline_increase_seconds' : IDL.Opt(IDL.Nat64),
425
437
  'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
426
438
  'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
427
439
  'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
@@ -464,6 +476,7 @@ export const init = ({ IDL }) => {
464
476
  'ManageNervousSystemParameters' : NervousSystemParameters,
465
477
  'AddGenericNervousSystemFunction' : NervousSystemFunction,
466
478
  'RemoveGenericNervousSystemFunction' : IDL.Nat64,
479
+ 'UpgradeSnsToNextVersion' : IDL.Record({}),
467
480
  'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
468
481
  'Unspecified' : IDL.Record({}),
469
482
  'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
@@ -566,6 +579,12 @@ export const init = ({ IDL }) => {
566
579
  'command' : IDL.Opt(Command_2),
567
580
  'timestamp' : IDL.Nat64,
568
581
  });
582
+ const GetMetadataResponse = IDL.Record({
583
+ 'url' : IDL.Opt(IDL.Text),
584
+ 'logo' : IDL.Opt(IDL.Text),
585
+ 'name' : IDL.Opt(IDL.Text),
586
+ 'description' : IDL.Opt(IDL.Text),
587
+ });
569
588
  const NeuronPermission = IDL.Record({
570
589
  'principal' : IDL.Opt(IDL.Principal),
571
590
  'permission_type' : IDL.Vec(IDL.Int32),
@@ -594,9 +613,11 @@ export const init = ({ IDL }) => {
594
613
  'mode' : IDL.Int32,
595
614
  'parameters' : IDL.Opt(NervousSystemParameters),
596
615
  'latest_reward_event' : IDL.Opt(RewardEvent),
616
+ 'swap_canister_id' : IDL.Opt(IDL.Principal),
597
617
  'ledger_canister_id' : IDL.Opt(IDL.Principal),
598
618
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
599
619
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
620
+ 'sns_metadata' : IDL.Opt(GetMetadataResponse),
600
621
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
601
622
  'genesis_timestamp_seconds' : IDL.Nat64,
602
623
  });
@@ -9,6 +9,7 @@ export type Action =
9
9
  }
10
10
  | { AddGenericNervousSystemFunction: NervousSystemFunction }
11
11
  | { RemoveGenericNervousSystemFunction: bigint }
12
+ | { UpgradeSnsToNextVersion: {} }
12
13
  | { UpgradeSnsControlledCanister: UpgradeSnsControlledCanister }
13
14
  | { Unspecified: {} }
14
15
  | {
@@ -137,6 +138,12 @@ export interface GenericNervousSystemFunction {
137
138
  validator_method_name: [] | [string];
138
139
  target_method_name: [] | [string];
139
140
  }
141
+ export interface GetMetadataResponse {
142
+ url: [] | [string];
143
+ logo: [] | [string];
144
+ name: [] | [string];
145
+ description: [] | [string];
146
+ }
140
147
  export interface GetNeuron {
141
148
  neuron_id: [] | [NeuronId];
142
149
  }
@@ -156,9 +163,11 @@ export interface Governance {
156
163
  mode: number;
157
164
  parameters: [] | [NervousSystemParameters];
158
165
  latest_reward_event: [] | [RewardEvent];
166
+ swap_canister_id: [] | [Principal];
159
167
  ledger_canister_id: [] | [Principal];
160
168
  proposals: Array<[bigint, ProposalData]>;
161
169
  in_flight_commands: Array<[string, NeuronInFlightCommand]>;
170
+ sns_metadata: [] | [GetMetadataResponse];
162
171
  neurons: Array<[string, Neuron]>;
163
172
  genesis_timestamp_seconds: bigint;
164
173
  }
@@ -246,6 +255,7 @@ export interface NervousSystemParameters {
246
255
  neuron_minimum_dissolve_delay_to_vote_seconds: [] | [bigint];
247
256
  reject_cost_e8s: [] | [bigint];
248
257
  max_proposals_to_keep_per_action: [] | [number];
258
+ wait_for_quiet_deadline_increase_seconds: [] | [bigint];
249
259
  max_number_of_neurons: [] | [bigint];
250
260
  transaction_fee_e8s: [] | [bigint];
251
261
  max_number_of_proposals_with_ballots: [] | [bigint];
@@ -356,6 +366,7 @@ export interface WaitForQuietState {
356
366
  }
357
367
  export interface _SERVICE {
358
368
  get_build_metadata: () => Promise<string>;
369
+ get_metadata: (arg_0: {}) => Promise<GetMetadataResponse>;
359
370
  get_nervous_system_parameters: (
360
371
  arg_0: null
361
372
  ) => Promise<NervousSystemParameters>;
@@ -1,9 +1,10 @@
1
- // Generated from IC repo commit 12bd50418009ea8d6aabf4f5ac1182aceaf56689 'rs/sns/governance/canister/governance.did' by import-candid
1
+ // Generated from IC repo commit 518271451cf8901c77c986e007e2c4762d1fc948 'rs/sns/governance/canister/governance.did' by import-candid
2
2
  type Account = record { of : opt principal; subaccount : opt Subaccount };
3
3
  type Action = variant {
4
4
  ManageNervousSystemParameters : NervousSystemParameters;
5
5
  AddGenericNervousSystemFunction : NervousSystemFunction;
6
6
  RemoveGenericNervousSystemFunction : nat64;
7
+ UpgradeSnsToNextVersion : record {};
7
8
  UpgradeSnsControlledCanister : UpgradeSnsControlledCanister;
8
9
  Unspecified : record {};
9
10
  ExecuteGenericNervousSystemFunction : ExecuteGenericNervousSystemFunction;
@@ -116,6 +117,12 @@ type GenericNervousSystemFunction = record {
116
117
  validator_method_name : opt text;
117
118
  target_method_name : opt text;
118
119
  };
120
+ type GetMetadataResponse = record {
121
+ url : opt text;
122
+ logo : opt text;
123
+ name : opt text;
124
+ description : opt text;
125
+ };
119
126
  type GetNeuron = record { neuron_id : opt NeuronId };
120
127
  type GetNeuronResponse = record { result : opt Result };
121
128
  type GetProposal = record { proposal_id : opt ProposalId };
@@ -127,9 +134,11 @@ type Governance = record {
127
134
  mode : int32;
128
135
  parameters : opt NervousSystemParameters;
129
136
  latest_reward_event : opt RewardEvent;
137
+ swap_canister_id : opt principal;
130
138
  ledger_canister_id : opt principal;
131
139
  proposals : vec record { nat64; ProposalData };
132
140
  in_flight_commands : vec record { text; NeuronInFlightCommand };
141
+ sns_metadata : opt GetMetadataResponse;
133
142
  neurons : vec record { text; Neuron };
134
143
  genesis_timestamp_seconds : nat64;
135
144
  };
@@ -198,6 +207,7 @@ type NervousSystemParameters = record {
198
207
  neuron_minimum_dissolve_delay_to_vote_seconds : opt nat64;
199
208
  reject_cost_e8s : opt nat64;
200
209
  max_proposals_to_keep_per_action : opt nat32;
210
+ wait_for_quiet_deadline_increase_seconds : opt nat64;
201
211
  max_number_of_neurons : opt nat64;
202
212
  transaction_fee_e8s : opt nat64;
203
213
  max_number_of_proposals_with_ballots : opt nat64;
@@ -287,6 +297,7 @@ type UpgradeSnsControlledCanister = record {
287
297
  type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 };
288
298
  service : (Governance) -> {
289
299
  get_build_metadata : () -> (text) query;
300
+ get_metadata : (record {}) -> (GetMetadataResponse) query;
290
301
  get_nervous_system_parameters : (null) -> (NervousSystemParameters) query;
291
302
  get_neuron : (GetNeuron) -> (GetNeuronResponse) query;
292
303
  get_proposal : (GetProposal) -> (GetProposalResponse) query;
@@ -60,6 +60,7 @@ export const idlFactory = ({ IDL }) => {
60
60
  'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),
61
61
  'reject_cost_e8s' : IDL.Opt(IDL.Nat64),
62
62
  'max_proposals_to_keep_per_action' : IDL.Opt(IDL.Nat32),
63
+ 'wait_for_quiet_deadline_increase_seconds' : IDL.Opt(IDL.Nat64),
63
64
  'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
64
65
  'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
65
66
  'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
@@ -102,6 +103,7 @@ export const idlFactory = ({ IDL }) => {
102
103
  'ManageNervousSystemParameters' : NervousSystemParameters,
103
104
  'AddGenericNervousSystemFunction' : NervousSystemFunction,
104
105
  'RemoveGenericNervousSystemFunction' : IDL.Nat64,
106
+ 'UpgradeSnsToNextVersion' : IDL.Record({}),
105
107
  'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
106
108
  'Unspecified' : IDL.Record({}),
107
109
  'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
@@ -204,6 +206,12 @@ export const idlFactory = ({ IDL }) => {
204
206
  'command' : IDL.Opt(Command_2),
205
207
  'timestamp' : IDL.Nat64,
206
208
  });
209
+ const GetMetadataResponse = IDL.Record({
210
+ 'url' : IDL.Opt(IDL.Text),
211
+ 'logo' : IDL.Opt(IDL.Text),
212
+ 'name' : IDL.Opt(IDL.Text),
213
+ 'description' : IDL.Opt(IDL.Text),
214
+ });
207
215
  const NeuronPermission = IDL.Record({
208
216
  'principal' : IDL.Opt(IDL.Principal),
209
217
  'permission_type' : IDL.Vec(IDL.Int32),
@@ -232,9 +240,11 @@ export const idlFactory = ({ IDL }) => {
232
240
  'mode' : IDL.Int32,
233
241
  'parameters' : IDL.Opt(NervousSystemParameters),
234
242
  'latest_reward_event' : IDL.Opt(RewardEvent),
243
+ 'swap_canister_id' : IDL.Opt(IDL.Principal),
235
244
  'ledger_canister_id' : IDL.Opt(IDL.Principal),
236
245
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
237
246
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
247
+ 'sns_metadata' : IDL.Opt(GetMetadataResponse),
238
248
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
239
249
  'genesis_timestamp_seconds' : IDL.Nat64,
240
250
  });
@@ -338,6 +348,11 @@ export const idlFactory = ({ IDL }) => {
338
348
  const SetMode = IDL.Record({ 'mode' : IDL.Int32 });
339
349
  return IDL.Service({
340
350
  'get_build_metadata' : IDL.Func([], [IDL.Text], ['query']),
351
+ 'get_metadata' : IDL.Func(
352
+ [IDL.Record({})],
353
+ [GetMetadataResponse],
354
+ ['query'],
355
+ ),
341
356
  'get_nervous_system_parameters' : IDL.Func(
342
357
  [IDL.Null],
343
358
  [NervousSystemParameters],
@@ -426,6 +441,7 @@ export const init = ({ IDL }) => {
426
441
  'neuron_minimum_dissolve_delay_to_vote_seconds' : IDL.Opt(IDL.Nat64),
427
442
  'reject_cost_e8s' : IDL.Opt(IDL.Nat64),
428
443
  'max_proposals_to_keep_per_action' : IDL.Opt(IDL.Nat32),
444
+ 'wait_for_quiet_deadline_increase_seconds' : IDL.Opt(IDL.Nat64),
429
445
  'max_number_of_neurons' : IDL.Opt(IDL.Nat64),
430
446
  'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),
431
447
  'max_number_of_proposals_with_ballots' : IDL.Opt(IDL.Nat64),
@@ -468,6 +484,7 @@ export const init = ({ IDL }) => {
468
484
  'ManageNervousSystemParameters' : NervousSystemParameters,
469
485
  'AddGenericNervousSystemFunction' : NervousSystemFunction,
470
486
  'RemoveGenericNervousSystemFunction' : IDL.Nat64,
487
+ 'UpgradeSnsToNextVersion' : IDL.Record({}),
471
488
  'UpgradeSnsControlledCanister' : UpgradeSnsControlledCanister,
472
489
  'Unspecified' : IDL.Record({}),
473
490
  'ExecuteGenericNervousSystemFunction' : ExecuteGenericNervousSystemFunction,
@@ -570,6 +587,12 @@ export const init = ({ IDL }) => {
570
587
  'command' : IDL.Opt(Command_2),
571
588
  'timestamp' : IDL.Nat64,
572
589
  });
590
+ const GetMetadataResponse = IDL.Record({
591
+ 'url' : IDL.Opt(IDL.Text),
592
+ 'logo' : IDL.Opt(IDL.Text),
593
+ 'name' : IDL.Opt(IDL.Text),
594
+ 'description' : IDL.Opt(IDL.Text),
595
+ });
573
596
  const NeuronPermission = IDL.Record({
574
597
  'principal' : IDL.Opt(IDL.Principal),
575
598
  'permission_type' : IDL.Vec(IDL.Int32),
@@ -598,9 +621,11 @@ export const init = ({ IDL }) => {
598
621
  'mode' : IDL.Int32,
599
622
  'parameters' : IDL.Opt(NervousSystemParameters),
600
623
  'latest_reward_event' : IDL.Opt(RewardEvent),
624
+ 'swap_canister_id' : IDL.Opt(IDL.Principal),
601
625
  'ledger_canister_id' : IDL.Opt(IDL.Principal),
602
626
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
603
627
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Text, NeuronInFlightCommand)),
628
+ 'sns_metadata' : IDL.Opt(GetMetadataResponse),
604
629
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Text, Neuron)),
605
630
  'genesis_timestamp_seconds' : IDL.Nat64,
606
631
  });
@@ -2,6 +2,8 @@
2
2
  export const idlFactory = ({ IDL }) => {
3
3
  const SnsRootCanister = IDL.Record({
4
4
  'dapp_canister_ids' : IDL.Vec(IDL.Principal),
5
+ 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),
6
+ 'archive_canister_ids' : IDL.Vec(IDL.Principal),
5
7
  'governance_canister_id' : IDL.Opt(IDL.Principal),
6
8
  'swap_canister_id' : IDL.Opt(IDL.Principal),
7
9
  'ledger_canister_id' : IDL.Opt(IDL.Principal),
@@ -46,10 +48,12 @@ export const idlFactory = ({ IDL }) => {
46
48
  'canister_id' : IDL.Opt(IDL.Principal),
47
49
  });
48
50
  const GetSnsCanistersSummaryResponse = IDL.Record({
49
- 'ledger_canister_summary' : IDL.Opt(CanisterSummary),
50
- 'governance_canister_summary' : IDL.Opt(CanisterSummary),
51
- 'root_canister_summary' : IDL.Opt(CanisterSummary),
52
- 'dapp_canister_summaries' : IDL.Vec(CanisterSummary),
51
+ 'root' : IDL.Opt(CanisterSummary),
52
+ 'swap' : IDL.Opt(CanisterSummary),
53
+ 'ledger' : IDL.Opt(CanisterSummary),
54
+ 'governance' : IDL.Opt(CanisterSummary),
55
+ 'dapps' : IDL.Vec(CanisterSummary),
56
+ 'archives' : IDL.Vec(CanisterSummary),
53
57
  });
54
58
  const ListSnsCanistersResponse = IDL.Record({
55
59
  'root' : IDL.Opt(IDL.Principal),
@@ -108,6 +112,8 @@ export const idlFactory = ({ IDL }) => {
108
112
  export const init = ({ IDL }) => {
109
113
  const SnsRootCanister = IDL.Record({
110
114
  'dapp_canister_ids' : IDL.Vec(IDL.Principal),
115
+ 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),
116
+ 'archive_canister_ids' : IDL.Vec(IDL.Principal),
111
117
  'governance_canister_id' : IDL.Opt(IDL.Principal),
112
118
  'swap_canister_id' : IDL.Opt(IDL.Principal),
113
119
  'ledger_canister_id' : IDL.Opt(IDL.Principal),