@dfinity/nns 4.0.1 → 4.0.2-next-2024-03-25

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 (2) hide show
  1. package/README.md +39 -39
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -208,9 +208,9 @@ If an array of neuron IDs is provided, precisely those neurons will be fetched.
208
208
  If `certified` is true, the request is fetched as an update call, otherwise
209
209
  it is fetched using a query call.
210
210
 
211
- | Method | Type |
212
- | ------------- | ----------------------------------------------------------------------------------------------------- |
213
- | `listNeurons` | `({ certified, neuronIds, }: { certified: boolean; neuronIds?: bigint[]; }) => Promise<NeuronInfo[]>` |
211
+ | Method | Type |
212
+ | ------------- | ------------------------------------------------------------------------------------------------------------------ |
213
+ | `listNeurons` | `({ certified, neuronIds, }: { certified: boolean; neuronIds?: bigint[] or undefined; }) => Promise<NeuronInfo[]>` |
214
214
 
215
215
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L157)
216
216
 
@@ -249,9 +249,9 @@ paginated and filtered by the request.
249
249
  If `certified` is true (default), the request is fetched as an update call, otherwise
250
250
  it is fetched using a query call.
251
251
 
252
- | Method | Type |
253
- | --------------- | ---------------------------------------------------------------------------------------------------------------------- |
254
- | `listProposals` | `({ request, certified, }: { request: ListProposalsRequest; certified?: boolean; }) => Promise<ListProposalsResponse>` |
252
+ | Method | Type |
253
+ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
254
+ | `listProposals` | `({ request, certified, }: { request: ListProposalsRequest; certified?: boolean or undefined; }) => Promise<ListProposalsResponse>` |
255
255
 
256
256
  Parameters:
257
257
 
@@ -262,17 +262,17 @@ Parameters:
262
262
 
263
263
  ##### :gear: stakeNeuron
264
264
 
265
- | Method | Type |
266
- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
267
- | `stakeNeuron` | `({ stake, principal, fromSubAccount, ledgerCanister, createdAt, fee, }: { stake: bigint; principal: Principal; fromSubAccount?: number[]; ledgerCanister: LedgerCanister; createdAt?: bigint; fee?: bigint; }) => Promise<bigint>` |
265
+ | Method | Type |
266
+ | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
267
+ | `stakeNeuron` | `({ stake, principal, fromSubAccount, ledgerCanister, createdAt, fee, }: { stake: bigint; principal: Principal; fromSubAccount?: number[] or undefined; ledgerCanister: LedgerCanister; createdAt?: bigint or undefined; fee?: bigint or undefined; }) => Promise<...>` |
268
268
 
269
269
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L245)
270
270
 
271
271
  ##### :gear: stakeNeuronIcrc1
272
272
 
273
- | Method | Type |
274
- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
275
- | `stakeNeuronIcrc1` | `({ stake, principal, fromSubAccount, ledgerCanister, createdAt, fee, }: { stake: bigint; principal: Principal; fromSubAccount?: Uint8Array; ledgerCanister: LedgerCanister; createdAt?: bigint; fee?: bigint; }) => Promise<...>` |
273
+ | Method | Type |
274
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
275
+ | `stakeNeuronIcrc1` | `({ stake, principal, fromSubAccount, ledgerCanister, createdAt, fee, }: { stake: bigint; principal: Principal; fromSubAccount?: Uint8Array or undefined; ledgerCanister: LedgerCanister; createdAt?: bigint or undefined; fee?: bigint or undefined; }) => Promise<...>` |
276
276
 
277
277
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L311)
278
278
 
@@ -400,9 +400,9 @@ Returns single proposal info
400
400
  If `certified` is true (default), the request is fetched as an update call, otherwise
401
401
  it is fetched using a query call.
402
402
 
403
- | Method | Type |
404
- | ------------- | ----------------------------------------------------------------------------------------------------- |
405
- | `getProposal` | `({ proposalId, certified, }: { proposalId: bigint; certified?: boolean; }) => Promise<ProposalInfo>` |
403
+ | Method | Type |
404
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
405
+ | `getProposal` | `({ proposalId, certified, }: { proposalId: bigint; certified?: boolean or undefined; }) => Promise<ProposalInfo or undefined>` |
406
406
 
407
407
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L641)
408
408
 
@@ -410,9 +410,9 @@ it is fetched using a query call.
410
410
 
411
411
  Create new proposal
412
412
 
413
- | Method | Type |
414
- | -------------- | --------------------------------------------------- |
415
- | `makeProposal` | `(request: MakeProposalRequest) => Promise<bigint>` |
413
+ | Method | Type |
414
+ | -------------- | ---------------------------------------------------------------- |
415
+ | `makeProposal` | `(request: MakeProposalRequest) => Promise<bigint or undefined>` |
416
416
 
417
417
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L659)
418
418
 
@@ -440,9 +440,9 @@ Edit neuron followees per topic
440
440
 
441
441
  Disburse neuron on Account
442
442
 
443
- | Method | Type |
444
- | ---------- | --------------------------------------------------------------------------------------------------------------------- |
445
- | `disburse` | `({ neuronId, toAccountId, amount, }: { neuronId: bigint; toAccountId?: string; amount?: bigint; }) => Promise<void>` |
443
+ | Method | Type |
444
+ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
445
+ | `disburse` | `({ neuronId, toAccountId, amount, }: { neuronId: bigint; toAccountId?: string or undefined; amount?: bigint or undefined; }) => Promise<void>` |
446
446
 
