@dfinity/nns 11.1.4 → 12.0.0-beta-2025-12-18
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 +4 -4
- package/dist/index.d.ts +10 -15
- package/dist/index.js +1 -7
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1 -7
- package/dist/index.mjs.map +4 -4
- package/package.json +4 -9
- package/dist/candid/genesis_token.certified.idl.d.ts +0 -2
- package/dist/candid/genesis_token.certified.idl.js +0 -49
- package/dist/candid/genesis_token.d.ts +0 -46
- package/dist/candid/genesis_token.did +0 -49
- package/dist/candid/genesis_token.idl.d.ts +0 -2
- package/dist/candid/genesis_token.idl.js +0 -49
- package/dist/candid/governance.certified.idl.d.ts +0 -2
- package/dist/candid/governance.certified.idl.js +0 -1788
- package/dist/candid/governance.d.ts +0 -1339
- package/dist/candid/governance.did +0 -1478
- package/dist/candid/governance.idl.d.ts +0 -2
- package/dist/candid/governance.idl.js +0 -1796
- package/dist/candid/governance_test.certified.idl.d.ts +0 -2
- package/dist/candid/governance_test.certified.idl.js +0 -1789
- package/dist/candid/governance_test.d.ts +0 -1343
- package/dist/candid/governance_test.did +0 -1481
- package/dist/candid/governance_test.idl.d.ts +0 -2
- package/dist/candid/governance_test.idl.js +0 -1797
- package/dist/candid/old_list_neurons_service.certified.idl.d.ts +0 -2
- package/dist/candid/old_list_neurons_service.certified.idl.js +0 -87
- package/dist/candid/sns_wasm.certified.idl.d.ts +0 -2
- package/dist/candid/sns_wasm.certified.idl.js +0 -331
- package/dist/candid/sns_wasm.d.ts +0 -315
- package/dist/candid/sns_wasm.did +0 -350
- package/dist/candid/sns_wasm.idl.d.ts +0 -2
- package/dist/candid/sns_wasm.idl.js +0 -331
- package/dist/canisters/governance/request.converters.d.ts +0 -108
- package/dist/canisters/governance/response.converters.d.ts +0 -26
- package/dist/canisters/governance/services.d.ts +0 -21
- package/dist/constants/canister_ids.d.ts +0 -5
- package/dist/constants/constants.d.ts +0 -1
- package/dist/enums/governance.enums.d.ts +0 -138
- package/dist/errors/governance.errors.d.ts +0 -21
- package/dist/genesis_token.canister.d.ts +0 -11
- package/dist/governance.canister.d.ts +0 -361
- package/dist/governance_test.canister.d.ts +0 -15
- package/dist/sns_wasm.canister.d.ts +0 -11
- package/dist/types/common.d.ts +0 -6
- package/dist/types/governance.options.d.ts +0 -7
- package/dist/types/governance_converters.d.ts +0 -821
- package/dist/types/sns_wasm.options.d.ts +0 -3
- package/dist/utils/account_identifier.utils.d.ts +0 -5
- package/dist/utils/neurons.utils.d.ts +0 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfinity/nns",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0-beta-2025-12-18",
|
|
4
4
|
"description": "A library for interfacing with the Internet Computer's Network Nervous System.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -27,13 +27,10 @@
|
|
|
27
27
|
"scripts": {
|
|
28
28
|
"rmdir": "node ../../scripts/rmdir.mjs",
|
|
29
29
|
"ts-declaration": "tsc --emitDeclarationOnly --outDir dist",
|
|
30
|
-
"build": "npm run rmdir && mkdir -p dist &&
|
|
30
|
+
"build": "npm run rmdir && mkdir -p dist && node esbuild.mjs && npm run ts-declaration",
|
|
31
31
|
"prepack": "npm run build",
|
|
32
32
|
"test": "vitest"
|
|
33
33
|
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"@noble/hashes": "^1.8.0"
|
|
36
|
-
},
|
|
37
34
|
"repository": {
|
|
38
35
|
"type": "git",
|
|
39
36
|
"url": "git+https://github.com/dfinity/icp-js-canisters.git",
|
|
@@ -60,8 +57,6 @@
|
|
|
60
57
|
"network-nervous-system"
|
|
61
58
|
],
|
|
62
59
|
"peerDependencies": {
|
|
63
|
-
"@
|
|
64
|
-
"@dfinity/utils": "^4",
|
|
65
|
-
"@icp-sdk/core": "^4"
|
|
60
|
+
"@icp-sdk/canisters": "*"
|
|
66
61
|
}
|
|
67
|
-
}
|
|
62
|
+
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const NeuronId = IDL.Record({ id: IDL.Nat64 });
|
|
11
|
-
const Result = IDL.Variant({ Ok: IDL.Vec(NeuronId), Err: IDL.Text });
|
|
12
|
-
const Result_1 = IDL.Variant({ Ok: IDL.Null, Err: IDL.Text });
|
|
13
|
-
const TransferredNeuron = IDL.Record({
|
|
14
|
-
error: IDL.Opt(IDL.Text),
|
|
15
|
-
timestamp_seconds: IDL.Nat64,
|
|
16
|
-
neuron_id: IDL.Opt(NeuronId),
|
|
17
|
-
});
|
|
18
|
-
const AccountState = IDL.Record({
|
|
19
|
-
authenticated_principal_id: IDL.Opt(IDL.Principal),
|
|
20
|
-
successfully_transferred_neurons: IDL.Vec(TransferredNeuron),
|
|
21
|
-
is_whitelisted_for_forwarding: IDL.Bool,
|
|
22
|
-
has_donated: IDL.Bool,
|
|
23
|
-
failed_transferred_neurons: IDL.Vec(TransferredNeuron),
|
|
24
|
-
neuron_ids: IDL.Vec(NeuronId),
|
|
25
|
-
has_claimed: IDL.Bool,
|
|
26
|
-
has_forwarded: IDL.Bool,
|
|
27
|
-
icpts: IDL.Nat32,
|
|
28
|
-
});
|
|
29
|
-
const Result_2 = IDL.Variant({ Ok: AccountState, Err: IDL.Text });
|
|
30
|
-
|
|
31
|
-
return IDL.Service({
|
|
32
|
-
balance: IDL.Func([IDL.Text], [IDL.Nat32], []),
|
|
33
|
-
claim_neurons: IDL.Func([IDL.Text], [Result], []),
|
|
34
|
-
donate_account: IDL.Func([IDL.Text], [Result_1], []),
|
|
35
|
-
forward_whitelisted_unclaimed_accounts: IDL.Func(
|
|
36
|
-
[IDL.Null],
|
|
37
|
-
[Result_1],
|
|
38
|
-
[],
|
|
39
|
-
),
|
|
40
|
-
get_account: IDL.Func([IDL.Text], [Result_2], []),
|
|
41
|
-
get_build_metadata: IDL.Func([], [IDL.Text], []),
|
|
42
|
-
len: IDL.Func([], [IDL.Nat16], []),
|
|
43
|
-
total: IDL.Func([], [IDL.Nat32], []),
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const init = ({ IDL }) => {
|
|
48
|
-
return [];
|
|
49
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
import type { ActorMethod } from "@icp-sdk/core/agent";
|
|
10
|
-
import type { IDL } from "@icp-sdk/core/candid";
|
|
11
|
-
import type { Principal } from "@icp-sdk/core/principal";
|
|
12
|
-
|
|
13
|
-
export interface AccountState {
|
|
14
|
-
authenticated_principal_id: [] | [Principal];
|
|
15
|
-
successfully_transferred_neurons: Array<TransferredNeuron>;
|
|
16
|
-
is_whitelisted_for_forwarding: boolean;
|
|
17
|
-
has_donated: boolean;
|
|
18
|
-
failed_transferred_neurons: Array<TransferredNeuron>;
|
|
19
|
-
neuron_ids: Array<NeuronId>;
|
|
20
|
-
has_claimed: boolean;
|
|
21
|
-
has_forwarded: boolean;
|
|
22
|
-
icpts: number;
|
|
23
|
-
}
|
|
24
|
-
export interface NeuronId {
|
|
25
|
-
id: bigint;
|
|
26
|
-
}
|
|
27
|
-
export type Result = { Ok: Array<NeuronId> } | { Err: string };
|
|
28
|
-
export type Result_1 = { Ok: null } | { Err: string };
|
|
29
|
-
export type Result_2 = { Ok: AccountState } | { Err: string };
|
|
30
|
-
export interface TransferredNeuron {
|
|
31
|
-
error: [] | [string];
|
|
32
|
-
timestamp_seconds: bigint;
|
|
33
|
-
neuron_id: [] | [NeuronId];
|
|
34
|
-
}
|
|
35
|
-
export interface _SERVICE {
|
|
36
|
-
balance: ActorMethod<[string], number>;
|
|
37
|
-
claim_neurons: ActorMethod<[string], Result>;
|
|
38
|
-
donate_account: ActorMethod<[string], Result_1>;
|
|
39
|
-
forward_whitelisted_unclaimed_accounts: ActorMethod<[null], Result_1>;
|
|
40
|
-
get_account: ActorMethod<[string], Result_2>;
|
|
41
|
-
get_build_metadata: ActorMethod<[], string>;
|
|
42
|
-
len: ActorMethod<[], number>;
|
|
43
|
-
total: ActorMethod<[], number>;
|
|
44
|
-
}
|
|
45
|
-
export declare const idlFactory: IDL.InterfaceFactory;
|
|
46
|
-
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// Generated from IC repo commit fa06b0e (2025-11-12 tags: release-2025-11-13_03-24-base) 'rs/nns/gtc/canister/gtc.did' by import-candid
|
|
2
|
-
|
|
3
|
-
type AccountState = record {
|
|
4
|
-
authenticated_principal_id : opt principal;
|
|
5
|
-
successfully_transferred_neurons : vec TransferredNeuron;
|
|
6
|
-
is_whitelisted_for_forwarding : bool;
|
|
7
|
-
has_donated : bool;
|
|
8
|
-
failed_transferred_neurons : vec TransferredNeuron;
|
|
9
|
-
neuron_ids : vec NeuronId;
|
|
10
|
-
has_claimed : bool;
|
|
11
|
-
has_forwarded : bool;
|
|
12
|
-
icpts : nat32;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
type NeuronId = record {
|
|
16
|
-
id : nat64
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
type Result = variant {
|
|
20
|
-
Ok : vec NeuronId;
|
|
21
|
-
Err : text
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
type Result_1 = variant {
|
|
25
|
-
Ok;
|
|
26
|
-
Err : text
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
type Result_2 = variant {
|
|
30
|
-
Ok : AccountState;
|
|
31
|
-
Err : text
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
type TransferredNeuron = record {
|
|
35
|
-
error : opt text;
|
|
36
|
-
timestamp_seconds : nat64;
|
|
37
|
-
neuron_id : opt NeuronId;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
service : {
|
|
41
|
-
balance : (text) -> (nat32) query;
|
|
42
|
-
claim_neurons : (text) -> (Result);
|
|
43
|
-
donate_account : (text) -> (Result_1);
|
|
44
|
-
forward_whitelisted_unclaimed_accounts : (null) -> (Result_1);
|
|
45
|
-
get_account : (text) -> (Result_2) query;
|
|
46
|
-
get_build_metadata : () -> (text) query;
|
|
47
|
-
len : () -> (nat16) query;
|
|
48
|
-
total : () -> (nat32) query;
|
|
49
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const NeuronId = IDL.Record({ id: IDL.Nat64 });
|
|
11
|
-
const Result = IDL.Variant({ Ok: IDL.Vec(NeuronId), Err: IDL.Text });
|
|
12
|
-
const Result_1 = IDL.Variant({ Ok: IDL.Null, Err: IDL.Text });
|
|
13
|
-
const TransferredNeuron = IDL.Record({
|
|
14
|
-
error: IDL.Opt(IDL.Text),
|
|
15
|
-
timestamp_seconds: IDL.Nat64,
|
|
16
|
-
neuron_id: IDL.Opt(NeuronId),
|
|
17
|
-
});
|
|
18
|
-
const AccountState = IDL.Record({
|
|
19
|
-
authenticated_principal_id: IDL.Opt(IDL.Principal),
|
|
20
|
-
successfully_transferred_neurons: IDL.Vec(TransferredNeuron),
|
|
21
|
-
is_whitelisted_for_forwarding: IDL.Bool,
|
|
22
|
-
has_donated: IDL.Bool,
|
|
23
|
-
failed_transferred_neurons: IDL.Vec(TransferredNeuron),
|
|
24
|
-
neuron_ids: IDL.Vec(NeuronId),
|
|
25
|
-
has_claimed: IDL.Bool,
|
|
26
|
-
has_forwarded: IDL.Bool,
|
|
27
|
-
icpts: IDL.Nat32,
|
|
28
|
-
});
|
|
29
|
-
const Result_2 = IDL.Variant({ Ok: AccountState, Err: IDL.Text });
|
|
30
|
-
|
|
31
|
-
return IDL.Service({
|
|
32
|
-
balance: IDL.Func([IDL.Text], [IDL.Nat32], ["query"]),
|
|
33
|
-
claim_neurons: IDL.Func([IDL.Text], [Result], []),
|
|
34
|
-
donate_account: IDL.Func([IDL.Text], [Result_1], []),
|
|
35
|
-
forward_whitelisted_unclaimed_accounts: IDL.Func(
|
|
36
|
-
[IDL.Null],
|
|
37
|
-
[Result_1],
|
|
38
|
-
[],
|
|
39
|
-
),
|
|
40
|
-
get_account: IDL.Func([IDL.Text], [Result_2], ["query"]),
|
|
41
|
-
get_build_metadata: IDL.Func([], [IDL.Text], ["query"]),
|
|
42
|
-
len: IDL.Func([], [IDL.Nat16], ["query"]),
|
|
43
|
-
total: IDL.Func([], [IDL.Nat32], ["query"]),
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const init = ({ IDL }) => {
|
|
48
|
-
return [];
|
|
49
|
-
};
|