radix_engine/blueprints/locker/
package.rs

1use super::*;
2use crate::internal_prelude::*;
3use radix_engine_interface::blueprints::locker::*;
4use radix_engine_interface::blueprints::package::*;
5use sbor::prelude::*;
6
7pub struct LockerNativePackage;
8
9impl LockerNativePackage {
10    pub fn definition() -> PackageDefinition {
11        let blueprints = indexmap!(
12            ACCOUNT_LOCKER_BLUEPRINT.to_string() => AccountLockerBlueprint::definition()
13        );
14
15        PackageDefinition { blueprints }
16    }
17
18    pub fn invoke_export<Y: SystemApi<RuntimeError>>(
19        export_name: &str,
20        input: &IndexedScryptoValue,
21        api: &mut Y,
22    ) -> Result<IndexedScryptoValue, RuntimeError> {
23        // Delegated to the blueprint's dispatcher since it's the only blueprint in the package. If
24        // we add more then we need to control the dispatch here.
25        AccountLockerBlueprint::invoke_export(export_name, input, api)
26    }
27}