npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@veive-io/mod-validation-as

v1.0.0

Published

Veive smart account validation module

Downloads

10

Readme

Mod Validation

Overview

mod-validation-as is a foundational library in the Veive protocol, designed to support the creation and integration of validation modules. These modules are essential for verifying the authenticity and authorization of operations within smart accounts on the Koinos blockchain. This library provides the necessary tools and interfaces to develop robust validation logic, ensuring that only valid and authorized operations are executed.

Components and Functional Description

The mod-validation-as library offers several key components and tools that facilitate the development and integration of validation modules:

1. IModValidation Interface

  • Description: This interface defines the standard for external interactions with validation modules. It is typically used by the account-as module to communicate with and utilize the capabilities of validation modules.
  • Purpose: The IModValidation interface ensures that all validation modules adhere to a consistent protocol for operation validation, installation, and uninstallation processes.
  • Use Case: When a smart account needs to validate an operation, it uses the IModValidation interface to invoke the appropriate methods on the validation module, ensuring the operation meets the required criteria.

2. ModValidation Class

  • Description: The ModValidation class serves as the base class for all validation modules. Developers extend this class to create custom validation modules that implement specific validation logic.
  • Key Methods:
    • is_valid_operation: This method should be overridden to implement the specific validation logic required by the module. It is called to verify if an operation meets the necessary criteria for execution.
    • on_install and on_uninstall: These methods handle the setup and teardown of the module, respectively, ensuring that any necessary resources are initialized or cleaned up.
  • Use Case: A developer creating a new validation module will extend the ModValidation class and override its methods to define custom validation rules, such as checking for specific signatures or ensuring compliance with particular policies.

3. modvalidation Proto

  • Description: This protocol buffer (proto) provides the data structures necessary for defining and transmitting data related to validation modules.
  • Purpose: The modvalidation proto standardizes the format and structure of data exchanged between the smart account and validation modules, facilitating smooth communication and integration.
  • Components:
    • Data Structures: Includes various data types and structures used for defining validation rules, operation details, and module metadata.

Usage and Integration

Integration in the Veive Protocol

The mod-validation-as library plays a crucial role in the Veive protocol's modular architecture. It integrates closely with the account-as module, allowing smart accounts to utilize validation modules to ensure that all operations are properly authorized and adhere to the set rules.

Flow Integration:

  • The IModValidation interface and the ModValidation class enable seamless communication and interaction between smart accounts and validation modules. This integration ensures that validation checks are performed whenever an operation is initiated, maintaining the integrity and security of the system.

Development and Customization:

  • Developers can extend the ModValidation class to create custom validation modules tailored to specific use cases, such as checking for multi-signature requirements, enforcing transaction limits, or integrating with external authentication systems.

Scripts

Build

To compile the package, run:

yarn build

Contributing

Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.