@dfinity/nns 2.1.0 → 3.0.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.
@@ -2,7 +2,7 @@ import type { ActorMethod } from "@dfinity/agent";
2
2
  import type { Principal } from "@dfinity/principal";
3
3
 
4
4
  export interface AccountIdentifier {
5
- hash: Uint8Array;
5
+ hash: Uint8Array | number[];
6
6
  }
7
7
  export type Action =
8
8
  | { RegisterKnownNeuron: KnownNeuron }
@@ -52,7 +52,7 @@ export interface CanisterStatusResultV2 {
52
52
  memory_size: [] | [bigint];
53
53
  cycles: [] | [bigint];
54
54
  idle_cycles_burned_per_day: [] | [bigint];
55
- module_hash: Uint8Array;
55
+ module_hash: Uint8Array | number[];
56
56
  }
57
57
  export interface CanisterSummary {
58
58
  status: [] | [CanisterStatusResultV2];
@@ -177,7 +177,7 @@ export interface Duration {
177
177
  }
178
178
  export interface ExecuteNnsFunction {
179
179
  nns_function: number;
180
- payload: Uint8Array;
180
+ payload: Uint8Array | number[];
181
181
  }
182
182
  export interface Follow {
183
183
  topic: number;
@@ -291,7 +291,7 @@ export interface ListKnownNeuronsResponse {
291
291
  known_neurons: Array<KnownNeuron>;
292
292
  }
293
293
  export interface ListNeurons {
294
- neuron_ids: BigUint64Array;
294
+ neuron_ids: BigUint64Array | bigint[];
295
295
  include_neurons_readable_by_caller: boolean;
296
296
  }
297
297
  export interface ListNeuronsResponse {
@@ -302,13 +302,13 @@ export interface ListNodeProvidersResponse {
302
302
  node_providers: Array<NodeProvider>;
303
303
  }
304
304
  export interface ListProposalInfo {
305
- include_reward_status: Int32Array;
305
+ include_reward_status: Int32Array | number[];
306
306
  omit_large_fields: [] | [boolean];
307
307
  before_proposal: [] | [NeuronId];
308
308
  limit: number;
309
- exclude_topic: Int32Array;
309
+ exclude_topic: Int32Array | number[];
310
310
  include_all_manage_neuron_proposals: [] | [boolean];
311
- include_status: Int32Array;
311
+ include_status: Int32Array | number[];
312
312
  }
313
313
  export interface ListProposalInfoResponse {
314
314
  proposal_info: Array<ProposalInfo>;
@@ -384,7 +384,7 @@ export interface Neuron {
384
384
  auto_stake_maturity: [] | [boolean];
385
385
  aging_since_timestamp_seconds: bigint;
386
386
  hot_keys: Array<Principal>;
387
- account: Uint8Array;
387
+ account: Uint8Array | number[];
388
388
  joined_community_fund_timestamp_seconds: [] | [bigint];
389
389
  dissolve_state: [] | [DissolveState];
390
390
  followees: Array<[number, Followees]>;
@@ -412,7 +412,7 @@ export interface NeuronId {
412
412
  id: bigint;
413
413
  }
414
414
  export type NeuronIdOrSubaccount =
415
- | { Subaccount: Uint8Array }
415
+ | { Subaccount: Uint8Array | number[] }
416
416
  | { NeuronId: NeuronId };
417
417
  export interface NeuronInFlightCommand {
418
418
  command: [] | [Command_2];
@@ -431,11 +431,11 @@ export interface NeuronInfo {
431
431
  age_seconds: bigint;
432
432
  }
433
433
  export interface NeuronStakeTransfer {
434
- to_subaccount: Uint8Array;
434
+ to_subaccount: Uint8Array | number[];
435
435
  neuron_stake_e8s: bigint;
436
436
  from: [] | [Principal];
437
437
  memo: bigint;
438
- from_subaccount: Uint8Array;
438
+ from_subaccount: Uint8Array | number[];
439
439
  transfer_timestamp: bigint;
440
440
  block_height: bigint;
441
441
  }
@@ -726,7 +726,7 @@ export interface _SERVICE {
726
726
  [] | [MostRecentMonthlyNodeProviderRewards]
727
727
  >;
728
728
  get_network_economics_parameters: ActorMethod<[], NetworkEconomics>;
729
- get_neuron_ids: ActorMethod<[], BigUint64Array>;
729
+ get_neuron_ids: ActorMethod<[], BigUint64Array | bigint[]>;
730
730
  get_neuron_info: ActorMethod<[bigint], Result_5>;
731
731
  get_neuron_info_by_id_or_subaccount: ActorMethod<
732
732
  [NeuronIdOrSubaccount],
@@ -2,7 +2,7 @@ import type { ActorMethod } from "@dfinity/agent";
2
2
  import type { Principal } from "@dfinity/principal";
3
3
 
4
4
  export interface AccountIdentifier {
5
- hash: Uint8Array;
5
+ hash: Uint8Array | number[];
6
6
  }
7
7
  export type Action =
8
8
  | { RegisterKnownNeuron: KnownNeuron }
@@ -52,7 +52,7 @@ export interface CanisterStatusResultV2 {
52
52
  memory_size: [] | [bigint];
53
53
  cycles: [] | [bigint];
54
54
  idle_cycles_burned_per_day: [] | [bigint];
55
- module_hash: Uint8Array;
55
+ module_hash: Uint8Array | number[];
56
56
  }
57
57
  export interface CanisterSummary {
58
58
  status: [] | [CanisterStatusResultV2];
@@ -177,7 +177,7 @@ export interface Duration {
177
177
  }
178
178
  export interface ExecuteNnsFunction {
179
179
  nns_function: number;
180
- payload: Uint8Array;
180
+ payload: Uint8Array | number[];
181
181
  }
182
182
  export interface Follow {
183
183
  topic: number;
@@ -291,7 +291,7 @@ export interface ListKnownNeuronsResponse {
291
291
  known_neurons: Array<KnownNeuron>;
292
292
  }
293
293
  export interface ListNeurons {
294
- neuron_ids: BigUint64Array;
294
+ neuron_ids: BigUint64Array | bigint[];
295
295
  include_neurons_readable_by_caller: boolean;
296
296
  }
297
297
  export interface ListNeuronsResponse {
@@ -302,13 +302,13 @@ export interface ListNodeProvidersResponse {
302
302
  node_providers: Array<NodeProvider>;
303
303
  }
304
304
  export interface ListProposalInfo {
305
- include_reward_status: Int32Array;
305
+ include_reward_status: Int32Array | number[];
306
306
  omit_large_fields: [] | [boolean];
307
307
  before_proposal: [] | [NeuronId];
308
308
  limit: number;
309
- exclude_topic: Int32Array;
309
+ exclude_topic: Int32Array | number[];
310
310
  include_all_manage_neuron_proposals: [] | [boolean];
311
- include_status: Int32Array;
311
+ include_status: Int32Array | number[];
312
312
  }
313
313
  export interface ListProposalInfoResponse {
314
314
  proposal_info: Array<ProposalInfo>;
@@ -384,7 +384,7 @@ export interface Neuron {
384
384
  auto_stake_maturity: [] | [boolean];
385
385
  aging_since_timestamp_seconds: bigint;
386
386
  hot_keys: Array<Principal>;
387
- account: Uint8Array;
387
+ account: Uint8Array | number[];
388
388
  joined_community_fund_timestamp_seconds: [] | [bigint];
389
389
  dissolve_state: [] | [DissolveState];
390
390
  followees: Array<[number, Followees]>;
@@ -412,7 +412,7 @@ export interface NeuronId {
412
412
  id: bigint;
413
413
  }
414
414
  export type NeuronIdOrSubaccount =
415
- | { Subaccount: Uint8Array }
415
+ | { Subaccount: Uint8Array | number[] }
416
416
  | { NeuronId: NeuronId };
417
417
  export interface NeuronInFlightCommand {
418
418
  command: [] | [Command_2];
@@ -431,11 +431,11 @@ export interface NeuronInfo {
431
431
  age_seconds: bigint;
432
432
  }
433
433
  export interface NeuronStakeTransfer {
434
- to_subaccount: Uint8Array;
434
+ to_subaccount: Uint8Array | number[];
435
435
  neuron_stake_e8s: bigint;
436
436
  from: [] | [Principal];
437
437
  memo: bigint;
438
- from_subaccount: Uint8Array;
438
+ from_subaccount: Uint8Array | number[];
439
439
  transfer_timestamp: bigint;
440
440
  block_height: bigint;
441
441
  }
@@ -726,7 +726,7 @@ export interface _SERVICE {
726
726
  [] | [MostRecentMonthlyNodeProviderRewards]
727
727
  >;
728
728
  get_network_economics_parameters: ActorMethod<[], NetworkEconomics>;
729
- get_neuron_ids: ActorMethod<[], BigUint64Array>;
729
+ get_neuron_ids: ActorMethod<[], BigUint64Array | bigint[]>;
730
730
  get_neuron_info: ActorMethod<[bigint], Result_5>;
731
731
  get_neuron_info_by_id_or_subaccount: ActorMethod<
732
732
  [NeuronIdOrSubaccount],
@@ -2,7 +2,7 @@ import type { ActorMethod } from "@dfinity/agent";
2
2
  import type { Principal } from "@dfinity/principal";
3
3
 
4
4
  export interface AddWasmRequest {
5
- hash: Uint8Array;
5
+ hash: Uint8Array | number[];
6
6
  wasm: [] | [SnsWasm];
7
7
  }
8
8
  export interface AddWasmResponse {
@@ -72,7 +72,7 @@ export interface GetSnsSubnetIdsResponse {
72
72
  sns_subnet_ids: Array<Principal>;
73
73
  }
74
74
  export interface GetWasmRequest {
75
- hash: Uint8Array;
75
+ hash: Uint8Array | number[];
76
76
  }
77
77
  export interface GetWasmResponse {
78
78
  wasm: [] | [SnsWasm];
@@ -136,7 +136,7 @@ export interface PrettySnsVersion {
136
136
  governance_wasm_hash: string;
137
137
  index_wasm_hash: string;
138
138
  }
139
- export type Result = { Error: SnsWasmError } | { Hash: Uint8Array };
139
+ export type Result = { Error: SnsWasmError } | { Hash: Uint8Array | number[] };
140
140
  export interface SnsCanisterIds {
141
141
  root: [] | [Principal];
142
142
  swap: [] | [Principal];
@@ -193,15 +193,15 @@ export interface SnsUpgrade {
193
193
  current_version: [] | [SnsVersion];
194
194
  }
195
195
  export interface SnsVersion {
196
- archive_wasm_hash: Uint8Array;
197
- root_wasm_hash: Uint8Array;
198
- swap_wasm_hash: Uint8Array;
199
- ledger_wasm_hash: Uint8Array;
200
- governance_wasm_hash: Uint8Array;
201
- index_wasm_hash: Uint8Array;
196
+ archive_wasm_hash: Uint8Array | number[];
197
+ root_wasm_hash: Uint8Array | number[];
198
+ swap_wasm_hash: Uint8Array | number[];
199
+ ledger_wasm_hash: Uint8Array | number[];
200
+ governance_wasm_hash: Uint8Array | number[];
201
+ index_wasm_hash: Uint8Array | number[];
202
202
  }
203
203
  export interface SnsWasm {
204
- wasm: Uint8Array;
204
+ wasm: Uint8Array | number[];
205
205
  canister_type: number;
206
206
  }
207
207
  export interface SnsWasmCanisterInitPayload {