@dfinity/nns 4.0.2 → 5.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.
Files changed (33) hide show
  1. package/README.md +32 -32
  2. package/dist/candid/genesis_token.d.ts +3 -0
  3. package/dist/candid/genesis_token.did +1 -1
  4. package/dist/candid/governance.certified.idl.js +41 -0
  5. package/dist/candid/governance.d.ts +26 -0
  6. package/dist/candid/governance.did +30 -12
  7. package/dist/candid/governance.idl.js +41 -0
  8. package/dist/candid/governance_test.certified.idl.js +41 -0
  9. package/dist/candid/governance_test.d.ts +26 -0
  10. package/dist/candid/governance_test.did +30 -12
  11. package/dist/candid/governance_test.idl.js +41 -0
  12. package/dist/candid/sns_wasm.d.ts +3 -0
  13. package/dist/candid/sns_wasm.did +12 -12
  14. package/dist/cjs/index.cjs.js +1 -2
  15. package/dist/cjs/index.cjs.js.map +4 -4
  16. package/dist/esm/chunk-T6KTQFXP.js +19 -0
  17. package/dist/esm/chunk-T6KTQFXP.js.map +7 -0
  18. package/dist/esm/governance.canister.js +1 -1
  19. package/dist/esm/index.js +1 -1
  20. package/dist/esm/index.js.map +4 -4
  21. package/dist/types/canisters/governance/request.converters.d.ts +7 -7
  22. package/dist/types/canisters/governance/response.converters.d.ts +1 -6
  23. package/dist/types/enums/governance.enums.d.ts +6 -1
  24. package/dist/types/errors/governance.errors.d.ts +0 -2
  25. package/dist/types/governance.canister.d.ts +16 -28
  26. package/dist/types/sns_wasm.canister.d.ts +1 -1
  27. package/dist/types/types/governance_converters.d.ts +15 -0
  28. package/package.json +6 -7
  29. package/dist/esm/chunk-LZ5FA3UO.js +0 -20
  30. package/dist/esm/chunk-LZ5FA3UO.js.map +0 -7
  31. package/dist/types/canisters/governance/request.proto.converters.d.ts +0 -16
  32. package/dist/types/canisters/governance/response.proto.converters.d.ts +0 -1
  33. package/dist/types/utils/proto.utils.d.ts +0 -25
package/README.md CHANGED
@@ -155,7 +155,7 @@ Parameters:
155
155
 
156
156
  ### :factory: GovernanceCanister
157
157
 
158
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L110)
158
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L91)
159
159
 
160
160
  #### Methods
161
161
 
@@ -197,7 +197,7 @@ Parameters:
197
197
  | -------- | ------------------------------------------------------------- |
198
198
  | `create` | `(options?: GovernanceCanisterOptions) => GovernanceCanister` |
199
199
 
200
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L125)
200
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L104)
201
201
 
202
202
  ##### :gear: listNeurons
203
203
 
@@ -212,7 +212,7 @@ it is fetched using a query call.
212
212
  | ------------- | ------------------------------------------------------------------------------------------------------------------ |
213
213
  | `listNeurons` | `({ certified, neuronIds, }: { certified: boolean; neuronIds?: bigint[] or undefined; }) => Promise<NeuronInfo[]>` |
214
214
 
215
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L157)
215
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L130)
216
216
 
217
217
  ##### :gear: listKnownNeurons
218
218
 
@@ -226,7 +226,7 @@ it is fetched using a query call.
226
226
  | ------------------ | ------------------------------------------------- |
227
227
  | `listKnownNeurons` | `(certified?: boolean) => Promise<KnownNeuron[]>` |
228
228
 
229
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L188)
229
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L153)
230
230
 
231
231
  ##### :gear: getLastestRewardEvent
232
232
 
@@ -239,7 +239,7 @@ it's fetched using a query call.
239
239
  | ----------------------- | ----------------------------------------------- |
240
240
  | `getLastestRewardEvent` | `(certified?: boolean) => Promise<RewardEvent>` |
241
241
 
242
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L210)
242
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L175)
243
243
 