447
447
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L717)
448
448
 
@@ -460,9 +460,9 @@ Merge Maturity of a neuron
460
460
 
461
461
  Stake the maturity of a neuron.
462
462
 
463
- | Method | Type |
464
- | --------------- | -------------------------------------------------------------------------------------------------------- |
465
- | `stakeMaturity` | `({ neuronId, percentageToStake, }: { neuronId: bigint; percentageToStake?: number; }) => Promise<void>` |
463
+ | Method | Type |
464
+ | --------------- | --------------------------------------------------------------------------------------------------------------------- |
465
+ | `stakeMaturity` | `({ neuronId, percentageToStake, }: { neuronId: bigint; percentageToStake?: number or undefined; }) => Promise<void>` |
466
466
 
467
467
  Parameters:
468
468
 
@@ -475,9 +475,9 @@ Parameters:
475
475
 
476
476
  Merge Maturity of a neuron
477
477
 
478
- | Method | Type |
479
- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
480
- | `spawnNeuron` | `({ neuronId, percentageToSpawn, newController, nonce, }: { neuronId: bigint; percentageToSpawn?: number; newController?: Principal; nonce?: bigint; }) => Promise<bigint>` |
478
+ | Method | Type |
479
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
480
+ | `spawnNeuron` | `({ neuronId, percentageToSpawn, newController, nonce, }: { neuronId: bigint; percentageToSpawn?: number or undefined; newController?: Principal or undefined; nonce?: bigint or undefined; }) => Promise<bigint>` |
481
481
 
482
482
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L811)
483
483
 
@@ -505,9 +505,9 @@ Remove hotkey to neuron
505
505
 
506
506
  Gets the NeuronID of a newly created neuron.
507
507
 
508
- | Method | Type |
509
- | --------------------------------- | --------------------------------------------------------------------------------------- |
510
- | `claimOrRefreshNeuronFromAccount` | `({ memo, controller, }: { memo: bigint; controller?: Principal; }) => Promise<bigint>` |
508
+ | Method | Type |
509
+ | --------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
510
+ | `claimOrRefreshNeuronFromAccount` | `({ memo, controller, }: { memo: bigint; controller?: Principal or undefined; }) => Promise<bigint or undefined>` |
511
511
 
512
512
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L910)
513
513
 
@@ -516,9 +516,9 @@ Gets the NeuronID of a newly created neuron.
516
516
  Refreshes neuron and returns neuronId when successful
517
517
  Uses query call only.
518
518
 
519
- | Method | Type |
520
- | ---------------------- | ----------------------------------------------------------- |
521
- | `claimOrRefreshNeuron` | `(request: ClaimOrRefreshNeuronRequest) => Promise<bigint>` |
519
+ | Method | Type |
520
+ | ---------------------- | ------------------------------------------------------------------------ |
521
+ | `claimOrRefreshNeuron` | `(request: ClaimOrRefreshNeuronRequest) => Promise<bigint or undefined>` |
522
522
 
523
523
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L941)
524
524
 
@@ -526,9 +526,9 @@ Uses query call only.
526
526
 
527
527
  Return the data of the neuron provided as id.
528
528
 
529
- | Method | Type |
530
- | ----------- | ---------------------------------------------------------------------------------------------- |
531
- | `getNeuron` | `({ certified, neuronId, }: { certified: boolean; neuronId: bigint; }) => Promise<NeuronInfo>` |
529
+ | Method | Type |
530
+ | ----------- | ----------------------------------------------------------------------------------------------------------- |
531
+ | `getNeuron` | `({ certified, neuronId, }: { certified: boolean; neuronId: bigint; }) => Promise<NeuronInfo or undefined>` |
532
532
 
533
533
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L992)
534
534
 
@@ -551,9 +551,9 @@ Return the data of the neuron provided as id.
551
551
 
552
552
  ##### :gear: listSnses
553
553
 
554
- | Method | Type |
555
- | ----------- | ---------------------------------------------------------------------- |
556
- | `listSnses` | `({ certified, }: { certified?: boolean; }) => Promise<DeployedSns[]>` |
554
+ | Method | Type |
555
+ | ----------- | ----------------------------------------------------------------------------------- |
556
+ | `listSnses` | `({ certified, }: { certified?: boolean or undefined; }) => Promise<DeployedSns[]>` |
557
557
 
558
558
  [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/sns_wasm.canister.ts#L29)
559
559
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/nns",
3
- "version": "4.0.1",
3
+ "version": "4.0.2-next-2024-03-25",
4
4
  "description": "A library for interfacing with the Internet Computer's Network Nervous System.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/cjs/index.cjs.js",
@@ -51,11 +51,11 @@
51
51
  "network-nervous-system"
52
52
  ],
53
53
  "peerDependencies": {
54
- "@dfinity/agent": "^1.0.1",
55
- "@dfinity/candid": "^1.0.1",
56
- "@dfinity/ledger-icp": "^2.2.1",
57
- "@dfinity/nns-proto": "^1.0.1",
58
- "@dfinity/principal": "^1.0.1",
59
- "@dfinity/utils": "^2.1.2"
54
+ "@dfinity/agent": "*",
55
+ "@dfinity/candid": "*",
56
+ "@dfinity/ledger-icp": "*",
57
+ "@dfinity/nns-proto": "*",
58
+ "@dfinity/principal": "*",
59
+ "@dfinity/utils": "*"
60
60
  }
61
- }
61
+ }