| Crates.io | pallet-idn-manager |
| lib.rs | pallet-idn-manager |
| version | 0.0.1 |
| created_at | 2025-10-27 17:19:08.462957+00 |
| updated_at | 2025-10-27 17:19:08.462957+00 |
| description | FRAME pallet for managing IDN services. |
| homepage | https://idealabs.network |
| repository | https://github.com/ideal-lab5/idn-sdk |
| max_upload_size | |
| id | 1903333 |
| size | 308,577 |
The IDN Manager pallet provides functionality for managing subscriptions to randomness pulses. It allows users to create, update, pause, and terminate subscriptions, as well as configure fees and storage deposits. This pallet is designed to be modular and extensible, allowing for different implementations of key components such as the fees manager and deposit calculator.
The IDN Manager pallet is designed with a modular architecture, allowing for different implementations of key components. The main components include:
The subscription state lifecycle defines the different states a subscription can be in and the transitions between them. The possible states are:
The IDN Manager pallet can be configured using the following runtime parameters:
MaxMetadataLen: The maximum length of the subscription metadata.Credits: The type used to represent the number of credits in a subscription.MaxSubscriptions: The maximum number of subscriptions allowed.Currency: The currency used for fees and deposits.FeesManager: The implementation used for managing fees.DepositCalculator: The implementation used for calculating storage deposits.Pulse: The type that represents a randomness pulse.To create a subscription, call the create_subscription dispatchable with the desired parameters.
To update a subscription, call the update_subscription dispatchable with the desired parameters.
To pause a subscription, call the pause_subscription dispatchable with the subscription ID.
To reactivate a paused subscription, call the reactivate_subscription dispatchable with the subscription ID.
To terminate a subscription, call the kill_subscription dispatchable with the subscription ID.
To receive a quote for a subscription based on its frequency and lifetime, call the quote_subscription dispatchable.
The IDN Manager pallet emits the following events:
SubscriptionCreated: A new subscription has been created.SubscriptionUpdated: A subscription has been updated.SubscriptionPaused: A subscription has been paused.SubscriptionReactivated: A subscription has been reactivated.SubscriptionTerminated: A subscription has been terminated.FeesCollected: Fees have been successfully collected from a subscription.SubQuoted: A quote was successfully computed for the given lifetime and frequency of a subscription.The IDN Manager pallet includes comprehensive benchmarking to measure and optimize performance. The benchmarks cover the following operations:
create_subscriptionupdate_subscriptionpause_subscriptionreactivate_subscriptionkill_subscriptionquote_subscription