244
244
  ##### :gear: listProposals
245
245
 
@@ -258,7 +258,7 @@ Parameters:
258
258
  - `request`: the options to list the proposals (limit number of results, topics to search for, etc.)
259
259
  - `certified`: query or update calls
260
260
 
261
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L226)
261
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L191)
262
262
 
263
263
  ##### :gear: stakeNeuron
264
264
 
@@ -266,7 +266,7 @@ Parameters:
266
266
  | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
267
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
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L245)
269
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L210)
270
270
 
271
271
  ##### :gear: stakeNeuronIcrc1
272
272
 
@@ -274,7 +274,7 @@ Parameters:
274
274
  | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
275
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
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L311)
277
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L276)
278
278
 
279
279
  ##### :gear: increaseDissolveDelay
280
280
 
@@ -284,7 +284,7 @@ Increases dissolve delay of a neuron
284
284
  | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
285
285
  | `increaseDissolveDelay` | `({ neuronId, additionalDissolveDelaySeconds, }: { neuronId: bigint; additionalDissolveDelaySeconds: number; }) => Promise<void>` |
286
286
 
287
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L376)
287
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L341)
288
288
 
289
289
  ##### :gear: setDissolveDelay
290
290
 
@@ -295,7 +295,7 @@ The new date is now + dissolveDelaySeconds.
295
295
  | ------------------ | ------------------------------------------------------------------------------------------------------------- |
296
296
  | `setDissolveDelay` | `({ neuronId, dissolveDelaySeconds, }: { neuronId: bigint; dissolveDelaySeconds: number; }) => Promise<void>` |
297
297
 
298
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L408)
298
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L367)
299
299
 
300
300
  ##### :gear: startDissolving
301
301
 
@@ -305,7 +305,7 @@ Start dissolving process of a neuron
305
305
  | ----------------- | ------------------------------------- |
306
306
  | `startDissolving` | `(neuronId: bigint) => Promise<void>` |
307
307
 
308
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L431)
308
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L390)
309
309
 
310
310
  ##### :gear: stopDissolving
311
311
 
@@ -315,7 +315,7 @@ Stop dissolving process of a neuron
315
315
  | ---------------- | ------------------------------------- |
316
316
  | `stopDissolving` | `(neuronId: bigint) => Promise<void>` |
317
317
 
318
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L448)
318
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L404)
319
319
 
320
320
  ##### :gear: joinCommunityFund
321
321
 
@@ -325,7 +325,7 @@ Neuron joins the community fund
325
325
  | ------------------- | ------------------------------------- |
326
326
  | `joinCommunityFund` | `(neuronId: bigint) => Promise<void>` |
327
327
 
328
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L465)
328
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L418)
329
329
 
330
330
  ##### :gear: autoStakeMaturity
331
331
 
@@ -340,7 +340,7 @@ Parameters:
340
340
  - `neuronId`: The id of the neuron for which to request a change of the auto stake feature
341
341
  - `autoStake`: `true` to enable the auto-stake maturity for this neuron, `false` to turn it off
342
342
 
343
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L487)
343
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L436)
344
344
 
345
345
  ##### :gear: leaveCommunityFund
346
346
 
@@ -350,7 +350,7 @@ Neuron leaves the community fund
350
350
  | -------------------- | ------------------------------------- |
351
351
  | `leaveCommunityFund` | `(neuronId: bigint) => Promise<void>` |
352
352
 
353
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L502)
353
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L451)
354
354
 
355
355
  ##### :gear: setNodeProviderAccount
356
356
 
@@ -361,7 +361,7 @@ Where the reward is paid to.
361
361
  | ------------------------ | ---------------------------------------------- |
362
362
  | `setNodeProviderAccount` | `(accountIdentifier: string) => Promise<void>` |
363
363
 
364
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L519)
364
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L468)
365
365
 
366
366
  ##### :gear: mergeNeurons
367
367
 
@@ -371,7 +371,7 @@ Merge two neurons
371
371
  | -------------- | --------------------------------------------------------------------------------- |
372
372
  | `mergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<void>` |
373
373
 
374
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L539)
374
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L488)
375
375
 
