/** * The IDL of the module. * * @module */ /** The IDL of the module. */ export declare const idl: { readonly module_id: "0x1::aggregator_factory"; readonly doc: "This module provides foundations to create aggregators in the system.\n\nDesign rationale (V1)\n=====================\nFirst, we encourage the reader to see rationale of `Aggregator` in\n`aggregator.move`.\n\nRecall that the value of any aggregator can be identified in storage by\n(handle, key) pair. How this pair can be generated? Short answer: with\n`AggregatorFactory`!\n\n`AggregatorFactory` is a struct that can be stored as a resource on some\naccount and which contains a `phantom_table` field. When the factory is\ninitialized, we initialize this table. Importantly, table initialization\nonly generates a uniue table `handle` - something we can reuse.\n\nWhen the user wants to create a new aggregator, he/she calls a constructor\nprovided by the factory (`create_aggregator(..)`). This constructor generates\na unique key, which with the handle is used to initialize `Aggregator` struct.\n\nUse cases\n=========\nWe limit the usage of `AggregatorFactory` by only storing it on the core\naccount.\n\nWhen something whants to use an aggregator, the factory is queried and an\naggregator instance is created. Once aggregator is no longer in use, it\nshould be destroyed by the user."; readonly functions: readonly []; readonly structs: readonly [{ readonly name: "0x1::aggregator_factory::AggregatorFactory"; readonly doc: "Struct that creates aggregators."; readonly fields: readonly [{ readonly name: "phantom_table"; readonly ty: { readonly struct: { readonly name: "0x1::table::Table"; readonly ty_args: readonly ["u128", "u128"]; }; }; }]; readonly abilities: readonly ["key"]; }]; readonly errors: { readonly "1": { readonly name: "EAGGREGATOR_FACTORY_EXISTS"; readonly doc: "When aggregator factory has already been published."; }; readonly "2": { readonly name: "ENOT_CORE_FRAMEWORK_ADDRESS"; readonly doc: "When aggregator factory is published to not core framework address."; }; readonly "3": { readonly name: "ENOT_SUPPORTED"; readonly doc: "When aggregator feature is not supported (raised by native code)."; }; }; }; //# sourceMappingURL=idl.d.ts.map