@dfinity/nns 0.2.2 → 0.3.0-nightly-2022-04-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.
- package/README.md +1 -6
- package/dist/candid/governanceTypes.d.ts +13 -9
- package/dist/cjs/index.cjs.js +36 -36
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/account_identifier.js +1 -1
- package/dist/esm/{chunk-2DZXLOEC.js → chunk-27LBXZJR.js} +3 -3
- package/dist/esm/{chunk-2DZXLOEC.js.map → chunk-27LBXZJR.js.map} +2 -2
- package/dist/esm/{chunk-HMU24NWJ.js → chunk-7AFR3LOO.js} +2 -2
- package/dist/esm/{chunk-HMU24NWJ.js.map → chunk-7AFR3LOO.js.map} +0 -0
- package/dist/esm/chunk-EXEYDII6.js +18 -0
- package/dist/esm/{chunk-FVDRR6PO.js.map → chunk-EXEYDII6.js.map} +3 -3
- package/dist/esm/chunk-F6ES4H7R.js +2 -0
- package/dist/esm/{chunk-QR4654XK.js.map → chunk-F6ES4H7R.js.map} +3 -3
- package/dist/esm/chunk-FY5QONEL.js +4 -0
- package/dist/esm/chunk-FY5QONEL.js.map +7 -0
- package/dist/esm/{chunk-D2W3ELRE.js → chunk-HQLGGFMH.js} +2 -2
- package/dist/esm/{chunk-D2W3ELRE.js.map → chunk-HQLGGFMH.js.map} +1 -1
- package/dist/esm/chunk-LSSEKDUC.js +3 -0
- package/dist/esm/chunk-LSSEKDUC.js.map +7 -0
- package/dist/esm/governance.js +1 -1
- package/dist/esm/icp.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/ledger.js +1 -1
- package/dist/proto/base_types_pb.js +217 -140
- package/dist/proto/ledger_pb.js +1571 -969
- package/dist/types/canisters/governance/payloads.d.ts +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +24 -26
- package/dist/types/canisters/governance/response.converters.d.ts +6 -35
- package/dist/types/canisters/governance/services.d.ts +9 -0
- package/dist/types/errors/governance.errors.d.ts +22 -0
- package/dist/types/errors/ledger.errors.d.ts +21 -0
- package/dist/types/governance.d.ts +95 -7
- package/dist/types/index.d.ts +4 -0
- package/dist/types/ledger.d.ts +9 -3
- package/dist/types/types/common.d.ts +4 -0
- package/dist/types/types/governance_converters.d.ts +1 -70
- package/dist/types/types/ledger.d.ts +3 -24
- package/dist/types/utils/converter.utils.d.ts +1 -6
- package/dist/types/utils/neurons.utils.d.ts +13 -0
- package/package.json +6 -4
- package/dist/candid/nns_dapp.certified.idl.js +0 -206
- package/dist/candid/nns_dapp.did +0 -240
- package/dist/candid/nns_dapp.idl.js +0 -206
- package/dist/esm/chunk-4FZAJTYF.js +0 -2
- package/dist/esm/chunk-4FZAJTYF.js.map +0 -7
- package/dist/esm/chunk-FVDRR6PO.js +0 -17
- package/dist/esm/chunk-LNMGZ6W7.js +0 -3
- package/dist/esm/chunk-LNMGZ6W7.js.map +0 -7
- package/dist/esm/chunk-QR4654XK.js +0 -2
- package/dist/esm/chunk-RUFBUR7C.js +0 -4
- package/dist/esm/chunk-RUFBUR7C.js.map +0 -7
- package/dist/esm/chunk-ZWZRSVU4.js +0 -2
- package/dist/esm/chunk-ZWZRSVU4.js.map +0 -7
- package/dist/types/types/option.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
# nns-js
|
|
2
2
|
|
|
3
|
-
A library for interfacing with the Internet Computer's Network Nervous System.
|
|
3
|
+
A library for interfacing with the ledger and governance canisters of the Internet Computer's Network Nervous System.
|
|
4
4
|
|
|
5
5
|
This library is still in active development, and new features will incrementally be available.
|
|
6
6
|
|
|
7
|
-
- [x] Ledger Canister
|
|
8
|
-
- [x] `accountBalance`
|
|
9
|
-
- [x] `transfer`
|
|
10
|
-
- [ ] Governance Canister (Coming soon)
|
|
11
|
-
|
|
12
7
|
## Example Usage
|
|
13
8
|
|
|
14
9
|
```ts
|
|
@@ -64,7 +64,7 @@ export type Command =
|
|
|
64
64
|
| { MergeMaturity: MergeMaturity }
|
|
65
65
|
| { Disburse: Disburse };
|
|
66
66
|
export type Command_1 =
|
|
67
|
-
| { Error:
|
|
67
|
+
| { Error: GovernanceErrorDetail }
|
|
68
68
|
| { Spawn: SpawnResponse }
|
|
69
69
|
| { Split: SpawnResponse }
|
|
70
70
|
| { Follow: {} }
|
|
@@ -148,7 +148,7 @@ export interface GovernanceCachedMetrics {
|
|
|
148
148
|
community_fund_total_staked_e8s: bigint;
|
|
149
149
|
timestamp_seconds: bigint;
|
|
150
150
|
}
|
|
151
|
-
export interface
|
|
151
|
+
export interface GovernanceErrorDetail {
|
|
152
152
|
error_message: string;
|
|
153
153
|
error_type: number;
|
|
154
154
|
}
|
|
@@ -288,7 +288,7 @@ export interface Proposal {
|
|
|
288
288
|
}
|
|
289
289
|
export interface ProposalData {
|
|
290
290
|
id: [] | [NeuronId];
|
|
291
|
-
failure_reason: [] | [
|
|
291
|
+
failure_reason: [] | [GovernanceErrorDetail];
|
|
292
292
|
ballots: Array<[bigint, Ballot]>;
|
|
293
293
|
proposal_timestamp_seconds: bigint;
|
|
294
294
|
reward_event_round: bigint;
|
|
@@ -305,7 +305,7 @@ export interface ProposalInfo {
|
|
|
305
305
|
id: [] | [NeuronId];
|
|
306
306
|
status: number;
|
|
307
307
|
topic: number;
|
|
308
|
-
failure_reason: [] | [
|
|
308
|
+
failure_reason: [] | [GovernanceErrorDetail];
|
|
309
309
|
ballots: Array<[bigint, Ballot]>;
|
|
310
310
|
proposal_timestamp_seconds: bigint;
|
|
311
311
|
reward_event_round: bigint;
|
|
@@ -326,11 +326,15 @@ export interface RegisterVote {
|
|
|
326
326
|
export interface RemoveHotKey {
|
|
327
327
|
hot_key_to_remove: [] | [Principal];
|
|
328
328
|
}
|
|
329
|
-
export type Result = { Ok: null } | { Err:
|
|
330
|
-
export type Result_1 =
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
export type
|
|
329
|
+
export type Result = { Ok: null } | { Err: GovernanceErrorDetail };
|
|
330
|
+
export type Result_1 =
|
|
331
|
+
| { Error: GovernanceErrorDetail }
|
|
332
|
+
| { NeuronId: NeuronId };
|
|
333
|
+
export type Result_2 = { Ok: Neuron } | { Err: GovernanceErrorDetail };
|
|
334
|
+
export type Result_3 =
|
|
335
|
+
| { Ok: RewardNodeProviders }
|
|
336
|
+
| { Err: GovernanceErrorDetail };
|
|
337
|
+
export type Result_4 = { Ok: NeuronInfo } | { Err: GovernanceErrorDetail };
|
|
334
338
|
export interface RewardEvent {
|
|
335
339
|
day_after_genesis: bigint;
|
|
336
340
|
actual_timestamp_seconds: bigint;
|