376
376
  ##### :gear: simulateMergeNeurons
377
377
 
@@ -381,7 +381,7 @@ Simulate merging two neurons
381
381
  | ---------------------- | --------------------------------------------------------------------------------------- |
382
382
  | `simulateMergeNeurons` | `(request: { sourceNeuronId: bigint; targetNeuronId: bigint; }) => Promise<NeuronInfo>` |
383
383
 
384
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L556)
384
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L505)
385
385
 
386
386
  ##### :gear: splitNeuron
387
387
 
@@ -391,7 +391,7 @@ Splits a neuron creating a new one
391
391
  | ------------- | ----------------------------------------------------------------------------------- |
392
392
  | `splitNeuron` | `({ neuronId, amount, }: { neuronId: bigint; amount: bigint; }) => Promise<bigint>` |
393
393
 
394
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L601)
394
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L550)
395
395
 
396
396
  ##### :gear: getProposal
397
397
 
@@ -404,7 +404,7 @@ it is fetched using a query call.
404
404
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
405
405
  | `getProposal` | `({ proposalId, certified, }: { proposalId: bigint; certified?: boolean or undefined; }) => Promise<ProposalInfo or undefined>` |
406
406
 
407
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L641)
407
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L590)
408
408
 
409
409
  ##### :gear: makeProposal
410
410
 
@@ -414,7 +414,7 @@ Create new proposal
414
414
  | -------------- | ---------------------------------------------------------------- |
415
415
  | `makeProposal` | `(request: MakeProposalRequest) => Promise<bigint or undefined>` |
416
416
 
417
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L659)
417
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L608)
418
418
 
419
419
  ##### :gear: registerVote
420
420
 
@@ -424,7 +424,7 @@ Registers vote for a proposal from the neuron passed.
424
424
  | -------------- | ----------------------------------------------------------------------------------------------------------- |
425
425
  | `registerVote` | `({ neuronId, vote, proposalId, }: { neuronId: bigint; vote: Vote; proposalId: bigint; }) => Promise<void>` |
426
426
 
427
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L680)
427
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L629)
428
428
 
429
429
  ##### :gear: setFollowees
430
430
 
@@ -434,7 +434,7 @@ Edit neuron followees per topic
434
434
  | -------------- | ------------------------------------------------- |
435
435
  | `setFollowees` | `(followRequest: FollowRequest) => Promise<void>` |
436
436
 
437
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L702)
437
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L651)
438
438
 
439
439
  ##### :gear: disburse
440
440
 
@@ -444,7 +444,7 @@ Disburse neuron on Account
444
444
  | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
445
445
  | `disburse` | `({ neuronId, toAccountId, amount, }: { neuronId: bigint; toAccountId?: string or undefined; amount?: bigint or undefined; }) => Promise<void>` |
446
446
 
447
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L717)
447
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L666)
448
448
 
449
449
  ##### :gear: mergeMaturity
450
450
 
@@ -454,7 +454,7 @@ Merge Maturity of a neuron
454
454
  | --------------- | ------------------------------------------------------------------------------------------------------- |
455
455
  | `mergeMaturity` | `({ neuronId, percentageToMerge, }: { neuronId: bigint; percentageToMerge: number; }) => Promise<void>` |
456
456
 
457
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L756)
457
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L702)
458
458
 
459
459
  ##### :gear: stakeMaturity
460
460
 
@@ -469,7 +469,7 @@ Parameters:
469
469
  - `neuronId`: The id of the neuron for which to stake the maturity
470
470
  - `percentageToStake`: Optional. Percentage of the current maturity to stake. If not provided, all of the neuron's current maturity will be staked.
471
471
 
472
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L789)
472
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L731)
473
473
 
474
474
  ##### :gear: spawnNeuron
475
475
 
@@ -479,7 +479,7 @@ Merge Maturity of a neuron
479
479
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
480
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
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L811)
482
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L753)
483
483
 
484
484
  ##### :gear: addHotkey
485
485
 
@@ -489,7 +489,7 @@ Add hotkey to neuron
489
489
  | ----------- | ------------------------------------------------------------------------------------------ |
490
490
  | `addHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
491
491
 
492
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L865)
492
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L800)
493
493
 
494
494
  ##### :gear: removeHotkey
495
495
 
@@ -499,7 +499,7 @@ Remove hotkey to neuron
499
499
  | -------------- | ------------------------------------------------------------------------------------------ |
500
500
  | `removeHotkey` | `({ neuronId, principal, }: { neuronId: bigint; principal: Principal; }) => Promise<void>` |
501
501
 
502
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L889)
502
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L820)
503
503
 
504
504
  ##### :gear: claimOrRefreshNeuronFromAccount
505
505
 
@@ -509,7 +509,7 @@ Gets the NeuronID of a newly created neuron.
509
509
  | --------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
510
510
  | `claimOrRefreshNeuronFromAccount` | `({ memo, controller, }: { memo: bigint; controller?: Principal or undefined; }) => Promise<bigint or undefined>` |
511
511
 
512
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L910)
512
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L838)
513
513
 
514
514
  ##### :gear: claimOrRefreshNeuron
515
515
 
@@ -520,7 +520,7 @@ Uses query call only.
520
520
  | ---------------------- | ------------------------------------------------------------------------ |
521
521
  | `claimOrRefreshNeuron` | `(request: ClaimOrRefreshNeuronRequest) => Promise<bigint or undefined>` |
522
522
 
523
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L941)
523
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L869)
524
524
 
525
525
  ##### :gear: getNeuron
526
526
 
@@ -530,7 +530,7 @@ Return the data of the neuron provided as id.
530
530
  | ----------- | ----------------------------------------------------------------------------------------------------------- |
531
531
  | `getNeuron` | `({ certified, neuronId, }: { certified: boolean; neuronId: bigint; }) => Promise<NeuronInfo or undefined>` |
532
532
 
533
- [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L992)
533
+ [:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/nns/src/governance.canister.ts#L920)
534
534
 
535
535
  ### :factory: SnsWasmCanister
536
536
 
@@ -1,4 +1,5 @@
1
1
  import type { ActorMethod } from "@dfinity/agent";
2
+ import type { IDL } from "@dfinity/candid";
2
3
  import type { Principal } from "@dfinity/principal";
3
4
 
4
5
  export interface AccountState {
@@ -33,3 +34,5 @@ export interface _SERVICE {
33
34
  len: ActorMethod<[], number>;
34
35
  total: ActorMethod<[], number>;
35
36
  }
37
+ export declare const idlFactory: IDL.InterfaceFactory;
38
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 044cfd5 (2024-01-25 tags: release-2024-01-25_14-09+p2p-con) 'rs/nns/gtc/canister/gtc.did' by import-candid
1
+ // Generated from IC repo commit 30a4021 (2024-03-28 tags: release-2024-03-27_23-01-p2p) 'rs/nns/gtc/canister/gtc.did' by import-candid
2
2
  type AccountState = record {
3
3
  authenticated_principal_id : opt principal;
4
4
  successfully_transferred_neurons : vec TransferredNeuron;
@@ -246,6 +246,20 @@ export const idlFactory = ({ IDL }) => {
246
246
  'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
247
247
  'rewards' : IDL.Vec(RewardNodeProvider),
248
248
  });
249
+ const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
250
+ const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
251
+ 'contribution_threshold_xdr' : IDL.Opt(Decimal),
252
+ 'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
253
+ 'full_participation_milestone_xdr' : IDL.Opt(Decimal),
254
+ });
255
+ const NeuronsFundEconomics = IDL.Record({
256
+ 'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
257
+ 'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
258
+ NeuronsFundMatchedFundingCurveCoefficients
259
+ ),
260
+ 'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
261
+ 'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
262
+ });
249
263
  const NetworkEconomics = IDL.Record({
250
264
  'neuron_minimum_stake_e8s' : IDL.Nat64,
251
265
  'max_proposals_to_keep_per_topic' : IDL.Nat32,
@@ -255,6 +269,7 @@ export const idlFactory = ({ IDL }) => {
255
269
  'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
256
270
  'minimum_icp_xdr_rate' : IDL.Nat64,
257
271
  'maximum_node_provider_rewards_e8s' : IDL.Nat64,
272
+ 'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
258
273
  });
259
274
  const ApproveGenesisKyc = IDL.Record({
260
275
  'principals' : IDL.Vec(IDL.Principal),
@@ -493,6 +508,10 @@ export const idlFactory = ({ IDL }) => {
493
508
  IDL.Nat64
494
509
  ),
495
510
  });
511
+ const XdrConversionRate = IDL.Record({
512
+ 'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
513
+ 'timestamp_seconds' : IDL.Opt(IDL.Nat64),
514
+ });
496
515
  const Command_2 = IDL.Variant({
497
516
  'Spawn' : NeuronId,
498
517
  'Split' : Split,
@@ -561,6 +580,7 @@ export const idlFactory = ({ IDL }) => {
561
580
  'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
562
581
  'migrations' : IDL.Opt(Migrations),
563
582
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
583
+ 'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
564
584
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
565
585
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
566
586
  'genesis_timestamp_seconds' : IDL.Nat64,
@@ -671,6 +691,7 @@ export const idlFactory = ({ IDL }) => {
671
691
  'source_neuron_info' : IDL.Opt(NeuronInfo),
672
692
  });
673
693
  const MakeProposalResponse = IDL.Record({
694
+ 'message' : IDL.Opt(IDL.Text),
674
695
  'proposal_id' : IDL.Opt(NeuronId),
675
696
  });
676
697
  const StakeMaturityResponse = IDL.Record({
@@ -1057,6 +1078,20 @@ export const init = ({ IDL }) => {
1057
1078
  'use_registry_derived_rewards' : IDL.Opt(IDL.Bool),
1058
1079
  'rewards' : IDL.Vec(RewardNodeProvider),
1059
1080
  });
1081
+ const Decimal = IDL.Record({ 'human_readable' : IDL.Opt(IDL.Text) });
1082
+ const NeuronsFundMatchedFundingCurveCoefficients = IDL.Record({
1083
+ 'contribution_threshold_xdr' : IDL.Opt(Decimal),
1084
+ 'one_third_participation_milestone_xdr' : IDL.Opt(Decimal),
1085
+ 'full_participation_milestone_xdr' : IDL.Opt(Decimal),
1086
+ });
1087
+ const NeuronsFundEconomics = IDL.Record({
1088
+ 'maximum_icp_xdr_rate' : IDL.Opt(Percentage),
1089
+ 'neurons_fund_matched_funding_curve_coefficients' : IDL.Opt(
1090
+ NeuronsFundMatchedFundingCurveCoefficients
1091
+ ),
1092
+ 'max_theoretical_neurons_fund_participation_amount_xdr' : IDL.Opt(Decimal),
1093
+ 'minimum_icp_xdr_rate' : IDL.Opt(Percentage),
1094
+ });
1060
1095
  const NetworkEconomics = IDL.Record({
1061
1096
  'neuron_minimum_stake_e8s' : IDL.Nat64,
1062
1097
  'max_proposals_to_keep_per_topic' : IDL.Nat32,
@@ -1066,6 +1101,7 @@ export const init = ({ IDL }) => {
1066
1101
  'neuron_spawn_dissolve_delay_seconds' : IDL.Nat64,
1067
1102
  'minimum_icp_xdr_rate' : IDL.Nat64,
1068
1103
  'maximum_node_provider_rewards_e8s' : IDL.Nat64,
1104
+ 'neurons_fund_economics' : IDL.Opt(NeuronsFundEconomics),
1069
1105
  });
1070
1106
  const ApproveGenesisKyc = IDL.Record({
1071
1107
  'principals' : IDL.Vec(IDL.Principal),
@@ -1304,6 +1340,10 @@ export const init = ({ IDL }) => {
1304
1340
  IDL.Nat64
1305
1341
  ),
1306
1342
  });
1343
+ const XdrConversionRate = IDL.Record({
1344
+ 'xdr_permyriad_per_icp' : IDL.Opt(IDL.Nat64),
1345
+ 'timestamp_seconds' : IDL.Opt(IDL.Nat64),
1346
+ });
1307
1347
  const Command_2 = IDL.Variant({
1308
1348
  'Spawn' : NeuronId,
1309
1349
  'Split' : Split,
@@ -1372,6 +1412,7 @@ export const init = ({ IDL }) => {
1372
1412
  'topic_followee_index' : IDL.Vec(IDL.Tuple(IDL.Int32, FollowersMap)),
1373
1413
  'migrations' : IDL.Opt(Migrations),
1374
1414
  'proposals' : IDL.Vec(IDL.Tuple(IDL.Nat64, ProposalData)),
1415
+ 'xdr_conversion_rate' : IDL.Opt(XdrConversionRate),
1375
1416
  'in_flight_commands' : IDL.Vec(IDL.Tuple(IDL.Nat64, NeuronInFlightCommand)),
1376
1417
  'neurons' : IDL.Vec(IDL.Tuple(IDL.Nat64, Neuron)),
1377
1418
  'genesis_timestamp_seconds' : IDL.Nat64,
@@ -1,4 +1,5 @@
1
1
  import type { ActorMethod } from "@dfinity/agent";
2
+ import type { IDL } from "@dfinity/candid";
2
3
  import type { Principal } from "@dfinity/principal";
3
4
 
4
5
  export interface AccountIdentifier {
@@ -149,6 +150,9 @@ export interface CreateServiceNervousSystem {
149
150
  swap_parameters: [] | [SwapParameters];
150
151
  initial_token_distribution: [] | [InitialTokenDistribution];
151
152
  }
153
+ export interface Decimal {
154
+ human_readable: [] | [string];
155
+ }
152
156
  export interface DerivedProposalInformation {
153
157
  swap_background_information: [] | [SwapBackgroundInformation];
154
158
  }
@@ -221,6 +225,7 @@ export interface Governance {
221
225
  topic_followee_index: Array<[number, FollowersMap]>;
222
226
  migrations: [] | [Migrations];
223
227
  proposals: Array<[bigint, ProposalData]>;
228
+ xdr_conversion_rate: [] | [XdrConversionRate];
224
229
  in_flight_commands: Array<[bigint, NeuronInFlightCommand]>;
225
230
  neurons: Array<[bigint, Neuron]>;
226
231
  genesis_timestamp_seconds: bigint;
@@ -337,6 +342,7 @@ export interface ListProposalInfoResponse {
337
342
  proposal_info: Array<ProposalInfo>;
338
343
  }
339
344
  export interface MakeProposalResponse {
345
+ message: [] | [string];
340
346
  proposal_id: [] | [NeuronId];
341
347
  }
342
348
  export interface MakingSnsProposal {
@@ -393,6 +399,7 @@ export interface NetworkEconomics {
393
399
  neuron_spawn_dissolve_delay_seconds: bigint;
394
400
  minimum_icp_xdr_rate: bigint;
395
401
  maximum_node_provider_rewards_e8s: bigint;
402
+ neurons_fund_economics: [] | [NeuronsFundEconomics];
396
403
  }
397
404
  export interface Neuron {
398
405
  id: [] | [NeuronId];
@@ -474,6 +481,19 @@ export interface NeuronsFundData {
474
481
  initial_neurons_fund_participation: [] | [NeuronsFundParticipation];
475
482
  neurons_fund_refunds: [] | [NeuronsFundSnapshot];
476
483
  }
484
+ export interface NeuronsFundEconomics {
485
+ maximum_icp_xdr_rate: [] | [Percentage];
486
+ neurons_fund_matched_funding_curve_coefficients:
487
+ | []
488
+ | [NeuronsFundMatchedFundingCurveCoefficients];
489
+ max_theoretical_neurons_fund_participation_amount_xdr: [] | [Decimal];
490
+ minimum_icp_xdr_rate: [] | [Percentage];
491
+ }
492
+ export interface NeuronsFundMatchedFundingCurveCoefficients {
493
+ contribution_threshold_xdr: [] | [Decimal];
494
+ one_third_participation_milestone_xdr: [] | [Decimal];
495
+ full_participation_milestone_xdr: [] | [Decimal];
496
+ }
477
497
  export interface NeuronsFundNeuron {
478
498
  hotkey_principal: [] | [string];
479
499
  is_capped: [] | [boolean];
@@ -741,6 +761,10 @@ export interface VotingRewardParameters {
741
761
  export interface WaitForQuietState {
742
762
  current_deadline_timestamp_seconds: bigint;
743
763
  }
764
+ export interface XdrConversionRate {
765
+ xdr_permyriad_per_icp: [] | [bigint];
766
+ timestamp_seconds: [] | [bigint];
767
+ }
744
768
  export interface _SERVICE {
745
769
  claim_gtc_neurons: ActorMethod<[Principal, Array<NeuronId>], Result>;
746
770
  claim_or_refresh_neuron_from_account: ActorMethod<
@@ -791,3 +815,5 @@ export interface _SERVICE {
791
815
  transfer_gtc_neuron: ActorMethod<[NeuronId, NeuronId], Result>;
792
816
  update_node_provider: ActorMethod<[UpdateNodeProvider], Result>;
793
817
  }
818
+ export declare const idlFactory: IDL.InterfaceFactory;
819
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -1,5 +1,5 @@
1
- // Generated from IC repo commit 044cfd5 (2024-01-25 tags: release-2024-01-25_14-09+p2p-con) 'rs/nns/governance/canister/governance.did' by import-candid
2
- type AccountIdentifier = record { hash : vec nat8 };
1
+ // Generated from IC repo commit 30a4021 (2024-03-28 tags: release-2024-03-27_23-01-p2p) 'rs/nns/governance/canister/governance.did' by import-candid
2
+ type AccountIdentifier = record { hash : blob };
3
3
  type Action = variant {
4
4
  RegisterKnownNeuron : KnownNeuron;
5
5
  ManageNeuron : ManageNeuron;
@@ -34,7 +34,7 @@ type CanisterStatusResultV2 = record {
34
34
  memory_size : opt nat64;
35
35
  cycles : opt nat64;
36
36
  idle_cycles_burned_per_day : opt nat64;
37
- module_hash : vec nat8;
37
+ module_hash : blob;
38
38
  };
39
39
  type CanisterSummary = record {
40
40
  status : opt CanisterStatusResultV2;
@@ -124,6 +124,7 @@ type CreateServiceNervousSystem = record {
124
124
  swap_parameters : opt SwapParameters;
125
125
  initial_token_distribution : opt InitialTokenDistribution;
126
126
  };
127
+ type Decimal = record { human_readable : opt text };
127
128
  type DerivedProposalInformation = record {
128
129
  swap_background_information : opt SwapBackgroundInformation;
129
130
  };
@@ -147,7 +148,7 @@ type DissolveState = variant {
147
148
  WhenDissolvedTimestampSeconds : nat64;
148
149
  };
149
150
  type Duration = record { seconds : opt nat64 };
150
- type ExecuteNnsFunction = record { nns_function : int32; payload : vec nat8 };
151
+ type ExecuteNnsFunction = record { nns_function : int32; payload : blob };
151
152
  type Follow = record { topic : int32; followees : vec NeuronId };
152
153
  type Followees = record { followees : vec NeuronId };
153
154
  type Followers = record { followers : vec NeuronId };
@@ -173,6 +174,7 @@ type Governance = record {
173
174
  topic_followee_index : vec record { int32; FollowersMap };
174
175
  migrations : opt Migrations;
175
176
  proposals : vec record { nat64; ProposalData };
177
+ xdr_conversion_rate : opt XdrConversionRate;
176
178
  in_flight_commands : vec record { nat64; NeuronInFlightCommand };
177
179
  neurons : vec record { nat64; Neuron };
178
180
  genesis_timestamp_seconds : nat64;
@@ -276,7 +278,10 @@ type ListProposalInfo = record {
276
278
  include_status : vec int32;
277
279
  };
278
280
  type ListProposalInfoResponse = record { proposal_info : vec ProposalInfo };
279
- type MakeProposalResponse = record { proposal_id : opt NeuronId };
281
+ type MakeProposalResponse = record {
282
+ message : opt text;
283
+ proposal_id : opt NeuronId;
284
+ };
280
285
  type MakingSnsProposal = record {
281
286
  proposal : opt Proposal;
282
287
  caller : opt principal;
@@ -323,6 +328,7 @@ type NetworkEconomics = record {
323
328
  neuron_spawn_dissolve_delay_seconds : nat64;
324
329
  minimum_icp_xdr_rate : nat64;
325
330
  maximum_node_provider_rewards_e8s : nat64;
331
+ neurons_fund_economics : opt NeuronsFundEconomics;
326
332
  };
327
333
  type Neuron = record {
328
334
  id : opt NeuronId;
@@ -338,7 +344,7 @@ type Neuron = record {
338
344
  auto_stake_maturity : opt bool;
339
345
  aging_since_timestamp_seconds : nat64;
340
346
  hot_keys : vec principal;
341
- account : vec nat8;
347
+ account : blob;
342
348
  joined_community_fund_timestamp_seconds : opt nat64;
343
349
  dissolve_state : opt DissolveState;
344
350
  followees : vec record { int32; Followees };
@@ -363,10 +369,7 @@ type NeuronDistribution = record {
363
369
  stake : opt Tokens;
364
370
  };
365
371
  type NeuronId = record { id : nat64 };
366
- type NeuronIdOrSubaccount = variant {
367
- Subaccount : vec nat8;
368
- NeuronId : NeuronId;
369
- };
372
+ type NeuronIdOrSubaccount = variant { Subaccount : blob; NeuronId : NeuronId };
370
373
  type NeuronInFlightCommand = record {
371
374
  command : opt Command_2;
372
375
  timestamp : nat64;
@@ -385,11 +388,11 @@ type NeuronInfo = record {
385
388
  age_seconds : nat64;
386
389
  };
387
390
  type NeuronStakeTransfer = record {
388
- to_subaccount : vec nat8;
391
+ to_subaccount : blob;
389
392
  neuron_stake_e8s : nat64;
390
393
  from : opt principal;
391
394
  memo : nat64;
392
- from_subaccount : vec nat8;
395
+ from_subaccount : blob;
393
396
  transfer_timestamp : nat64;
394
397
  block_height : nat64;
395
398
  };
@@ -403,6 +406,17 @@ type NeuronsFundData = record {
403
406
  initial_neurons_fund_participation : opt NeuronsFundParticipation;
404
407
  neurons_fund_refunds : opt NeuronsFundSnapshot;
405
408
  };
409
+ type NeuronsFundEconomics = record {
410
+ maximum_icp_xdr_rate : opt Percentage;
411
+ neurons_fund_matched_funding_curve_coefficients : opt NeuronsFundMatchedFundingCurveCoefficients;
412
+ max_theoretical_neurons_fund_participation_amount_xdr : opt Decimal;
413
+ minimum_icp_xdr_rate : opt Percentage;
414
+ };
415
+ type NeuronsFundMatchedFundingCurveCoefficients = record {
416
+ contribution_threshold_xdr : opt Decimal;
417
+ one_third_participation_milestone_xdr : opt Decimal;
418
+ full_participation_milestone_xdr : opt Decimal;
419
+ };
406
420
  type NeuronsFundNeuron = record {
407
421
  hotkey_principal : opt text;
408
422
  is_capped : opt bool;
@@ -629,6 +643,10 @@ type VotingRewardParameters = record {
629
643
  final_reward_rate : opt Percentage;
630
644
  };
631
645
  type WaitForQuietState = record { current_deadline_timestamp_seconds : nat64 };
646
+ type XdrConversionRate = record {
647
+ xdr_permyriad_per_icp : opt nat64;
648
+ timestamp_seconds : opt nat64;
649
+ };
632
650
  service : (Governance) -> {
633
651
  claim_gtc_neurons : (principal, vec NeuronId) -> (Result);
634
652
  claim_or_refresh_neuron_from_account : (ClaimOrRefreshNeuronFromAccount) -> (